Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
xorg-x11-server.1965
U_fb-Fix-invalid-bpp-for-24bit-depth-window.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_fb-Fix-invalid-bpp-for-24bit-depth-window.patch of Package xorg-x11-server.1965
From fe5018e0564118a7a8198fa286186fdb9ed818c7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@suse.de> Date: Tue, 19 Aug 2014 15:57:22 -0500 Subject: [PATCH] fb: Fix invalid bpp for 24bit depth window We have a hack in fb layer for a 24bpp screen to use 32bpp images, and fbCreateWindow() replaces its drawable.bitsPerPixel field appropriately. But, the problem is that it always replaces when 32bpp is passed. If the depth is 32, this results in bpp < depth, which is actually invalid. Meanwhile, fbCreatePixmap() has a more check and it creates with 24bpp only when the passed depth <= 24 for avoiding such a problem. This oneliner patch just adds the similar check in fbCreateWindow(). This (hopefully) fixes the long-standing broken graphics mess of cirrus KMS with 24bpp. Signed-off-by: Takashi Iwai <tiwai@suse.de> Reviewed-by: Keith Packard <keithp@keithp.com> --- fb/fbwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fb/fbwindow.c b/fb/fbwindow.c index 368c4b883b31..c90175faa078 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -33,7 +33,7 @@ fbCreateWindow(WindowPtr pWin) { dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin), fbGetScreenPixmap(pWin->drawable.pScreen)); - if (pWin->drawable.bitsPerPixel == 32) + if (pWin->drawable.bitsPerPixel == 32 && pWin->drawable.depth <= 24) pWin->drawable.bitsPerPixel = fbGetScreenPrivate(pWin->drawable.pScreen)->win32bpp; return TRUE; -- 2.0.4
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor