From c220413ce26f8466193052b01ae961f587af201a3ef4ca5efcd33477042dad32 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 19 Jul 2018 12:28:23 +0000 Subject: [PATCH] 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 --- u_modesetting-Fix-cirrus-24bpp-breakage.patch | 31 +++++++++++++++++++ xorg-x11-server.changes | 7 +++++ xorg-x11-server.spec | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 u_modesetting-Fix-cirrus-24bpp-breakage.patch diff --git a/u_modesetting-Fix-cirrus-24bpp-breakage.patch b/u_modesetting-Fix-cirrus-24bpp-breakage.patch new file mode 100644 index 0000000..e8870dd --- /dev/null +++ b/u_modesetting-Fix-cirrus-24bpp-breakage.patch @@ -0,0 +1,31 @@ +From: Takashi Iwai +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 + +--- + 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); + } diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index d5abd7e..c093367 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 19 14:12:01 CEST 2018 - tiwai@suse.de + +- u_modesetting-Fix-cirrus-24bpp-breakage.patch + * Fix breakage of cirrus 24bpp support on modesetting driver + (bsc#1101699) + ------------------------------------------------------------------- Mon Jul 2 12:46:54 UTC 2018 - sndirsch@suse.com diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 4e56f79..cc00fa9 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -227,6 +227,7 @@ Patch1500: U_Xext-shm-Refuse-to-work-for-remote-clients.patch Patch1501: U_xkb-Fix-heap-overflow-caused-by-optimized-away-min.patch Patch1600: U_modesetting-use-drmmode_bo_import-for-rotate_fb.patch +Patch1601: u_modesetting-Fix-cirrus-24bpp-breakage.patch %description This package contains the X.Org Server. @@ -371,6 +372,7 @@ sh %{SOURCE92} --verify . %{SOURCE91} %patch1501 -p1 %patch1600 -p1 +%patch1601 -p1 %build test -e source-file-list || \