Greetings,

I've been going through old patches I hadn't gotten around commiting to Git.

I'd like this mailing list's feedback on the attached patch.

This concerns the driver's default colour depth.

Due to the OLPC's limitted memory, the driver's colour depth has been
kept at 16bpp. However, this clearly puts other Geode products with
plenty of video RAM at a disadvantage. Every now and then, someone has
thus asked whether the depth could be raised to 24bpp.

The attached patch would (unless i'm mistaken) set the depth at 16bpp
if an OLPC DCON is found. Otherwise, it would set the depth at 24bpp.

1) Does this patch do what I think it does?

2) Should I merge it?

Best Regards,
Martin-Éric
From: =?UTF-8?q?Martin-=C3=89ric=20Racine?= <martin-eric.rac...@iki.fi>
Date: Fri, 17 Feb 2012 17:55:27 +0200
Subject: LX: increase default BPP depth to 24-bit for generic hardware.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

If we find a DCON (which indicates that we are running on an OLPC),
we set the default BPP depth to 16-bit. Otherwise, we set it to 24.
This produces optimal BPP depth via automatic Xserver configuration
for the most common usage cases (OLPC and thin clients).

In other cases (embedded platforms and laptops), this should be set
manually via /etc/X11/xorg.conf using the DefaultDepth option.

Signed-off-by: Martin-Éric Racine <martin-eric.rac...@iki.fi>
---
 src/lx_driver.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/lx_driver.c b/src/lx_driver.c
index 146d7c3..ef61a5d 100644
--- a/src/lx_driver.c
+++ b/src/lx_driver.c
@@ -333,8 +333,13 @@ LXPreInit(ScrnInfoPtr pScrni, int flags)
     /* Fill in the monitor information */
     pScrni->monitor = pScrni->confScreen->monitor;
 
-    if (!xf86SetDepthBpp(pScrni, 16, 16, 16, Support24bppFb | Support32bppFb))
-	return FALSE;
+    /* Purposely limit the default OLPC pixel depth to limit memory consumption */
+    if (pGeode->Output & OUTPUT_DCON)
+       if (!xf86SetDepthBpp(pScrni, 16, 16, 16, Support24bppFb | Support32bppFb))
+          return FALSE;
+    else
+       if (!xf86SetDepthBpp(pScrni, 24, 24, 24, Support24bppFb | Support32bppFb))
+          return FALSE;
 
     switch (pScrni->depth) {
     case 8:
-- 
1.7.9

_______________________________________________
Xorg-driver-geode mailing list
Xorg-driver-geode@lists.x.org
https://lists.x.org/mailman/listinfo/xorg-driver-geode

Reply via email to