From c871c5b62efd86176a5e9454daae2bcd546b7cdd Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Nov 15 2012 19:54:30 +0000 Subject: fix dri2 segfault #872536 --- diff --git a/fix-dri2-segfault.patch b/fix-dri2-segfault.patch new file mode 100644 index 0000000..bc715ee --- /dev/null +++ b/fix-dri2-segfault.patch @@ -0,0 +1,34 @@ +From ed3b6e3013e5778e3f050e9e4dbe0ea4f77a279c Mon Sep 17 00:00:00 2001 +From: Jerome Glisse +Date: Wed, 14 Nov 2012 12:15:47 -0500 +Subject: [PATCH] radeon: avoid segfault when pixmap exceed GPU capabilities + +We might get a request for a pixmap/drawable that is too big +for GPU capabilities in the dri2 get buffer path. In face of +such things just return NULL to dri2 get buffer request. The +GL driver should then use something like transparent black to +avoid something too ugly on the screen. + +Signed-off-by: Jerome Glisse +--- + src/radeon_dri2.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c +index ebd813c..919f1f6 100644 +--- a/src/radeon_dri2.c ++++ b/src/radeon_dri2.c +@@ -444,6 +444,10 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, + info->exa_force_create = TRUE; + exaMoveInPixmap(pixmap); + info->exa_force_create = FALSE; ++ if (exaGetPixmapDriverPrivate(pixmap) == NULL) { ++ /* this happen if pixmap is non accelerable */ ++ goto error; ++ } + } + + if (is_glamor_pixmap) +-- +1.8.0 + diff --git a/xorg-x11-drv-ati.spec b/xorg-x11-drv-ati.spec index 8d051b7..12de9df 100644 --- a/xorg-x11-drv-ati.spec +++ b/xorg-x11-drv-ati.spec @@ -11,7 +11,7 @@ Summary: Xorg X11 ati video driver Name: xorg-x11-drv-ati Version: 7.0.0 -Release: 0.7%{?gver}%{?dist} +Release: 0.8%{?gver}%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -21,6 +21,7 @@ Source0: %{tarball}-%{gitdate}.tar.xz Patch10: radeon-6.12.2-lvds-default-modes.patch Patch13: fix-default-modes.patch +Patch14: fix-dri2-segfault.patch ExcludeArch: s390 s390x %{?rhel:ppc ppc64} @@ -44,6 +45,7 @@ X.Org X11 ati video driver. %setup -q -n %{tarball}-%{?gitdate:%{gitdate}}%{?!gitdate:%{version}} %patch10 -p1 -b .lvds %patch13 -p1 -b .def +%patch14 -p1 -b .segf %build autoreconf -iv @@ -71,6 +73,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man4/radeon.4* %changelog +* Thu Nov 15 2012 Jerome Glisse 7.0.0-0.8.20121015gitbd9e2c064 +- fix dri2 segfault #872536 + * Mon Oct 15 2012 Dave Airlie 7.0.0-0.7.20121015gitbd9e2c064 - fix issue with damage when using offload or sw cursor