summaryrefslogtreecommitdiff
path: root/hw/xfree86/common
AgeCommit message (Collapse)AuthorFilesLines
2018-08-02xorg: Remove the XF86PM define.Eric Anholt2-14/+0
We already have pm_noop.c being built most of the time for the no-OS-PM case, so just switch to always using it. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-06-28modesetting: Allow a DRM fd to be passed on command line with -masterfd [v2]Keith Packard2-0/+3
This lets an application open a suitable DRM device and pass the file descriptor to the mode setting driver through an X server command line option, '-masterfd'. There's a companion application, xlease, which creates a DRM master by leasing an output from another X server. That is available at git clone git://people.freedesktop.org/~keithp/xlease v2: Always print usage, but note that it can't be used if setuid/gid Suggested-by: Lyude Paul <lyude@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
2018-06-11xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on alphaMatt Turner1-18/+49
In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the function pointer indirection was intended to support dense vs sparse and sparse support is now gone, we can just make the functions static inline in compiler.h and avoid all of this. Bugzilla: https://bugs.gentoo.org/548906 Tested-by: Christopher May-Townsend <chris@maytownsend.co.uk> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com>
2018-04-03xfree86: Restore newline before "X Protocol Version" stringAaron Plattner1-1/+1
The newline before the protocl version got lost in commit 6cbefc3e0a33b380c147c533914437c7798d9b93. Prior to that commit, the release date printed a newline at the end: X.Org X Server 1.19.6 Release Date: 2017-12-20 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.14.12-1-ARCH x86_64 Now, that string gets run together with the version: X.Org X Server 1.19.99.903 (1.20.0 RC 3)X Protocol Version 11, Revision 0 Build Operating System: Linux Since the version string printing has a variety of #ifdefs in it, just add the newline to the begining of the protocol version string. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-03-28xfree86: Add Option "Debug" to ServerFlagsAdam Jackson2-0/+6
This provides a generic way to control obscure runtime behavior knobs without making interface promises. Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-03-27meson: Add libdrm to hw/xfree86/common's dependenciesAdam Jackson1-0/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
2018-03-27autotools: Stop caring about XORG_DATEAdam Jackson1-4/+0
Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
2018-03-21xfree86: replace all uses of xf86PrivsElevated with PrivsElevatedNicolai Hähnle2-4/+4
[... but leave it defined and exported, since we're ABI-frozen - ajax] Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Ben Crocker <bcrocker@redhat.com> Reviewed-by: Antoine Martin <antoine@nagafix.co.uk> Tested-by: Ben Crocker <bcrocker@redhat.com> restore abi
2018-03-21os: move xf86PrivsElevated hereNicolai Hähnle1-58/+1
Having different types of code all trying to check for elevated privileges is a bad idea. This implementation is the most thorough one. Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Reviewed-by: Ben Crocker <bcrocker@redhat.com> Reviewed-by: Antoine Martin <antoine@nagafix.co.uk> Tested-by: Ben Crocker <bcrocker@redhat.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2018-03-05glamor: Implement GetSupportedModifiersLouis-Francis Ratté-Boulianne1-0/+1
Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible v5: Fix memory corruption in XWayland (uninitialized pointer) Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-19dga: #if XFreeXDGA → #ifdef XFreeXDGALaurent Carlier1-3/+3
../include/events.h:32:14: error: #if with no expression Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
2018-02-14glx: Use vnd layer for dispatch (v4)Adam Jackson1-1/+1
The big change here is MakeCurrent and context tag tracking. We now delegate context tags entirely to the vnd layer, and simply store a pointer to the context state as the tag data. If a context is deleted while it's current, we allocate a fake ID for the context and move the context state there, so the tag data still points to a real context. As a result we can stop trying so hard to detach the client from contexts at disconnect time and just let resource destruction handle it. Since vnd handles all the MakeCurrent protocol now, our request handlers for it can just be return BadImplementation. We also remove a bunch of LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already allocated its tracking resource on that XID. v2: Update to match v2 of the vnd import, and remove more redundant work like request length checks. v3: Add/remove the XID map from the vendor private thunk, not the backend. (Kyle Brenneman) v4: Fix deletion of ghost contexts (Kyle Brenneman) Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-05xfree86: Only call PreInit handler if it exists for deviceJeff Smith1-1/+2
DoConfigure() attempts to call the PreInit handler on a device without checking that the handler exists. Check that the PreInit handler exists for a device before attempting to call it. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-05xfree86: Allocate sufficienct space for dev2screen arrayJeff Smith1-1/+1
When the dev2screen is sized to xf86NumDrivers in DoConfigure(), subsequent code may attempt to write past the end of the array. Size the dev2screen array to nDevToConfig instead. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-05xfree86: Do not use uninitialized pointer during probeJeff Smith1-3/+4
Commits b5dffbb and d75ffcd introduce code in xf86platformProbe() that references a member of xf86configptr. However, when using the "-configure" option, xf86configptr may not be initialized when xf86platformProbe() is called. Avoid referencing a member of xf86configptr if uninitialized. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100405 Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2018-02-02xfree86: Silence always true condition warning.Michal Srb1-5/+1
xf86pciBus.c:1464:21: warning: comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] if (pVideo->bus < 256) The code used to be in xf86FormatPciBusNumber and compared parameter which was int, but since b967bf2a it was inlined now it works with uint8_t.
2018-01-29xfree86: Remove broken RANDR disabling logic (v4)Adam Jackson7-36/+18
The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) v4: Check whether the RANDR private key is initialized before trying to use it to look up the screen private. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2018-01-24Revert "xfree86: Remove broken RANDR disabling logic (v3)"Adam Jackson7-7/+33
Tsk. This broke vesa for me, the rrGetScrPriv in InitOutput will crash if randr's screen private key hasn't been initialized yet. That seems dumb, but let's not leave it broken. This reverts commit c08d7c1cdde6a844338ed4c3645b00bf25843a31.
2018-01-24xfree86: Remove broken RANDR disabling logic (v3)Adam Jackson7-33/+7
The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
2018-01-24xf86XvMCScreenInit: Clear pScreenPriv->dixinfo when freeing pAdaptMichel Dänzer1-0/+1
Fixes double-free later in xf86XvMCCloseScreen, which would generally cause fireworks. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2018-01-18xfree86: add default modes for 16:9 and 16:10Martin Wilck1-0/+141
Improve the user experience for users with wide screens by adding standard 16:9 and 16:10 modes to extramodes, as suggested previously (https://lists.x.org/archives/xorg-devel/2016-February/048866.html). Tested successfully on my laptop. Feedback welcome. See also https://bugs.freedesktop.org/show_bug.cgi?id=37858. Signed-off-by: Martin Wilck <mwilck@suse.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-12-13xfree86: Hold input_lock across SPRITE functions in VGA arbiterKeith Packard1-7/+13
Avoid scrambling the sprite functions wrapper. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101995 Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-12-13xfree86: remove xf86CaughtSignal etc.Adam Jackson7-37/+3
This no longer does anything useful. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-13xfree86: Remove xf86InterceptSignalsAdam Jackson2-15/+0
The only consumer of this is the Linux vm86 backend for int10 (which you should not use), and there all it serves to do is make signals generated by the vm86 task non-fatal. In practice this error appears never to happen, and marching ahead with root privileges after arbitrary code has raised a signal seems like a poor plan. Remove the usage in the vm86 code, making this error fatal. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-12-13xfree86: Remove xf86InterceptSigIllAdam Jackson2-14/+0
This was added in ~2004 for the sis driver, to detect whether it could use SSE for memcpy. Charmingly, the code to check whether that feature exists in the server is: #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0) #define SISCHECKOSSSE /* Automatic check OS for SSE; requires SigIll facility */ #endif Which means it has never worked in any modular server release. A less gross way to do this is to check for SSE support with getauxval() or /proc/cpuinfo or similar. Since no driver is using the existing intercept mechanism, drop it. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
2017-10-30Use ARRAY_SIZE all over the treeDaniel Martin3-4/+4
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with the ARRAY_SIZE macro from dix.h when possible. A semantic patch for coccinelle has been used first. Additionally, a few macros have been inlined as they had only one or two users. Signed-off-by: Daniel Martin <consume.noise@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-10hw/xfree86: unvalidated lengthsNathan Kidd1-35/+46
This addresses: CVE-2017-12180 in XFree86-VidModeExtension CVE-2017-12181 in XFree86-DGA CVE-2017-12182 in XFree86-DRI Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Nathan Kidd <nkidd@opentext.com> Signed-off-by: Julien Cristau <jcristau@debian.org>
2017-09-13meson: Move the BUILD_DATE/TIME setup to configure time.Eric Anholt1-4/+2
By having it as a custom_target with build_always, every "ninja -C build" would rebuild Xorg for the new date/time, even if the rest of Xorg didn't change. We could build the rest of Xorg into a static lib, and regenerate date/time when the static lib changes and link that into a final Xorg, but BUILD_DATE/TIME is such a dubious feature (compared to including a git sha, which is easy with meson) it doesn't seem worth the build time cost. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-13meson: Include BUILD_DATE in the meson xf86Build.h.Eric Anholt1-1/+1
Due to a typo, I only had BUILD_TIME present. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-09-13meson: Respect SOURCE_DATE_EPOCH for reproducible builds.Eric Anholt1-2/+9
This just copies over Chris Lamb's code from autotools. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-07-31xfree86: Fix X -configure driver sort yet againAdam Jackson1-6/+5
There were two bugs here: The comparison function was not stable when one or more of the drivers being compared is a fallback, and the last driver in the list would never be moved. Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-06-22xfree86: Move DRICreatePCIBusID to xf86Pci.hAdam Jackson1-2/+0
xf86str.h is parsed into sdksyms unconditionally but the symbol is only defined when building with PCI support. Move the decl to a header that sdksyms only parses when building PCI support. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
2017-06-20xfree86: Move DRICreatePCIBusID to the PCI codeAdam Jackson2-0/+14
This symbol is used by some DRI2+ drivers and there's nothing DRI1-specific about it. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
2017-06-20xfree86: Remove unused xf86EnableVTSwitchAdam Jackson2-42/+3
Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com>
2017-06-20xfree86: Fix printing of PCI domain/bus in xf86MatchPciInstancesMichel Dänzer1-1/+1
It was attempting to use the <bus>@<domain> format accepted by the BusID stanza, but the two values were swapped. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2017-06-20xfree86: Print BusID stanza compatible bus IDs for found devicesMichel Dänzer1-2/+2
The PCI domain has to be specified like this: "PCI:<bus>@<domain>:<device>:<function>" Example before: (--) PCI:*(0:0:1:0) 1002:130f:1043:85cb [...] (--) PCI: (0:1:0:0) 1002:6939:1458:229d [...] after: (--) PCI:*(0@0:1:0) 1002:130f:1043:85cb [...] (--) PCI: (1@0:0:0) 1002:6939:1458:229d [...] Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2017-05-29xfree86: up the path name size to 512 in xf86MatchDriverFromFilesPeter Hutterer1-1/+1
./hw/xfree86/common/xf86pciBus.c: In function ‘xf86MatchDriverFromFiles’: ../hw/xfree86/common/xf86pciBus.c:1330:52: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(path_name, sizeof(path_name), "%s/%s", ^~~~~~~ ../hw/xfree86/common/xf86pciBus.c:1330:13: note: ‘snprintf’ output between 2 dirent->d_name is 256, so sprintf("%s/%s") into a 256 buffer gives us: and 257 bytes into a destination of size 256 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-15xfree86: Hide unused variables when !XSERVER_LIBPCIACCESSJon Turney1-0/+2
../hw/xfree86/common/xf86Config.c: In function ‘xf86HandleConfigFile’: ../hw/xfree86/common/xf86Config.c:2278:10: warning: unused variable ‘singlecard’ [-Wunused-variable] ../hw/xfree86/common/xf86Config.c:2277:17: warning: unused variable ‘scanptr’ [-Wunused-variable] Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
2017-05-11Replace all checks for 'linux' macro with '__linux__'Julien Cristau5-11/+11
gcc -std=c99 does not define the former, and it's a horrible namespace confusion anyway. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Tested-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2017-05-09xfree86: Improved autoconfig drivers matchingKarol Kosik8-118/+153
Implementation of new drivers matching algorithm. New approach doesn't add duplicate drivers and ease drivers matching phase. v2: Re-commit the patch reverted in 2388f5e583d4ab2ee12f2b087d381b64aed3f7d5, with Aaron Plattner's fix squashed in (by anholt). Signed-off-by: Karol Kosik <kkosik@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> (v1) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> (v1) Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Eric Anholt <eric@anholt.net>
2017-05-09Revert "xfree86: Improved autoconfig drivers matching"Eric Anholt8-153/+118
This reverts commit 112d0d7d01b98fb0d67910281dd1feeec125247b. It broke Xorg for Adam, Peter, and myself, by failing hard when a module load failed. Signed-off-by: Eric Anholt <eric@anholt.net>
2017-05-03xfree86: Silence a new glibc warningAdam Jackson1-0/+3
glibc would like to stop declaring major()/minor() macros in <sys/types.h> because that header gets included absolutely everywhere and unix device major/minor is perhaps usually not what's expected. Fair enough. If one includes <sys/sysmacros.h> as well then glibc knows we meant it and doesn't warn, so do that if it exists. Signed-off-by: Adam Jackson <ajax@redhat.com>
2017-04-27xfree86: Improved autoconfig drivers matchingKarol Kosik8-118/+153
Implementation of new drivers matching algorithm. New approach doesn't add duplicate drivers and ease drivers matching phase. Signed-off-by: Karol Kosik <kkosik@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2017-04-26Add a Meson build system alongside autotools.Eric Anholt2-0/+99
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. The intent is to build this as a complete replacement for the autotools system, then eventually replace autotools. meson is faster to generate the build, faster to run the bulid, shorter to write the build files in, and less error-prone than autotools. v2: Fix indentation nits, move version declaration to project(), use existing meson_options for version-config.h's vendor name/web. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26Use #ifdef instead of #if for features to make Meson easier.Eric Anholt1-1/+1
We mostly use #ifdef throughout the tree, and this lets the generated config.h files just be #define TOKEN instead of #define TOKEN 1. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2017-04-26os: Handle SIGABRTMichel Dänzer1-0/+1
Without this, assertion failures can make life hard for users and those trying to help them. v2: * Change commit log wording slightly to "can make life hard", since apparently e.g. logind can alleviate that somewhat. * Set default handler for SIGABRT in hw/xfree86/common/xf86Init.c:InstallSignalHandlers() and hw/xquartz/quartz.c:QuartzInitOutput() (Eric Anholt) Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2017-04-25xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c.Eric Anholt1-3/+3
parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed __XCONFIGFILE__ to anything else, it would have got out of sync. Settle on the name without gratuitous underscores. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com>
2017-03-30xfree86: Remove driver entity hooks and privateAdam Jackson9-70/+6
No driver is using these, as far as I know. v2: Tripwire the entity hook arguments to xf86Config*Entity, fix documentation (Eric Anholt) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-27dpms: Consolidate a bunch of stuff into Xext/dpms.cAdam Jackson1-1/+3
Most of this is a legacy of the old "extmod" design where you could load _some_ extensions dynamically but only if the server had been built with support for them in the first place. Note that since we now only initialize the DPMS extension if at least one screen supports it, we no longer need DPMSCapableFlag: if it would be false, we would never read its value. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-27dix: Lift DPMS to a screen hookAdam Jackson1-75/+14
Following on from the previous change, this adds a DPMS hook to the ScreenRec and uses that to infer DPMS support. As a result we can drop the dpms stub code from Xext. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net>