adv7604/adv7842: fix query_dv_timings
PATCH 1/1 adv7604/adv7842: fix query_dv_timings
Set il_vfrontporch/il_vsync/il_vbackporch to 0 for progressive video and fix a typo where bt->vbackporch was set instead of bt->il_vbackporch.
Signed-off-by Hans Verkuil <[email protected]>
drivers/media/i2c/adv7604.c +3 -1
@@ -1593,7 +1593,9 @@ static int adv7604_query_dv_timings(struct v4l2_subdev *sd, bt->height +=hdmi_read16 (sd,0x0b ,0xfff ); bt->il_vfrontporch =hdmi_read16 (sd,0x2c ,0x1fff ) /2 ; bt->il_vsync =hdmi_read16 (sd,0x30 ,0x1fff ) /2 ; - bt->vbackporch =hdmi_read16 (sd,0x34 ,0x1fff ) /2 ; + bt->il_vbackporch =hdmi_read16 (sd,0x34 ,0x1fff ) /2 ; + }else { + bt->il_vfrontporch = bt->il_vsync = bt->il_vbackporch =0 ; }adv7604_fill_optional_dv_timings_fields (sd, timings); }else {
drivers/media/i2c/adv7842.c +3 -1
@@ -1483,8 +1483,10 @@ static int adv7842_query_dv_timings(struct v4l2_subdev *sd, hdmi_read(sd, 0x2d)) / 2; bt->il_vsync = ((hdmi_read (sd,0x30 ) &0x1f ) *256 +hdmi_read (sd,0x31 )) /2 ; - bt->vbackporch = ((hdmi_read (sd,0x34 ) &0x1f ) *256 + + bt->il_vbackporch = ((hdmi_read (sd,0x34 ) &0x1f ) *256 +hdmi_read (sd,0x35 )) /2 ; + }else { + bt->il_vfrontporch = bt->il_vsync = bt->il_vbackporch =0 ; }adv7842_fill_optional_dv_timings_fields (sd, timings); }else {