[Intel-gfx] [PATCH 1/2] IGD: workaround i2c bus issue in kernel side
Eric Anholt
eric at anholt.net
Sat Mar 28 00:28:08 CET 2009
On Mon, 2009-03-16 at 14:45 +0800, Shaohua Li wrote:
> In IGD, DPCUNIT_CLOCK_GATE_DISABLE bit should be set, otherwise i2c
> access will be wrong.
Hmm, if this disable is only required during bit bashing, could we move
it to be set only around when we actually do bit bashing?
> Signed-off-by: Shaohua Li <shaohua.li at intel.com>
> ---
> drivers/gpu/drm/i915/i915_reg.h | 1 +
> drivers/gpu/drm/i915/intel_display.c | 5 +++++
> 2 files changed, 6 insertions(+)
>
> Index: linux/drivers/gpu/drm/i915/i915_reg.h
> ===================================================================
> --- linux.orig/drivers/gpu/drm/i915/i915_reg.h 2009-03-16 14:18:27.000000000 +0800
> +++ linux/drivers/gpu/drm/i915/i915_reg.h 2009-03-16 14:28:09.000000000 +0800
> @@ -523,6 +523,7 @@
> #define DPLLA_INPUT_BUFFER_ENABLE (1 << 0)
> #define D_STATE 0x6104
> #define CG_2D_DIS 0x6200
> +#define DPCUNIT_CLOCK_GATE_DISABLE (1 << 24)
> #define CG_3D_DIS 0x6204
>
> /*
> Index: linux/drivers/gpu/drm/i915/intel_display.c
> ===================================================================
> --- linux.orig/drivers/gpu/drm/i915/intel_display.c 2009-03-16 14:16:11.000000000 +0800
> +++ linux/drivers/gpu/drm/i915/intel_display.c 2009-03-16 14:27:46.000000000 +0800
> @@ -1545,6 +1545,11 @@ static void intel_setup_outputs(struct d
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct drm_connector *connector;
>
> + /* When using bit bashing for I2C, this bit needs to be set to 1 */
> + if (IS_IGD(dev))
> + I915_WRITE(CG_2D_DIS,
> + I915_READ(CG_2D_DIS) | DPCUNIT_CLOCK_GATE_DISABLE);
> +
> intel_crt_init(dev);
>
> /* Set up integrated LVDS */
>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090327/13448b98/attachment.sig>
More information about the Intel-gfx
mailing list