[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: gnu: xorg-server: Apply patch to fix screen rotation on KMS.
From: |
Ludovic Courtès |
Subject: |
01/03: gnu: xorg-server: Apply patch to fix screen rotation on KMS. |
Date: |
Tue, 24 Jul 2018 09:48:15 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 68f50cfdd34670f7cbc922398e9117de27f964c9
Author: Ludovic Courtès <address@hidden>
Date: Tue Jul 24 10:18:14 2018 +0200
gnu: xorg-server: Apply patch to fix screen rotation on KMS.
Fixes <https://bugs.freedesktop.org/show_bug.cgi?id=106715>.
* gnu/packages/patches/xorg-server-rotate-fb.patch: New file.
* gnu/packages/xorg.scm (xorg-server)[source]: Use it.
* gnu/local.mk (dist_patch_DATA): Add it.
---
gnu/local.mk | 1 +
gnu/packages/patches/xorg-server-rotate-fb.patch | 35 ++++++++++++++++++++++++
gnu/packages/xorg.scm | 3 +-
3 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 16521e8..ea906b8 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1234,6 +1234,7 @@ dist_patch_DATA =
\
%D%/packages/patches/xinetd-fix-fd-leak.patch \
%D%/packages/patches/xinetd-CVE-2013-4342.patch \
%D%/packages/patches/xmodmap-asprintf.patch \
+ %D%/packages/patches/xorg-server-rotate-fb.patch \
%D%/packages/patches/zathura-pdf-mupdf-link-to-jpeg-libraries.patch \
%D%/packages/patches/zathura-plugindir-environment-variable.patch \
%D%/packages/patches/zstd-fix-stdin-list-without-tty.patch \
diff --git a/gnu/packages/patches/xorg-server-rotate-fb.patch
b/gnu/packages/patches/xorg-server-rotate-fb.patch
new file mode 100644
index 0000000..f47036b
--- /dev/null
+++ b/gnu/packages/patches/xorg-server-rotate-fb.patch
@@ -0,0 +1,35 @@
+commit a85e94a50c94b07574c8701a3ff3c1243f4257f4
+Author: Olivier Fourdan <address@hidden>
+Date: Fri Jun 15 08:57:12 2018 +0200
+
+ modesetting: use drmmode_bo_import() for rotate_fb
+
+ drmmode_shadow_allocate() still uses drmModeAddFB() which may fail if
+ the format is not as expected, preventing from using a rotated output.
+
+ Change it to use the new function drmmode_bo_import() which takes care
+ of calling the drmModeAddFB2() API.
+
+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106715
+ Signed-off-by: Olivier Fourdan <address@hidden>
+ Tested-by: Tomas Pelka <address@hidden>
+ Reviewed-by: Lyude Paul <address@hidden>
+
+diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c
b/hw/xfree86/drivers/modesetting/drmmode_display.c
+index 859a21a9d..ec11b3f56 100644
+--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
++++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
+@@ -1794,11 +1794,8 @@ drmmode_shadow_allocate(xf86CrtcPtr crtc, int width,
int height)
+ return NULL;
+ }
+
+- ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth,
+- drmmode->kbpp,
+- drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo),
+- drmmode_bo_get_handle(&drmmode_crtc->rotate_bo),
+- &drmmode_crtc->rotate_fb_id);
++ ret = drmmode_bo_import(drmmode, &drmmode_crtc->rotate_bo,
++ &drmmode_crtc->rotate_fb_id);
+
+ if (ret) {
+ ErrorF("failed to add rotate fb\n");
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 0d36266..b238ea4 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -5093,7 +5093,8 @@ over Xlib, including:
(sha256
(base32
"0mm70y058r8s9y9jiv7q2myv0ycnaw3iqzm7d274410s0ik38w7q"))
- (file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))))))
+ (file-name "xorg-server-use-intel-only-on-pre-gen4.diff"))
+ (search-patch "xorg-server-rotate-fb.patch")))))
(build-system gnu-build-system)
(propagated-inputs
`(("libpciaccess" ,libpciaccess)