[wiz at NetBSD.org: [PATCH:xf86-video-glint] Fix DDC2 on PGX32/Raptor 8P]

Thomas Klausner wiz at NetBSD.org
Fri Jul 12 03:30:13 PDT 2013


Hi Alan!

Thanks for the patch. I can't test myself, but have forwarded your
patch to Michael Lorenz, who came up with the original patch. I hope
he'll find time to test it soon.
 Thomas

On Thu, Jul 11, 2013 at 11:55:00AM +0100, Alan wrote:
> I took a quick look and it seems that this bit doesn't exist on PM3,
> only PM2.
> 
> Can you test this alternative patch ?
> 
> Thanks,
> 
> Alan.
> 
> On 07/11/13 10:31, Thomas Klausner wrote:
> >Hi!
> >
> >You're the maintainer according to
> >http://cgit.freedesktop.org/xorg/doc/xorg-docs/tree/MAINTAINERS
> >
> >Can you please take a look at and merge the patch?
> >
> >Thanks,
> >  Thomas
> >
> >----- Forwarded message from Thomas Klausner <wiz at NetBSD.org> -----
> >
> >Date: Tue,  4 Jun 2013 12:38:03 +0200
> >From: Thomas Klausner <wiz at NetBSD.org>
> >To: xorg-devel at lists.x.org
> >Cc: Thomas Klausner <wiz at NetBSD.org>
> >Subject: [PATCH:xf86-video-glint] Fix DDC2 on PGX32/Raptor 8P
> >
> >When doing DDC2 on Permedia2 make sure to clear the USE_MONID bit
> >in the DDCdata register so the i2c bits actually do something.
> > From Michael Lorez <macallan at NetBSD.org>
> >---
> >  src/pm2_dac.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> >diff --git a/src/pm2_dac.c b/src/pm2_dac.c
> >index 85093ff..71a1ff0 100644
> >--- a/src/pm2_dac.c
> >+++ b/src/pm2_dac.c
> >@@ -458,8 +458,9 @@ Permedia2I2CPutBits(I2CBusPtr b, int scl, int sda)
> >  {
> >      GLINTPtr pGlint = (GLINTPtr) b->DriverPrivate.ptr;
> >      int r = (pGlint->DDCBus == b) ? PMDDCData : VSSerialBusControl;
> >-    CARD32 v = GLINT_READ_REG(r) & ~(ClkOut | DataOut);
> >+    CARD32 v = 0;
> >+
> >      if (scl > 0) v |= ClkOut;
> >      if (sda > 0) v |= DataOut;
> 

> diff --git a/src/glint_regs.h b/src/glint_regs.h
> index dda2f2b..1f171fd 100644
> --- a/src/glint_regs.h
> +++ b/src/glint_regs.h
> @@ -293,6 +293,7 @@
>  #define   ClkIn              						(1<<1)
>  #define   DataOut            						(1<<2)
>  #define   ClkOut             						(1<<3)
> +#define   MonitorID							(1<<9)
>  #define PMLineCount							0x3070
>  #define PMFifoControl							0x3078
>  
> diff --git a/src/pm2_dac.c b/src/pm2_dac.c
> index 85093ff..ae9cdf6 100644
> --- a/src/pm2_dac.c
> +++ b/src/pm2_dac.c
> @@ -460,6 +460,13 @@ Permedia2I2CPutBits(I2CBusPtr b, int scl, int sda)
>      int r = (pGlint->DDCBus == b) ? PMDDCData : VSSerialBusControl;
>      CARD32 v = GLINT_READ_REG(r) & ~(ClkOut | DataOut);
>  
> +    /*
> +     * Seems this bit is only on PM2.
> +     */
> +    if (r == PMDDCData) {
> +    	v &= ~MonitorID; /* Clear monitor ID bit to force use of DDC */
> +    }
> +
>      if (scl > 0) v |= ClkOut;
>      if (sda > 0) v |= DataOut;
>  



More information about the xorg-devel mailing list