[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

unblock request: xserver-xorg-video-geode



Greetings,

I realize that we are pretty deep into the freeze, but since the
unstable package includes some hardware support fixes, some of which
specifically affect the OLPC, I figured that I might as well ask
anyway, just in case. The changes between 2.11.9-5 and 2.11.9-7 are as
follow:

+  * Merged patch from upstream GIT:
+    - Move eCafe EC800 support to panel-only BIOS-dependant feature.

Not essential, but given how we've been trying to properly support
this laptop for ages (see #591364 for instance), might be worth
including.

+    - Replace custom Geode offscreen allocation with standard EXA calls.

Long requested by X core developers and finally implemented by AMD developers.

+    - Add lx_output_get_crtc to prevent driver reset with unknown CRTC.
+    - Prevent OLPC DCON from sleeping when it's in frozen state.

Both changes specifically aim at fixing OLPC issues, although the
first one benefits others too.

The debdiff is attached. It includes one patch that was renamed
between these two releases.

Best Regards,
Martin-Éric
diff -u xserver-xorg-video-geode-2.11.9/debian/changelog xserver-xorg-video-geode-2.11.9/debian/changelog
--- xserver-xorg-video-geode-2.11.9/debian/changelog
+++ xserver-xorg-video-geode-2.11.9/debian/changelog
@@ -1,3 +1,19 @@
+xserver-xorg-video-geode (2.11.9-7) unstable; urgency=low
+
+  * Merged patch from upstream GIT:
+    - Move eCafe EC800 support to panel-only BIOS-dependant feature.
+
+ -- Martin-Éric Racine <q-funk@iki.fi>  Thu, 28 Oct 2010 13:01:52 +0300
+
+xserver-xorg-video-geode (2.11.9-6) unstable; urgency=low
+
+  * Merged patches from upstream GIT:
+    - Replace custom Geode offscreen allocation with standard EXA calls.
+    - Add lx_output_get_crtc to prevent driver reset with unknown CRTC.
+    - Prevent OLPC DCON from sleeping when it's in frozen state.
+
+ -- Martin-Éric Racine <q-funk@iki.fi>  Wed, 27 Oct 2010 19:00:17 +0300
+
 xserver-xorg-video-geode (2.11.9-5) unstable; urgency=low
 
   * Merged patches from upstream GIT:
reverted:
--- xserver-xorg-video-geode-2.11.9/debian/patches/003_sync_mode_typo.patch
+++ xserver-xorg-video-geode-2.11.9.orig/debian/patches/003_sync_mode_typo.patch
@@ -1,24 +0,0 @@
-From becaa0ae375e996c2f83192bb84a5c89f94933dd Mon Sep 17 00:00:00 2001
-From: Frank Huang <frankr.huang@amd.com>
-Date: Wed, 29 Sep 2010 08:45:42 +0000
-Subject: Fix a typo on resolution parameter
-
-*change from 1028 to 1280
-
-Signed-off-by: Frank Huang <frankr.huang@amd.com>
----
-diff --git a/src/lx_panel.c b/src/lx_panel.c
-index f1d0686..2e076d4 100644
---- a/src/lx_panel.c
-+++ b/src/lx_panel.c
-@@ -63,7 +63,7 @@ DisplayModeRec lx_panel_modes[] = {
-     {MODEPREFIX, 81600, 1152, 1216, 1336, 1520, 0, 864, 865, 868, 895, 0,
- 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
-     ,				       /* 1152x864@60 */
--    {MODEPREFIX, 108000, 1028, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
-+    {MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
- 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
-     ,				       /* 1280x1024@60 */
-     {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
---
-cgit v0.8.3-6-g21f6
reverted:
--- xserver-xorg-video-geode-2.11.9/debian/patches/001_fix_DCON_detection.patch
+++ xserver-xorg-video-geode-2.11.9.orig/debian/patches/001_fix_DCON_detection.patch
@@ -1,33 +0,0 @@
-Date: Mon, 20 Sep 2010 11:31:29 -0700
-From: Andres Salomon <dilinger@queued.net>
-Subject: fix the DCON verification loop for LX output
-
-This is pretty clearly a bug. This should fix it (after all, that
-check is merely to see if the panel is a DCON; we don't care at
-all about the panel bit). This also adds an extra parenthesis in 
-the following if() statement for clarity.
-
-I'm resisting the temptation to change GeodeRec's Output member to
-an unsigned long (for now). Bitfields should really be unsigned.
-
-Signed-off-by: Andres Salomon <dilinger@queued.net>
-
---- a/src/lx_output.c	2010-09-20 18:03:52.000000000 +0000
-+++ b/src/lx_output.c	2010-09-20 18:23:41.000000000 +0000
-@@ -156,13 +156,13 @@
-     GeodeRec *pGeode = GEODEPTR(pScrni);
- 
-     /* DCON Panel specific resolution - OLPC's one */
--    if (pGeode->Output & (OUTPUT_PANEL | OUTPUT_DCON)) {
-+    if (pGeode->Output & OUTPUT_DCON) {
-         if (pGeode->panelMode->HDisplay == 1200 &&
-             pGeode->panelMode->VDisplay == 900)
-             return MODE_OK;
-     }
- 
--    if (pGeode->Output & OUTPUT_PANEL &&
-+    if ((pGeode->Output & OUTPUT_PANEL) &&
-         gfx_is_panel_mode_supported(pGeode->panelMode->HDisplay,
-                                     pGeode->panelMode->VDisplay,
-                                     pMode->HDisplay,
-
only in patch2:
unchanged:
--- xserver-xorg-video-geode-2.11.9.orig/debian/patches/006_replace_custom_with_EXA.patch
+++ xserver-xorg-video-geode-2.11.9/debian/patches/006_replace_custom_with_EXA.patch
@@ -0,0 +1,168 @@
+From 5e72a00ad26f2052bb48fef041d6fbd14ba18153 Mon Sep 17 00:00:00 2001
+From: Hunk Cui <Hunk.Cui@amd.com>
+Date: Wed, 13 Oct 2010 10:26:52 +0000
+Subject: Allocate video memory with exaOffscreenAlloc
+
+*Del for deduct the probable size of a video overlay.
+*Use exaOffscreenAlloc allocate the video overlay.
+*Use exaOffscreenAlloc allocate the offscreen surface.
+*XV-video data has to be allocate in offscreen memory range.
+
+Signed-off-by: Hunk Cui <Hunk.Cui@amd.com>
+---
+diff --git a/src/lx_memory.c b/src/lx_memory.c
+index 3de7886..d833caa 100644
+--- a/src/lx_memory.c
++++ b/src/lx_memory.c
+@@ -247,9 +247,6 @@ LXInitOffscreen(ScrnInfoPtr pScrni)
+ 	/* Get the amount of offscreen memory still left */
+ 	size = GeodeOffscreenFreeSize(pGeode);
+ 
+-	/* Deduct the maxmimum size of a video overlay */
+-	size -= 0x200000;	
+-
+ 	/* Align the size to a K boundary */	
+ 	size &= ~1023;
+ 
+diff --git a/src/lx_video.c b/src/lx_video.c
+index 76c38ca..7b51c5b 100644
+--- a/src/lx_video.c
++++ b/src/lx_video.c
+@@ -99,7 +99,7 @@ static XF86ImageRec Images[] = {
+ 
+ typedef struct
+ {
+-    GeodeMemPtr vidmem;
++    ExaOffscreenArea *vidmem;
+     RegionRec clip;
+     CARD32 filter;
+     CARD32 colorKey;
+@@ -188,13 +188,16 @@ struct
+ /* Copy planar YUV data */
+ 
+ static Bool
+-LXAllocMem(GeodeRec *pGeode, GeodePortPrivRec *pPriv, int size)
++LXAllocateVidMem(ScrnInfoPtr pScrni, GeodePortPrivRec *pPriv, int size)
+ {
+     if (!pPriv->vidmem || pPriv->vidmem->size < size) { 
+-	if (pPriv->vidmem) 
+-		GeodeFreeOffscreen(pGeode, pPriv->vidmem);
++	if (pPriv->vidmem) {
++		exaOffscreenFree(pScrni->pScreen, pPriv->vidmem);
++		pPriv->vidmem = NULL;
++	}
+ 
+-    	pPriv->vidmem = GeodeAllocOffscreen(pGeode, size, 4);
++	pPriv->vidmem = exaOffscreenAlloc(pScrni->pScreen, size, 4,
++			TRUE, NULL, NULL);
+ 
+     	if (pPriv->vidmem == NULL) {
+ 		ErrorF("Could not allocate memory for the video\n");
+@@ -236,8 +239,10 @@ LXCopyPlanar(ScrnInfoPtr pScrni, int id, unsigned char *buf,
+     size = YDstPitch * height;
+     size += UVDstPitch * height;
+ 
+-    if (LXAllocMem(pGeode, pPriv, size) == FALSE)
++    if (LXAllocateVidMem(pScrni, pPriv, size) == FALSE) {
++	ErrorF("Error allocating an offscreen Planar region.\n");
+ 	return FALSE;
++    }
+ 
+     /* The top of the source region we want to copy */
+     top = y1 & ~1;
+@@ -297,8 +302,10 @@ LXCopyPacked(ScrnInfoPtr pScrni, int id, unsigned char *buf,
+ 
+     lines = ((dstPitch * height) + pGeode->Pitch - 1) / pGeode->Pitch;
+ 
+-    if (LXAllocMem(pGeode, pPriv, lines) == FALSE)
++    if (LXAllocateVidMem(pScrni, pPriv, lines) == FALSE) {
++	ErrorF("Error allocating an offscreen Packed region.\n");
+ 	return FALSE;
++    }
+ 
+     /* The top of the source region we want to copy */
+     top = y1;
+@@ -578,7 +585,6 @@ static void
+ LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit)
+ {
+     GeodePortPrivRec *pPriv = (GeodePortPrivRec *) data;
+-    GeodeRec *pGeode = GEODEPTR(pScrni);
+ 
+     if (pPriv->videoStatus == 0)
+ 	return;
+@@ -597,7 +603,7 @@ LXStopVideo(ScrnInfoPtr pScrni, pointer data, Bool exit)
+ 	}
+ 
+ 	if (pPriv->vidmem) {
+-	    GeodeFreeOffscreen(pGeode, pPriv->vidmem);
++	    exaOffscreenFree(pScrni->pScreen, pPriv->vidmem);
+ 	    pPriv->vidmem = NULL;
+ 	}
+ 
+@@ -659,7 +665,7 @@ LXVidBlockHandler(int i, pointer blockData, pointer pTimeout,
+ 	    if (pPriv->freeTime < now) {
+ 
+ 		if (pPriv->vidmem) {
+-		    GeodeFreeOffscreen(pGeode, pPriv->vidmem);
++		    exaOffscreenFree(pScrni->pScreen, pPriv->vidmem);
+ 		    pPriv->vidmem = NULL;
+ 		}
+ 
+@@ -742,7 +748,7 @@ LXSetupImageVideo(ScreenPtr pScrn)
+ 
+ struct OffscreenPrivRec
+ {
+-    GeodeMemPtr vidmem;
++    ExaOffscreenArea *vidmem;
+     Bool isOn;
+ };
+ 
+@@ -800,7 +806,7 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w,
+ {
+     GeodeRec *pGeode = GEODEPTR(pScrni);
+     int pitch, lines;
+-    GeodeMemPtr vidmem;
++    ExaOffscreenArea *vidmem;
+     struct OffscreenPrivRec *pPriv;
+ 
+     if (w > 1024 || h > 1024)
+@@ -812,7 +818,8 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w,
+     pitch = ((w << 1) + 15) & ~15;
+     lines = ((pitch * h) + (pGeode->Pitch - 1)) / pGeode->Pitch;
+ 
+-    vidmem = GeodeAllocOffscreen(pGeode, lines, 4);
++    vidmem = exaOffscreenAlloc(pScrni->pScreen, lines, 4, TRUE,
++		NULL, NULL);
+ 
+     if (vidmem == NULL) {
+ 	ErrorF("Error while allocating an offscreen region.\n");
+@@ -849,8 +856,10 @@ LXAllocateSurface(ScrnInfoPtr pScrni, int id, unsigned short w,
+     if (surface->pitches)
+ 	free(surface->pitches);
+ 
+-    if (vidmem)
+-	GeodeFreeOffscreen(pGeode, vidmem);
++    if (vidmem) {
++	exaOffscreenFree(pScrni->pScreen, vidmem);
++	vidmem = NULL;
++    }
+ 
+     return BadAlloc;
+ }
+@@ -871,13 +880,12 @@ LXFreeSurface(XF86SurfacePtr surface)
+     struct OffscreenPrivRec *pPriv = (struct OffscreenPrivRec *)
+ 	surface->devPrivate.ptr;
+     ScrnInfoPtr pScrni = surface->pScrn;
+-    GeodeRec *pGeode = GEODEPTR(pScrni);
+ 
+     if (pPriv->isOn)
+ 	LXStopSurface(surface);
+ 
+     if (pPriv->vidmem) {
+-	GeodeFreeOffscreen(pGeode, pPriv->vidmem);
++	exaOffscreenFree(pScrni->pScreen, pPriv->vidmem);
+ 	pPriv->vidmem = NULL;
+     }
+ 
+--
+cgit v0.8.3-6-g21f6
only in patch2:
unchanged:
--- xserver-xorg-video-geode-2.11.9.orig/debian/patches/003_sync_mode_1280_typo.patch
+++ xserver-xorg-video-geode-2.11.9/debian/patches/003_sync_mode_1280_typo.patch
@@ -0,0 +1,24 @@
+From becaa0ae375e996c2f83192bb84a5c89f94933dd Mon Sep 17 00:00:00 2001
+From: Frank Huang <frankr.huang@amd.com>
+Date: Wed, 29 Sep 2010 08:45:42 +0000
+Subject: Fix a typo on resolution parameter
+
+*change from 1028 to 1280
+
+Signed-off-by: Frank Huang <frankr.huang@amd.com>
+---
+diff --git a/src/lx_panel.c b/src/lx_panel.c
+index f1d0686..2e076d4 100644
+--- a/src/lx_panel.c
++++ b/src/lx_panel.c
+@@ -63,7 +63,7 @@ DisplayModeRec lx_panel_modes[] = {
+     {MODEPREFIX, 81600, 1152, 1216, 1336, 1520, 0, 864, 865, 868, 895, 0,
+ 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
+     ,				       /* 1152x864@60 */
+-    {MODEPREFIX, 108000, 1028, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
++    {MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0,
+ 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
+     ,				       /* 1280x1024@60 */
+     {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
+--
+cgit v0.8.3-6-g21f6
only in patch2:
unchanged:
--- xserver-xorg-video-geode-2.11.9.orig/debian/patches/007_implement_lx_output_get_crtc.patch
+++ xserver-xorg-video-geode-2.11.9/debian/patches/007_implement_lx_output_get_crtc.patch
@@ -0,0 +1,37 @@
+From 87512b72d64370e062d209724994a72368c21df6 Mon Sep 17 00:00:00 2001
+From: Daniel Drake <dsd@laptop.org>
+Date: Tue, 07 Sep 2010 00:33:48 +0000
+Subject: Add get_crtc output function
+
+I don't know why X can't do this itself, but when no get_crtc method is
+provided, X decides that it doesn't know the CRTC of the output and
+decides to reset the mode completely (causing display powerdown, resulting
+in an uncomfortable visual interruption to OLPC's boot process).
+---
+diff --git a/src/lx_output.c b/src/lx_output.c
+index aa7687c..cd1809b 100644
+--- a/src/lx_output.c
++++ b/src/lx_output.c
+@@ -247,6 +247,12 @@ lx_output_destroy(xf86OutputPtr output)
+     output->driver_private = NULL;
+ }
+ 
++static xf86CrtcPtr lx_output_get_crtc(xf86OutputPtr output)
++{
++    return output->crtc;
++}
++
++
+ static const xf86OutputFuncsRec lx_output_funcs = {
+     .create_resources = lx_create_resources,
+     .dpms = lx_output_dpms,
+@@ -259,6 +265,7 @@ static const xf86OutputFuncsRec lx_output_funcs = {
+     .commit = lx_output_commit,
+     .detect = lx_output_detect,
+     .get_modes = lx_output_get_modes,
++    .get_crtc = lx_output_get_crtc,
+     .set_property = lx_output_set_property,
+     .destroy = lx_output_destroy,
+ };
+--
+cgit v0.8.3-6-g21f6
only in patch2:
unchanged:
--- xserver-xorg-video-geode-2.11.9.orig/debian/patches/001_OLPC_fix_DCON_detection.patch
+++ xserver-xorg-video-geode-2.11.9/debian/patches/001_OLPC_fix_DCON_detection.patch
@@ -0,0 +1,33 @@
+Date: Mon, 20 Sep 2010 11:31:29 -0700
+From: Andres Salomon <dilinger@queued.net>
+Subject: fix the DCON verification loop for LX output
+
+This is pretty clearly a bug. This should fix it (after all, that
+check is merely to see if the panel is a DCON; we don't care at
+all about the panel bit). This also adds an extra parenthesis in 
+the following if() statement for clarity.
+
+I'm resisting the temptation to change GeodeRec's Output member to
+an unsigned long (for now). Bitfields should really be unsigned.
+
+Signed-off-by: Andres Salomon <dilinger@queued.net>
+
+--- a/src/lx_output.c	2010-09-20 18:03:52.000000000 +0000
++++ b/src/lx_output.c	2010-09-20 18:23:41.000000000 +0000
+@@ -156,13 +156,13 @@
+     GeodeRec *pGeode = GEODEPTR(pScrni);
+ 
+     /* DCON Panel specific resolution - OLPC's one */
+-    if (pGeode->Output & (OUTPUT_PANEL | OUTPUT_DCON)) {
++    if (pGeode->Output & OUTPUT_DCON) {
+         if (pGeode->panelMode->HDisplay == 1200 &&
+             pGeode->panelMode->VDisplay == 900)
+             return MODE_OK;
+     }
+ 
+-    if (pGeode->Output & OUTPUT_PANEL &&
++    if ((pGeode->Output & OUTPUT_PANEL) &&
+         gfx_is_panel_mode_supported(pGeode->panelMode->HDisplay,
+                                     pGeode->panelMode->VDisplay,
+                                     pMode->HDisplay,
+
only in patch2:
unchanged:
--- xserver-xorg-video-geode-2.11.9.orig/debian/patches/009_revise_eCafe_support.patch
+++ xserver-xorg-video-geode-2.11.9/debian/patches/009_revise_eCafe_support.patch
@@ -0,0 +1,56 @@
+From fb72a210d7de61c49fc66aafa057d8c6a028b907 Mon Sep 17 00:00:00 2001
+From: Huang, FrankR <FrankR.Huang@amd.com>
+Date: Thu, 28 Oct 2010 07:16:58 +0000
+Subject: Revise the entry for 1024x600
+
+*Change the entry of 1024x600 from 3 to 7(That will not affect the entries from
+3 to 6). And BIOS should set the VG_FP_TYPE bit[5:3] to 7.
+*Use 1024x600@80 instead of 1024x600@60 parameters to support more 4:3 resolutions
+
+Signed-off-by: Frank Huang<frankr.huang@amd.com>
+---
+diff --git a/src/lx_panel.c b/src/lx_panel.c
+index 387e1be..6832fec 100644
+--- a/src/lx_panel.c
++++ b/src/lx_panel.c
+@@ -57,9 +57,6 @@ DisplayModeRec lx_panel_modes[] = {
+     {MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0,
+ 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
+     ,				       /* 880x600@60 */
+-    {MODEPREFIX, 48960, 1024, 1064, 1168, 1312, 0, 600, 601, 604, 622, 0,
+-	V_NHSYNC | V_NVSYNC, MODESUFFIX}
+-    ,				       /* 1024x600@60 */
+     {MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0,
+ 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
+     ,				       /* 1024x768@60 */
+@@ -72,6 +69,9 @@ DisplayModeRec lx_panel_modes[] = {
+     {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0,
+ 	V_NHSYNC | V_NVSYNC, MODESUFFIX}
+     ,				       /* 1600x1200@60 */
++    {MODEPREFIX, 67630, 1024, 1080, 1184, 1344, 0, 600, 601, 604, 629, 0,
++	V_NHSYNC | V_NVSYNC, MODESUFFIX}
++    ,				       /* 1024x600@80 */
+ };
+ 
+ /* Get the legacy panel size from VSA, and return the associated mode rec */
+@@ -87,12 +87,14 @@ LXGetLegacyPanelMode(void)
+ 	reg = LX_READ_VG(0x02);
+ 	ret = (reg >> 3) & 0x07;
+ 
+-	/* 7 is a "reserved" value - if we get it, we can only
+-	 * assume that a panel doesn't exist (or it hasn't been
+-	 * configured in the BIOS)
++	/* FIXME: 7 is reserved in default. We use this value to support
++ 	 * wide screen resolution 1024x600@80 now for panel. If you want to use
++ 	 * that resolution, please assign ret to 7 manually here:
++ 	 * "reg = 7"
++ 	 * The user can use this entry for other wide screen resolutions.
+ 	 */
+ 
+-	if (ret < 7)
++	if (ret < 8)
+ 	    return &lx_panel_modes[ret];
+ 
+     }
+--
+cgit v0.8.3-6-g21f6
only in patch2:
unchanged:
--- xserver-xorg-video-geode-2.11.9.orig/debian/patches/008_OLPC_DCON_sleep.patch
+++ xserver-xorg-video-geode-2.11.9/debian/patches/008_OLPC_DCON_sleep.patch
@@ -0,0 +1,60 @@
+From 9caaf7f8294ef9700e9e20e394fee10cc2b1c9c0 Mon Sep 17 00:00:00 2001
+From: Daniel Drake <dsd@laptop.org>
+Date: Tue, 07 Sep 2010 00:35:17 +0000
+Subject: Don't power down DCON when it is frozen
+
+Putting a frozen DCON to sleep (as happens during regular boot of the XO)
+will cause the frozen image to be corrupted.
+
+Change the behaviour to only sleep when the DCON is not frozen.
+
+http://dev.laptop.org/ticket/10196
+---
+diff --git a/src/geode_dcon.c b/src/geode_dcon.c
+index 9982671..56f05ed 100644
+--- a/src/geode_dcon.c
++++ b/src/geode_dcon.c
+@@ -37,6 +37,7 @@
+ #include <fcntl.h>
+ 
+ #define DCON_SLEEP_FILE "/sys/devices/platform/dcon/sleep"
++#define DCON_FREEZE_FILE "/sys/devices/platform/dcon/freeze"
+ 
+ static Bool
+ dcon_present(void)
+@@ -53,6 +54,7 @@ int
+ DCONDPMSSet(ScrnInfoPtr pScrni, int mode)
+ {
+     static int failed = -1;
++    ssize_t ret;
+     int fd;
+     char value[1];
+ 
+@@ -62,6 +64,25 @@ DCONDPMSSet(ScrnInfoPtr pScrni, int mode)
+     if (failed)
+ 	return 0;
+ 
++    /* If the DCON is frozen, don't power it down, it was probably frozen
++     * for a reason and powering it down would corrupt the display.
++     * This is needed to avoid losing OLPC's frozen boot image during X
++     * startup, where DPMS is used to power down and up the display.
++     * When geode uses KMS this will not be needed as the system realises
++     * that no mode change is needed and the display power is untouched. */
++    fd = open(DCON_FREEZE_FILE, O_RDONLY);
++    if (fd < 0) {
++	failed = 1;
++	return 0;
++    }
++
++    ret = read(fd, value, 1);
++    close(fd);
++    if (ret == 1) {
++	if (value[0] == '1')
++	    return 0;
++    }
++
+     fd = open(DCON_SLEEP_FILE, O_WRONLY);
+ 
+     if (fd < 0) {
+--
+cgit v0.8.3-6-g21f6

Reply to: