1
0
xorg-x11-server/u_modesetting-Fix-cirrus-24bpp-breakage.patch
Stefan Dirsch c220413ce2 Accepting request 624070 from home:tiwai:branches:X11:XOrg
- u_modesetting-Fix-cirrus-24bpp-breakage.patch
  * Fix breakage of cirrus 24bpp support on modesetting driver
    (bsc#1101699)

OBS-URL: https://build.opensuse.org/request/show/624070
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=708
2018-07-19 12:28:23 +00:00

32 lines
1.1 KiB
Diff

From: Takashi Iwai <tiwai@suse.de>
Subject: modesetting: Fix cirrus 24bpp breakage
References: bsc#1101699
The recent rewrite of modesetting driver broke the 24bpp support.
As typically found on cirrus KMS, it leads to a blank screen, spewing
the error like:
failed to add fb -22
(EE) modeset(0): failed to set mode: Invalid argument
The culript is that the wrong bpp value of the front buffer is passed
to drmModeAddFB(). Fix it by replacing with the back buffer bpp,
drmmode->kbpp.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
hw/xfree86/drivers/modesetting/drmmode_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -990,7 +990,7 @@ drmmode_bo_import(drmmode_ptr drmmode, d
}
#endif
return drmModeAddFB(drmmode->fd, bo->width, bo->height,
- drmmode->scrn->depth, drmmode->scrn->bitsPerPixel,
+ drmmode->scrn->depth, drmmode->kbpp,
drmmode_bo_get_pitch(bo),
drmmode_bo_get_handle(bo), fb_id);
}