[Intel-gfx] [PATCH 2/2]IGD: workaround i2c bus issue in gfx driver side

Wang, Zhenyu Z zhenyu.z.wang at intel.com
Mon Mar 16 08:25:41 CET 2009


On 2009.03.16 15:23:26 +0800, Li, Shaohua wrote:
> On Mon, Mar 16, 2009 at 03:02:28PM +0800, Wang, Zhenyu Z wrote:
> > On 2009.03.16 14:45:28 +0800, Shaohua Li wrote:
> > > In IGD, DPCUNIT_CLOCK_GATE_DISABLE bit should be set, otherwise i2c
> > > access will be wrong.
> > > 
> > > Signed-off-by: Shaohua Li <shaohua.li at intel.com>
> > > ---
> > >  src/i830_driver.c |    5 +++++
> > >  1 file changed, 5 insertions(+)
> > > 
> > > Index: xf86_video_intel/src/i830_driver.c
> > > ===================================================================
> > > --- xf86_video_intel.orig/src/i830_driver.c
> > > +++ xf86_video_intel/src/i830_driver.c
> > > @@ -1057,6 +1057,11 @@ I830PreInitDDC(ScrnInfoPtr pScrn)
> > >  	 pI830->ddc2 = FALSE;
> > >        }
> > >     }
> > > +
> > > +  if (IS_IGD(pI830)) {
> > > +        /* Driver is using bit bashing for I2C, this bit should be set to 1 */
> > > +        OUTREG(DSPCLK_GATE_D, INREG(DSPCLK_GATE_D) | DPCUNIT_CLOCK_GATE_DISABLE);
> > > +    }
> > >  }
> > >  
> > >  static void
> > 
> > Looks this should be in i830_init_clock_gating(), and KMS needs to be ported as well. 
> i830_init_clock_gating() is called a little later. The bit must be set
> before any I2C access.

ok, but it still needs to be added in i830_init_clock_gating() for VT switch right?
I would suggest to call it before UMS init, as I think future chips might have more
same problems too, that we can keep this info in one place. Ideas?

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090316/0e7d53d9/attachment.sig>


More information about the Intel-gfx mailing list