078653906133486a20536a942ff2b4b05d84c84d
[openembedded.git] / recipes / xorg-driver / xf86-video-omapfb / 0001-omapfb-driver-hack-out-dpms-for-xorg-1.7.x.patch
1 From 8dba6751950f65292c5f8a562e282045e9fe0803 Mon Sep 17 00:00:00 2001
2 From: Koen Kooi <koen@dominion.thruhere.net>
3 Date: Tue, 22 Dec 2009 21:35:00 +0100
4 Subject: [PATCH 1/2] omapfb-driver: hack out dpms for xorg 1.7.x
5
6 ---
7  src/omapfb-driver.c |   41 -----------------------------------------
8  1 files changed, 0 insertions(+), 41 deletions(-)
9
10 diff --git a/src/omapfb-driver.c b/src/omapfb-driver.c
11 index a9d5fbc..ffa0df4 100644
12 --- a/src/omapfb-driver.c
13 +++ b/src/omapfb-driver.c
14 @@ -41,9 +41,6 @@
15  
16  #include "exa.h"
17  
18 -#define DPMS_SERVER
19 -#include <X11/extensions/dpms.h>
20 -
21  #include <linux/fb.h>
22  
23  /* TODO: we'd like this to come from kernel headers, but that's not a good
24 @@ -502,7 +499,6 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
25  
26         /* Load the fallback module */
27         xf86LoadSubModule(pScrn, "fb");
28 -       xf86LoaderReqSymLists(fbSymbols, NULL);
29  
30         /* Initialize fallbacks for the screen */
31         if (!fbScreenInit(pScreen, ofb->fb, pScrn->virtualX,
32 @@ -580,13 +576,9 @@ OMAPFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
33         /* NO-OP currently */
34         pScreen->SaveScreen = OMAPFBSaveScreen;
35         
36 -       /* Setup DPMS support */
37 -       xf86DPMSInit(pScreen, OMAPFBDPMSSet, 0);
38 -       
39  #ifdef USE_EXA
40         /* EXA init */
41         xf86LoadSubModule(pScrn, "exa");
42 -       xf86LoaderReqSymLists(exaSymbols, NULL);
43  
44         /* TODO: This should depend on the AccelMethod option */
45         ofb->exa = exaDriverAlloc();
46 @@ -723,38 +715,6 @@ static Bool OMAPFBSwitchMode(int scrnIndex, DisplayModePtr mode, int flags)
47         return TRUE;
48  }
49  
50 -static void
51 -OMAPFBDPMSSet(ScrnInfoPtr pScrn, int mode, int flags)
52 -{
53 -       OMAPFBPtr ofb = OMAPFB(pScrn);
54 -
55 -       switch (mode) {
56 -               case DPMSModeOn:
57 -                       if (ioctl(ofb->fd, FBIOBLANK, (void *)VESA_NO_BLANKING)) {
58 -                               xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
59 -                                          "FBIOBLANK: %s\n", strerror(errno));
60 -                       }
61 -                       break;
62 -               case DPMSModeStandby:
63 -               case DPMSModeSuspend:
64 -                       /* TODO: Maybe we would want to use the above modes for
65 -                        * dimming the LCD? That'd match the functionality
66 -                        * (save power)
67 -                        */
68 -               case DPMSModeOff:
69 -                       /* OMAPFB only supports on and off */
70 -                       if (ioctl(ofb->fd, FBIOBLANK, (void *)VESA_POWERDOWN)) {
71 -                               xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
72 -                                          "FBIOBLANK: %s\n", strerror(errno));
73 -                       }
74 -                       break;
75 -                       break;
76 -               default:
77 -                       return;
78 -       }
79 -
80 -}
81 -
82  void
83  OMAPFBPrintCapabilities(ScrnInfoPtr pScrn,
84                          struct omapfb_caps *caps,
85 @@ -879,7 +839,6 @@ OMAPFBSetup(pointer module, pointer opts, int *errmaj, int *errmin)
86         if (!setupDone) {
87                 setupDone = TRUE;
88                 xf86AddDriver(&OMAPFB, module, HaveDriverFuncs);
89 -               LoaderRefSymLists(fbSymbols, NULL);
90                 return (pointer)1;
91         } else {
92                 if (errmaj) *errmaj = LDR_ONCEONLY;
93 -- 
94 1.6.5
95