modesetting: Fix 16 bit depth/bpp mode

When setting DefaultDepth to 16 in the Screen section, the current
code requests a 32 bpp framebuffer, however the X-Server seems to
assumes 16 bpp.

Fixes commit 21217d0216 ("modesetting: Implement 32->24 bpp
conversion in shadow update")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
Stefan Agner 2016-12-22 15:41:06 +01:00 committed by Adam Jackson
parent d95a1310ef
commit 1c7f34e99f
1 changed files with 3 additions and 1 deletions

View File

@ -940,7 +940,7 @@ PreInit(ScrnInfoPtr pScrn, int flags)
"Using 24bpp hw front buffer with 32bpp shadow\n");
defaultbpp = 32;
} else {
ms->drmmode.kbpp = defaultbpp;
ms->drmmode.kbpp = 0;
}
bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb;
@ -961,6 +961,8 @@ PreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
xf86PrintDepthBpp(pScrn);
if (!ms->drmmode.kbpp)
ms->drmmode.kbpp = pScrn->bitsPerPixel;
/* Process the options */
xf86CollectOptions(pScrn, NULL);