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

Pauli Nieminen ext-pauli.nieminen at nokia.com
Thu Nov 4 08:40:55 PDT 2010


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>


More information about the xorg-devel mailing list