xserver-multidpi/os
Tiago Vignatti 8976e9766e dix: adds support for none root window background
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:

     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@nokia.com>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Acked-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-11-11 23:24:43 +02:00
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
access.c os: Clean up various xtrans bits that we've never supported 2010-10-15 16:50:23 -04:00
auth.c Constify function prototypes in auth & xdmcp code 2010-05-07 12:22:58 -07:00
backtrace.c Miscellaneous compilation warning fixes 2009-12-08 15:50:28 -08:00
connection.c os: Clean up various xtrans bits that we've never supported 2010-10-15 16:50:23 -04:00
io.c os: Fix BigReq ignoring when another request is pending 2010-11-10 14:58:28 -08:00
log.c Merge remote branch 'whot/for-keith' 2010-11-10 16:58:21 -08:00
Makefile.am os: Prevent backtrace from being stopped in noreturn functions. 2010-03-25 06:03:43 +01:00
mitauth.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
oscolor.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
osdep.h os: Return BadLength instead of disconnecting BigReq clients (#4565) 2010-09-10 11:48:17 -07:00
osinit.c os: simplify smart scheduler init process 2010-09-10 21:49:29 +03:00
rpcauth.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
strcasecmp.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
strcasestr.c Remove unnecessary parentheses around return values in functions 2010-06-10 06:42:42 -07:00
strlcat.c os: include dix-config.h, not xorg-config.h 2010-11-11 08:41:38 +10:00
strlcpy.c os: include dix-config.h, not xorg-config.h 2010-11-11 08:41:38 +10:00
utils.c dix: adds support for none root window background 2010-11-11 23:24:43 +02:00
WaitFor.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xdmauth.c Replace deprecated bzero with memset 2010-06-06 15:07:27 +07:00
xdmcp.c os: Clean up various xtrans bits that we've never supported 2010-10-15 16:50:23 -04:00
xprintf.c Use lowercase variant of XNFalloc and Xstrdup 2010-05-13 00:22:37 +07:00
xsha1.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xstrans.c Change HAVE_CONFIG_H to HAVE_DIX_CONFIG_H. 2005-07-03 12:16:29 +00:00