Module Name: xsrc
Committed By: maya
Date: Sun Mar 8 18:27:52 UTC 2020
Modified Files:
xsrc/external/mit/xf86-video-ati-kms/dist/src: radeon.h
Log Message:
Backport upstream commits (there is no newer release yet):
>From c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54 Mon Sep 17 00:00:00 2001
From: Alexey Sheplyakov <[email protected]>
Date: Wed, 27 Nov 2019 20:50:58 +0400
Subject: Don't crash X server if GPU acceleration is not available
>From 4d84cf438e7f1bebf0053035ef0292e9fed257d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <[email protected]>
Date: Fri, 29 Nov 2019 16:37:32 +0100
Subject: Handle NULL fb_ptr in pixmap_get_fb
This can happen when HW acceleration is disabled.
>From Onno van der Linden in xsrc/55059.
To generate a diff of this commit:
cvs rdiff -u -r1.1.1.10 -r1.2 \
xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h
diff -u xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h:1.1.1.10 xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h:1.2
--- xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h:1.1.1.10 Sun Feb 23 06:17:09 2020
+++ xsrc/external/mit/xf86-video-ati-kms/dist/src/radeon.h Sun Mar 8 18:27:51 2020
@@ -790,8 +790,8 @@ static inline Bool radeon_set_pixmap_bo(
static inline struct radeon_buffer *radeon_get_pixmap_bo(PixmapPtr pPix)
{
-#ifdef USE_GLAMOR
RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen));
+#ifdef USE_GLAMOR
if (info->use_glamor) {
struct radeon_pixmap *priv;
@@ -799,7 +799,7 @@ static inline struct radeon_buffer *rade
return priv ? priv->bo : NULL;
} else
#endif
- {
+ if (info->accelOn) {
struct radeon_exa_pixmap_priv *driver_priv;
driver_priv = exaGetPixmapDriverPrivate(pPix);
return driver_priv ? driver_priv->bo : NULL;
@@ -896,7 +896,7 @@ radeon_pixmap_get_fb(PixmapPtr pix)
handle);
}
- return *fb_ptr;
+ return fb_ptr ? *fb_ptr : NULL;
}