[PATCH v3] dix: adds support for none root window background

Pauli Nieminen ext-pauli.nieminen at nokia.com
Fri Nov 5 02:13:46 PDT 2010


On 04/11/10 20:27 +0100, ext Mark Kettenis wrote:
> > Date: Thu, 4 Nov 2010 17:40:55 +0200
> > From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
> > 
> > On 03/11/10 22:17 +0100, Vignatti Tiago (Nokia-MS/Helsinki) wrote:
> > > It lets the driver notify the server whether it can draw a background when
> > > '-background none' option is used by the system platform. Use cases for that
> > > could be video drivers performing mode-setting in kernel time, before X is up,
> > > so a seamless transition would happen until X clients start to show up.
> > > 
> > > If the driver can copy the framebuffer cleanly then it can set the flag
> > > (canDoBGNoneRoot), otherwise the server will fallback to the normal behaviour.
> > > The system must explicit indicates willingness of doing so through
> > > '-background none'. We could do this option as default; in such case,
> > > malicious users would be able to steal the framebuffer with a bit of tricks.
> > > 
> > > For instance, I can see the content of my nVidia Quadro FX 580 framebuffer
> > > old X session modifying a bit nv driver:
> > > 
> > > --- a/src/g80_driver.c
> > > +++ b/src/g80_driver.c
> > > @@ -850,17 +850,6 @@ G80ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc,
> > > c
> > > 
> > >      xf86DPMSInit(pScreen, xf86DPMSSet, 0);
> > > 
> > > -    /* Clear the screen */
> > > -    if(pNv->xaa) {
> > > -        /* Use the acceleration engine */
> > > -        pNv->xaa->SetupForSolidFill(pScrn, 0, GXcopy, ~0);
> > > -        pNv->xaa->SubsequentSolidFillRect(pScrn,
> > > -            0, 0, pScrn->displayWidth, pNv->offscreenHeight);
> > > -        G80DmaKickoff(pNv);
> > > -    } else {
> > > -        /* Use a slow software clear path */
> > > -        memset(pNv->mem, 0, pitch * pNv->offscreenHeight);
> > > -    }
> > > +    pScreen->canDoBGNoneRoot = TRUE;
> > > 
> > > The commit is originally based on discussions happened on xorg-devel:
> > > http://lists.freedesktop.org/archives/xorg-devel/2010-June/009755.html
> > > 
> > > Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
> > > ---
> > 
> > This patch looks good to me. But I don't know code well so only
> > Acked-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
> 
> Uh, do you really want to make the nv driver show whatever crap is in
> the framebuffer when X starts up?

It happens only with hacked driver that sets canDoBGNoneRoot to TRUE even
tough driver doesn't support it correctly. That why canDoBGNoneRoot is
required to make sure that background is set none only for drivers that can
do right thing (to continue show boot splash)


More information about the xorg-devel mailing list