From 634dae745cf71c257554b4c18bde7710cd1716e8 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 6 Mar 2019 12:45:11 -0500 Subject: [PATCH] Try harder to avoid 24bpp We're preferring depth 24 even if that means 24bpp. Newer servers don't support 24bpp anymore, and even for old servers it's suboptimal. Change the heuristic to only try 24bpp if the alternative is pseudocolor. Fixes: xorg/driver/xf86-video-vesa#3 --- src/vesa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vesa.c b/src/vesa.c index af750e2..7f11175 100644 --- a/src/vesa.c +++ b/src/vesa.c @@ -690,12 +690,14 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags) V_MODETYPE_VBE); /* Preferred order for default depth selection. */ - if (depths & V_DEPTH_24) + if (depths & V_DEPTH_24 && (flags24 & Support32bppFb)) defaultDepth = 24; else if (depths & V_DEPTH_16) defaultDepth = 16; else if (depths & V_DEPTH_15) defaultDepth = 15; + else if (depths & V_DEPTH_24) + defaultDepth = 24; /* ew though */ else if (depths & V_DEPTH_8) defaultDepth = 8; else if (depths & V_DEPTH_4) -- GitLab