xf86-video-ati: backport upstream commits (not in a release yet) to fix

crash with options NoAccel.

Bump PKGREVISION

From Onno van der Linden in xsrc/55059.
This commit is contained in:
maya 2020-03-08 18:30:53 +00:00
parent 1be7f86474
commit 829415faa2
3 changed files with 48 additions and 2 deletions

View file

@ -1,6 +1,7 @@
# $NetBSD: Makefile,v 1.51 2020/01/18 23:36:02 rillig Exp $
# $NetBSD: Makefile,v 1.52 2020/03/08 18:30:53 maya Exp $
DISTNAME= xf86-video-ati-19.1.0
PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XORG:=driver/}
EXTRACT_SUFX= .tar.bz2

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.38 2019/11/14 10:24:36 wiz Exp $
$NetBSD: distinfo,v 1.39 2020/03/08 18:30:53 maya Exp $
SHA1 (xf86-video-ati-19.1.0.tar.bz2) = aea1d11c05531b03f2eb67c6785cddf6d7f30e5f
RMD160 (xf86-video-ati-19.1.0.tar.bz2) = 86f87301b75de14f8db2e2c0bce13b5e3dd67f50
SHA512 (xf86-video-ati-19.1.0.tar.bz2) = 73a81f6c492daf2e89067fb52b3033dc0fe6841f109627ddca1aee54a45a738c8c134443753a2a2aaa2c131e1d560057ebc76351ff2304c16407df3ff568fcd6
Size (xf86-video-ati-19.1.0.tar.bz2) = 904558 bytes
SHA1 (patch-configure) = bdd1014b215af69c2bb837d36829e12e86eb5764
SHA1 (patch-src_radeon.h) = f51b077af01a111269ecb2d86b9eac45e0ba6853

View file

@ -0,0 +1,44 @@
$NetBSD: patch-src_radeon.h,v 1.1 2020/03/08 18:30:54 maya Exp $
Backport upstream commits to fix crash with options NoAccel
From 4d84cf438e7f1bebf0053035ef0292e9fed257d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <mdaenzer@redhat.com>
Date: Fri, 29 Nov 2019 16:37:32 +0100
Subject: Handle NULL fb_ptr in pixmap_get_fb
From c0eb5dbd9c1db6b6d5b1574bcd8c584170d7ab54 Mon Sep 17 00:00:00 2001
From: Alexey Sheplyakov <asheplyakov@altlinux.org>
Date: Wed, 27 Nov 2019 20:50:58 +0400
Subject: Don't crash X server if GPU acceleration is not available
--- src/radeon.h.orig 2019-10-15 16:16:29.000000000 +0000
+++ src/radeon.h
@@ -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;
}