1
0

Accepting request 353255 from home:fcrozat:branches:X11:XOrg

- U_modesetting-should-not-reference-gbm-when-it-s-not-d.patch: fix
  build when gbm is not defined. (needed to build against SLE12 SP1)

OBS-URL: https://build.opensuse.org/request/show/353255
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=603
This commit is contained in:
Stefan Dirsch 2016-01-12 15:50:24 +00:00 committed by Git OBS Bridge
parent 72a2359e8f
commit 781f00f37f
3 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,61 @@
From fe8562f5316d8c74ca074ad145295c65ddff5fc2 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri, 1 Jan 2016 18:10:08 -0800
Subject: [PATCH] modesetting should not reference gbm when it's not defined
Fixes build errors of:
present.c: In function 'ms_do_pageflip':
present.c:410:17: error: 'drmmode_bo' has no member named 'gbm'
new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front);
^
present.c:412:22: error: 'drmmode_bo' has no member named 'gbm'
if (!new_front_bo.gbm) {
^
present.c: In function 'ms_present_check_flip':
present.c:536:36: error: 'drmmode_bo' has no member named 'gbm'
if (drmmode_crtc->rotate_bo.gbm)
^
Introduced by commit 13c7d53d
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
---
hw/xfree86/drivers/modesetting/present.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c
index bb2976b..d65c8c8 100644
--- a/hw/xfree86/drivers/modesetting/present.c
+++ b/hw/xfree86/drivers/modesetting/present.c
@@ -398,6 +398,9 @@ ms_do_pageflip(ScreenPtr screen,
int ref_crtc_vblank_pipe,
Bool async)
{
+#ifndef GLAMOR_HAS_GBM
+ return FALSE;
+#else
ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
modesettingPtr ms = modesettingPTR(scrn);
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
@@ -505,6 +508,7 @@ error_out:
flipdata->flip_count--;
return FALSE;
+#endif /* GLAMOR_HAS_GBM */
}
/*
@@ -533,8 +537,10 @@ ms_present_check_flip(RRCrtcPtr crtc,
drmmode_crtc_private_ptr drmmode_crtc = config->crtc[i]->driver_private;
/* Don't do pageflipping if CRTCs are rotated. */
+#ifdef GLAMOR_HAS_GBM
if (drmmode_crtc->rotate_bo.gbm)
return FALSE;
+#endif
if (ms_crtc_on(config->crtc[i]))
num_crtcs_on++;
--
2.6.2

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Jan 12 13:19:06 UTC 2016 - fcrozat@suse.com
- U_modesetting-should-not-reference-gbm-when-it-s-not-d.patch: fix
build when gbm is not defined.
-------------------------------------------------------------------
Mon Jan 11 21:48:00 UTC 2016 - eich@suse.com

View File

@ -183,6 +183,7 @@ Patch160: u_vesa-Add-VBEDPMSGetCapabilities-VBEDPMSGet.patch
Patch204: U_systemd-logind-do-not-rely-on-directed-signals.patch
Patch205: U_kdrive-UnregisterFd-Fix-off-by-one.patch
Patch206: u_busfault_sigaction-Only-initialize-pointer-when-matched.patch
Patch207: U_modesetting-should-not-reference-gbm-when-it-s-not-d.patch
Patch1000: n_xserver-optimus-autoconfig-hack.patch
@ -290,6 +291,7 @@ cp %{SOURCE90} .
%patch204 -p1
%patch205 -p1
%patch206 -p1
%patch207 -p1
%patch1000 -p1