package/x11r7/xdriver_xf86-video-ati: Guard local variable priv only used with glamor
Fixes: radeon_present.c: In function ‘radeon_present_check_flip’: radeon_present.c:281:21: error: invalid use of undefined type ‘struct radeon_pixmap’ 281 | if (priv && priv->fb_failed) | ^~ Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: Bernd Kuhls <bernd.kuhls@t-online.de> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
012da8b9fa
commit
d129256034
@ -0,0 +1,66 @@
|
||||
From a78e31b5fffadd73b00483f21e54bd144f1b439a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
|
||||
Date: Fri, 26 Mar 2021 17:42:10 +0100
|
||||
Subject: [PATCH] Guard local variable priv only used with glamor
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Fixes compile errors with glamor disabled:
|
||||
|
||||
../../src/radeon_present.c: In function ‘radeon_present_check_flip’:
|
||||
../../src/radeon_present.c:281:21: error: invalid use of undefined type ‘struct radeon_pixmap’
|
||||
281 | if (priv && priv->fb_failed)
|
||||
| ^~
|
||||
../../src/radeon_present.c:288:19: error: invalid use of undefined type ‘struct radeon_pixmap’
|
||||
288 | if (priv && !priv->fb_failed) {
|
||||
| ^~
|
||||
../../src/radeon_present.c:292:10: error: invalid use of undefined type ‘struct radeon_pixmap’
|
||||
292 | priv->fb_failed = TRUE;
|
||||
| ^~
|
||||
|
||||
(cherry picked from commit 3c7c84ed49564907a148ae99b03200e0be350060)
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
src/radeon_present.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/radeon_present.c b/src/radeon_present.c
|
||||
index 494655c9..d010aa19 100644
|
||||
--- a/src/radeon_present.c
|
||||
+++ b/src/radeon_present.c
|
||||
@@ -254,7 +254,9 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
xf86CrtcPtr xf86_crtc = crtc->devPrivate;
|
||||
ScreenPtr screen = window->drawable.pScreen;
|
||||
ScrnInfoPtr scrn = xf86_crtc->scrn;
|
||||
+#ifdef USE_GLAMOR
|
||||
struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);
|
||||
+#endif
|
||||
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||
RADEONInfoPtr info = RADEONPTR(scrn);
|
||||
PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen);
|
||||
@@ -278,10 +280,13 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
return FALSE;
|
||||
#endif
|
||||
|
||||
+#ifdef USE_GLAMOR
|
||||
if (priv && priv->fb_failed)
|
||||
return FALSE;
|
||||
+#endif
|
||||
|
||||
if (!radeon_pixmap_get_fb(pixmap)) {
|
||||
+#ifdef USE_GLAMOR
|
||||
if (!priv)
|
||||
priv = radeon_get_pixmap_private(pixmap);
|
||||
|
||||
@@ -291,6 +296,7 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
|
||||
"normal if using PRIME render offloading)\n");
|
||||
priv->fb_failed = TRUE;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
--
|
||||
2.31.1
|
||||
|
Loading…
Reference in New Issue
Block a user