diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index 209b1753b701776a24feab094f5b501e4ecb45a3..e04fe3f8038357ec7687844abe0309cc447edb79 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -2693,9 +2693,15 @@ static int adv7842_core_init(struct v4l2_subdev *sd) /* disable I2C access to internal EDID ram from HDMI DDC ports */ rep_write_and_or(sd, 0x77, 0xf3, 0x00); - hdmi_write(sd, 0x69, 0xa3); /* HPA manual */ - /* HPA disable on port A and B */ - io_write_and_or(sd, 0x20, 0xcf, 0x00); + if (pdata->hpa_auto) { + /* HPA auto, HPA 0.5s after Edid set and Cable detect */ + hdmi_write(sd, 0x69, 0x5c); + } else { + /* HPA manual */ + hdmi_write(sd, 0x69, 0xa3); + /* HPA disable on port A and B */ + io_write_and_or(sd, 0x20, 0xcf, 0x00); + } /* LLC */ io_write(sd, 0x19, 0x80 | pdata->llc_dll_phase); diff --git a/include/media/adv7842.h b/include/media/adv7842.h index 39322091e8b0dc6355ced09aad7cb56a08588157..924cbb8d004a76b548ba6bbffcd13f863a569b5c 100644 --- a/include/media/adv7842.h +++ b/include/media/adv7842.h @@ -220,6 +220,9 @@ struct adv7842_platform_data { unsigned sdp_free_run_cbar_en:1; unsigned sdp_free_run_force:1; + /* HPA manual (0) or auto (1), affects HDMI register 0x69 */ + unsigned hpa_auto:1; + struct adv7842_sdp_csc_coeff sdp_csc_coeff; struct adv7842_sdp_io_sync_adjustment sdp_io_sync_625;