summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-10-26 13:32:01 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-10-26 13:32:01 +0000
commit0a9943e8a4e14773265080d9547ba40ab6ccb44b (patch)
tree6c9450a55f9a4b44ae1c24a5ef372acfb87cc9d1 /driver
parent0c955f1564cb89f359ab9a7c1ae77edba6147091 (diff)
backport commits to not crash when accel is disabled
c0eb5dbd Don't crash X server if GPU acceleration is not available 4d84cf43 Handle NULL fb_ptr in pixmap_get_fb prompted by a report to bugs@ from Jean-Louis ABRAHAM ok matthieu@
Diffstat (limited to 'driver')
-rw-r--r--driver/xf86-video-ati/src/radeon.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver/xf86-video-ati/src/radeon.h b/driver/xf86-video-ati/src/radeon.h
index 2c9134667..e4a2ba66f 100644
--- a/driver/xf86-video-ati/src/radeon.h
+++ b/driver/xf86-video-ati/src/radeon.h
@@ -790,8 +790,8 @@ static inline Bool radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_buffer *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 *radeon_get_pixmap_bo(PixmapPtr pPix)
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;
}