@@ -208,6 +208,7 @@ struct rk_hdmirx_dev {
208
208
bool initialized ;
209
209
bool freq_qos_add ;
210
210
bool hdcp1x_enable ;
211
+ bool get_timing ;
211
212
u32 num_clks ;
212
213
u32 edid_blocks_written ;
213
214
u32 hpd_trigger_level ;
@@ -1174,6 +1175,7 @@ static void hdmirx_format_change(struct rk_hdmirx_dev *hdmirx_dev)
1174
1175
& timings , false);
1175
1176
}
1176
1177
1178
+ hdmirx_dev -> get_timing = true;
1177
1179
v4l2_dbg (1 , debug , v4l2_dev , "%s: queue res_chg_event\n" , __func__ );
1178
1180
v4l2_event_queue (& stream -> vdev , & ev_src_chg );
1179
1181
}
@@ -1693,6 +1695,11 @@ static int hdmirx_start_streaming(struct vb2_queue *queue, unsigned int count)
1693
1695
struct v4l2_bt_timings * bt = & timings .bt ;
1694
1696
int line_flag ;
1695
1697
1698
+ if (!hdmirx_dev -> get_timing ) {
1699
+ v4l2_err (v4l2_dev , "Err, timing is invalid\n" );
1700
+ return 0 ;
1701
+ }
1702
+
1696
1703
mutex_lock (& hdmirx_dev -> stream_lock );
1697
1704
stream -> frame_idx = 0 ;
1698
1705
stream -> line_flag_int_cnt = 0 ;
@@ -1892,6 +1899,7 @@ static void process_signal_change(struct rk_hdmirx_dev *hdmirx_dev)
1892
1899
FIFO_UNDERFLOW_INT_EN |
1893
1900
HDMIRX_AXI_ERROR_INT_EN , 0 );
1894
1901
hdmirx_reset_dma (hdmirx_dev );
1902
+ hdmirx_dev -> get_timing = false;
1895
1903
schedule_delayed_work_on (hdmirx_dev -> bound_cpu ,
1896
1904
& hdmirx_dev -> delayed_work_res_change ,
1897
1905
msecs_to_jiffies (50 ));
@@ -2115,6 +2123,8 @@ static void dma_idle_int_handler(struct rk_hdmirx_dev *hdmirx_dev, bool *handled
2115
2123
vb_done -> sequence = stream -> frame_idx ;
2116
2124
hdmirx_vb_done (stream , vb_done );
2117
2125
stream -> frame_idx ++ ;
2126
+ if (stream -> frame_idx == 30 )
2127
+ v4l2_info (v4l2_dev , "rcv frames\n" );
2118
2128
}
2119
2129
2120
2130
stream -> curr_buf = NULL ;
@@ -2221,7 +2231,7 @@ static irqreturn_t hdmirx_dma_irq_handler(int irq, void *dev_id)
2221
2231
line_flag_int_handler (hdmirx_dev , & handled );
2222
2232
2223
2233
if (!handled )
2224
- v4l2_dbg (2 , debug , v4l2_dev ,
2234
+ v4l2_dbg (3 , debug , v4l2_dev ,
2225
2235
"%s: dma irq not handled, dma_stat1:%#x!\n" ,
2226
2236
__func__ , dma_stat1 );
2227
2237
@@ -2285,6 +2295,7 @@ static void hdmirx_delayed_work_hotplug(struct work_struct *work)
2285
2295
bool plugin ;
2286
2296
2287
2297
mutex_lock (& hdmirx_dev -> work_lock );
2298
+ hdmirx_dev -> get_timing = false;
2288
2299
plugin = tx_5v_power_present (hdmirx_dev );
2289
2300
v4l2_ctrl_s_ctrl (hdmirx_dev -> detect_tx_5v_ctrl , plugin );
2290
2301
v4l2_dbg (1 , debug , v4l2_dev , "%s: plugin:%d\n" , __func__ , plugin );
0 commit comments