Bug#514395: LUT settings are not restored after switching to console.

Kurt Roeckx kurt at roeckx.be
Wed Feb 11 13:11:04 PST 2009


On Wed, Feb 11, 2009 at 06:55:15PM +0100, Michel D?nzer wrote:
> On Wed, 2009-02-11 at 18:35 +0100, Kurt Roeckx wrote:
> > > 
> > > > or atleast get them restored when switching back to X.
> > > 
> > > What method does dispwin use for changing the LUT settings?
> > 
> > It uses this for randr 1.2:
> >                 XRRCrtcGamma *crtcgam;
> > 
> >                 debugr("Setting gamma using Randr 1.2\n");
> > 
> >                 if ((crtcgam = XRRAllocGamma(r->nent)) == NULL) {
> >                         debugr(" XRRAllocGamma failed\n");
> >                         return 1;
> >                 }
> > 
> >                 for (i = 0; i < r->nent; i++) {
> >                         crtcgam->red[i]   = vals[0][i];
> >                         crtcgam->green[i] = vals[1][i];
> >                         crtcgam->blue[i]  = vals[2][i];
> >                 }
> > 
> >                 XRRSetCrtcGamma(p->mydisplay, p->crtc, crtcgam);
> >                 XSync(p->mydisplay, False);             /* Flush the change out */
> > 
> >                 XRRFreeGamma(crtcgam);
> > 
> > Else it would use XF86VidModeSetGammaRamp()
> 
> At least with RandR 1.2, I suspect this could be an issue in the X
> server rather than the driver.

I've tried using xgamma (from x11-xserver-utils 7.3+5) and then the setting
are kept.  xgamma uses the XF86VidModeSetGamma() call.

I've rebuild dispwin so it uses the XF86VidModeSetGammaRamp() call instead
and then the settings are also kept.


Kurt






More information about the xorg-driver-ati mailing list