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

Kurt Roeckx kurt at roeckx.be
Wed Feb 11 09:35:53 PST 2009


On Wed, Feb 11, 2009 at 10:30:30AM +0100, Michel Dänzer wrote:
> On Sat, 2009-02-07 at 01:37 +0100, Kurt Roeckx wrote:
> > 
> > I'm using a tool called dispwin from the argyll packages (not yet in
> > Debian), to change the VideoLUT settings.  This all works like it should.
> > 
> > My problem now is that when I switch from X to console and then back to X
> > those settings are removed and not restored.
> > 
> > I would either like to see them stay the way they are when switching
> > to the console,
> 
> That's not really possible; the X driver is supposed to save and restore
> the console hardware state unmodified.
> 
> > 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()


Kurt






More information about the xorg-driver-ati mailing list