xserver: Branch 'master'

Aaron Plattner aplattner at kemper.freedesktop.org
Sun May 4 10:34:44 PDT 2008


 hw/kdrive/ephyr/ephyr.c |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit d500eeb9458336780d77baf8b7db96e1f7ff4f0d
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Sun May 4 10:26:25 2008 -0700

    Xephyr: Handle depth 30 and reject higher depths rather than crashing.

diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c
index d69e148..3989d0d 100644
--- a/hw/kdrive/ephyr/ephyr.c
+++ b/hw/kdrive/ephyr/ephyr.c
@@ -150,11 +150,22 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
 	  screen->fb[0].depth = 16;
 	  screen->fb[0].bitsPerPixel = 16;
 	}
-      else
+      else if (screen->fb[0].depth <= 24)
 	{
 	  screen->fb[0].depth = 24;
 	  screen->fb[0].bitsPerPixel = 32;
 	}
+      else if (screen->fb[0].depth <= 30)
+	{
+	  screen->fb[0].depth = 30;
+	  screen->fb[0].bitsPerPixel = 32;
+	}
+      else
+	{
+	  ErrorF("\nXephyr: Unsupported screen depth %d\n",
+	         screen->fb[0].depth);
+	  return FALSE;
+	}
 
       hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask);
 


More information about the xorg-commit mailing list