From: Yakir Yang Date: Mon, 28 Sep 2015 08:58:24 +0000 (+0800) Subject: CHROMIUM: drm: bridge/dw_hdmi: fix i2cm standard mode setting error X-Git-Tag: firefly_0821_release~1899 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a4aebb43119332c8ff0f6507e77f376f213c30f2;p=firefly-linux-kernel-4.4.55.git CHROMIUM: drm: bridge/dw_hdmi: fix i2cm standard mode setting error I have uploaded a patch to switch DDC to standard mode in (https://chromium-review.googlesource.com/298270), but that change have influence the "spare register" in I2CM_DIV, I know this haven't cause some know bug, but we need to fix it. BUG=chrome-os-partner:34741 TEST=None Change-Id: Iff678fb49828db9b8026422e302a03f687a7c862 Signed-off-by: Yakir Yang Reviewed-on: https://chromium-review.googlesource.com/302751 Commit-Ready: Douglas Anderson Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson --- diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c index 502c8355cdc0..be0e1a3959e7 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/dw-hdmi.c @@ -275,7 +275,8 @@ static void dw_hdmi_i2c_init(struct dw_hdmi *hdmi) hdmi_writeb(hdmi, 0x00, HDMI_I2CM_SOFTRSTZ); /* Set Standard Mode speed */ - hdmi_writeb(hdmi, 0x03, HDMI_I2CM_DIV); + hdmi_modb(hdmi, HDMI_I2CM_DIV_STD_MODE, + HDMI_I2CM_DIV_FAST_STD_MODE, HDMI_I2CM_DIV); /* Set done, not acknowledged and arbitration interrupt polarities */ hdmi_writeb(hdmi, HDMI_I2CM_INT_DONE_POL, HDMI_I2CM_INT); diff --git a/drivers/gpu/drm/bridge/dw-hdmi.h b/drivers/gpu/drm/bridge/dw-hdmi.h index c88e59b6376f..92c41d776891 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.h +++ b/drivers/gpu/drm/bridge/dw-hdmi.h @@ -1076,6 +1076,11 @@ enum { HDMI_I2CM_CTLINT_NAC_MASK = 0x40, HDMI_I2CM_CTLINT_ARB_POL = 0x8, HDMI_I2CM_CTLINT_ARB_MASK = 0x4, + +/* I2CM_DIV field values */ + HDMI_I2CM_DIV_FAST_STD_MODE = 0x8, + HDMI_I2CM_DIV_FAST_MODE = 0x8, + HDMI_I2CM_DIV_STD_MODE = 0, }; #endif /* __DW_HDMI_H__ */