aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/bridge/synopsys/dw-hdmi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index b74ccb6a24c2..ab7968c8f6a2 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -1046,6 +1046,10 @@ static bool dw_hdmi_support_scdc(struct dw_hdmi *hdmi)
1046 if (hdmi->version < 0x200a) 1046 if (hdmi->version < 0x200a)
1047 return false; 1047 return false;
1048 1048
1049 /* Disable if no DDC bus */
1050 if (!hdmi->ddc)
1051 return false;
1052
1049 /* Disable if SCDC is not supported, or if an HF-VSDB block is absent */ 1053 /* Disable if SCDC is not supported, or if an HF-VSDB block is absent */
1050 if (!display->hdmi.scdc.supported || 1054 if (!display->hdmi.scdc.supported ||
1051 !display->hdmi.scdc.scrambling.supported) 1055 !display->hdmi.scdc.scrambling.supported)
@@ -1684,13 +1688,13 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
1684 * Source Devices compliant shall set the 1688 * Source Devices compliant shall set the
1685 * Source Version = 1. 1689 * Source Version = 1.
1686 */ 1690 */
1687 drm_scdc_readb(&hdmi->i2c->adap, SCDC_SINK_VERSION, 1691 drm_scdc_readb(hdmi->ddc, SCDC_SINK_VERSION,
1688 &bytes); 1692 &bytes);
1689 drm_scdc_writeb(&hdmi->i2c->adap, SCDC_SOURCE_VERSION, 1693 drm_scdc_writeb(hdmi->ddc, SCDC_SOURCE_VERSION,
1690 min_t(u8, bytes, SCDC_MIN_SOURCE_VERSION)); 1694 min_t(u8, bytes, SCDC_MIN_SOURCE_VERSION));
1691 1695
1692 /* Enabled Scrambling in the Sink */ 1696 /* Enabled Scrambling in the Sink */
1693 drm_scdc_set_scrambling(&hdmi->i2c->adap, 1); 1697 drm_scdc_set_scrambling(hdmi->ddc, 1);
1694 1698
1695 /* 1699 /*
1696 * To activate the scrambler feature, you must ensure 1700 * To activate the scrambler feature, you must ensure
@@ -1706,7 +1710,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
1706 hdmi_writeb(hdmi, 0, HDMI_FC_SCRAMBLER_CTRL); 1710 hdmi_writeb(hdmi, 0, HDMI_FC_SCRAMBLER_CTRL);
1707 hdmi_writeb(hdmi, (u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ, 1711 hdmi_writeb(hdmi, (u8)~HDMI_MC_SWRSTZ_TMDSSWRST_REQ,
1708 HDMI_MC_SWRSTZ); 1712 HDMI_MC_SWRSTZ);
1709 drm_scdc_set_scrambling(&hdmi->i2c->adap, 0); 1713 drm_scdc_set_scrambling(hdmi->ddc, 0);
1710 } 1714 }
1711 } 1715 }
1712 1716