drm/bridge: inno-hdmi: reset DDC segment pointer per I2C transfer
PATCH 1/1 drm/bridge: inno-hdmi: reset DDC segment pointer per I2C transfer
The segment_addr and ddc_addr fields need to be reset per I2C transfer to avoid stale values. The reset wasn't required on simple displays with only one segment, but modern displays with two or more segments end up with corrupt EDIDs.
This was found on a StarFive VisionFive 2 SBC.
--- drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/bridge/inno-hdmi.c +4 -0
@@ -989,6 +989,10 @@ static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap,mutex_lock (&i2c->lock); +/* Reset segment_addr and ddc_addr at the start of every I2C transfer */ + i2c->ddc_addr =0 ; + i2c->segment_addr =0 ; +/* Clear the EDID interrupt flag and unmute the interrupt */ hdmi_writeb (hdmi,HDMI_INTERRUPT_MASK1 , m_INT_EDID_READY);hdmi_writeb (hdmi,HDMI_INTERRUPT_STATUS1 , m_INT_EDID_READY);
Signature · 1 line
2.53.0
Quoted 19 lines · Dominique Belhachemi
The
segment_addrandddc_addrfields need to be reset per I2C transfer to avoid stale values. The reset wasn't required on simple displays with only one segment, but modern displays with two or more segments end up with corrupt EDIDs.This was found on a StarFive VisionFive 2 SBC.
Signed-off-by Dominique Belhachemi <[email protected]>--- drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/bridge/inno-hdmi.c +0
-0@@ -989,6 +989,10 @@ static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap,
drivers/gpu/drm/bridge/inno-hdmi.c static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap,
Quoted 10 lines
drivers/gpu/drm/bridge/inno-hdmi.c +4
-1mutex_lock (&i2c->lock); +/* Reset segment_addr and ddc_addr at the start of every I2C transfer */ + i2c->ddc_addr =0 ; + i2c->segment_addr =0 ; +/* Clear the EDID interrupt flag and unmute the interrupt */ hdmi_writeb (hdmi,HDMI_INTERRUPT_MASK1 , m_INT_EDID_READY);hdmi_writeb (hdmi,HDMI_INTERRUPT_STATUS1 , m_INT_EDID_READY); --
Hi, Is there anything else I can provide to get this merged?
Thanks
-Dominique
Quoted 17 lines · Dominique Belhachemi
The
segment_addrandddc_addrfields need to be reset per I2C transfer to avoid stale values. The reset wasn't required on simple displays with only one segment, but modern displays with two or more segments end up with corrupt EDIDs.This was found on a StarFive VisionFive 2 SBC.
Signed-off-by Dominique Belhachemi <[email protected]>--- drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/bridge/inno-hdmi.c +0
-0
drivers/gpu/drm/bridge/inno-hdmi.c static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap, · line 998
Quoted 10 lines
drivers/gpu/drm/bridge/inno-hdmi.c +4
-0@@ -989,6 +989,10 @@ static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap,mutex_lock (&i2c->lock); +/* Reset segment_addr and ddc_addr at the start of every I2C transfer */ + i2c->ddc_addr =0 ; + i2c->segment_addr =0 ; +/* Clear the EDID interrupt flag and unmute the interrupt */ hdmi_writeb (hdmi,HDMI_INTERRUPT_MASK1 , m_INT_EDID_READY);hdmi_writeb (hdmi,HDMI_INTERRUPT_STATUS1 , m_INT_EDID_READY);
Quoted 23 lines · Michal Wilczynski
Quoted 20 lines · Dominique Belhachemi
The
segment_addrandddc_addrfields need to be reset per I2C transfer to avoid stale values. The reset wasn't required on simple displays with only one segment, but modern displays with two or more segments end up with corrupt EDIDs.This was found on a StarFive VisionFive 2 SBC.
Signed-off-by Dominique Belhachemi <[email protected]>--- drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/bridge/inno-hdmi.c +0
-0@@ -989,6 +989,10 @@ static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap,mutex_lock (&i2c->lock);
Quoted 9 lines
drivers/gpu/drm/bridge/inno-hdmi.c static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap, · line 998
Quoted 7 lines
drivers/gpu/drm/bridge/inno-hdmi.c +4
-0+/* Reset segment_addr and ddc_addr at the start of every I2C transfer */ + i2c->ddc_addr =0 ; + i2c->segment_addr =0 ; +/* Clear the EDID interrupt flag and unmute the interrupt */ hdmi_writeb (hdmi,HDMI_INTERRUPT_MASK1 , m_INT_EDID_READY);hdmi_writeb (hdmi,HDMI_INTERRUPT_STATUS1 , m_INT_EDID_READY);Reviewed-by Michal Wilczynski <[email protected]>
I was also told that there were some changes in the MAINTAINERS file regarding this patch and some core people may be missing e.g Luca and Maxime.
It would be best to resend with updated list of maintainers.
Best regards,
Signature · 1 line
Michal Wilczynski <[email protected]>
Quoted 37 lines · Michal Wilczynski
Quoted 23 lines · Michal Wilczynski
Quoted 20 lines · Dominique Belhachemi
The
segment_addrandddc_addrfields need to be reset per I2C transfer to avoid stale values. The reset wasn't required on simple displays with only one segment, but modern displays with two or more segments end up with corrupt EDIDs.This was found on a StarFive VisionFive 2 SBC.
Signed-off-by Dominique Belhachemi <[email protected]>--- drivers/gpu/drm/bridge/inno-hdmi.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/bridge/inno-hdmi.c +0
-0@@ -989,6 +989,10 @@ static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap,mutex_lock (&i2c->lock);Quoted 9 lines
drivers/gpu/drm/bridge/inno-hdmi.c static int inno_hdmi_i2c_xfer(struct i2c_adapter *adap, · line 998
Quoted 7 lines
drivers/gpu/drm/bridge/inno-hdmi.c +4
-0+/* Reset segment_addr and ddc_addr at the start of every I2C transfer */ + i2c->ddc_addr =0 ; + i2c->segment_addr =0 ; +/* Clear the EDID interrupt flag and unmute the interrupt */ hdmi_writeb (hdmi,HDMI_INTERRUPT_MASK1 , m_INT_EDID_READY);hdmi_writeb (hdmi,HDMI_INTERRUPT_STATUS1 , m_INT_EDID_READY);Reviewed-by Michal Wilczynski <[email protected]>
Quoted 6 lines
I was also told that there were some changes in the
MAINTAINERSfile regarding this patch and some core people may be missing e.g Luca and Maxime.It would be best to resend with updated list of maintainers.
Thanks Michal, I am adding them to Cc.
Best
-Dominique