update code
This commit is contained in:
commit
90a16f90de
@ -0,0 +1,58 @@
|
|||||||
|
From f758908db4e71406e5d437d32e43aabd38a63504 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
|
||||||
|
Date: Thu, 9 May 2019 12:35:37 +0200
|
||||||
|
Subject: [PATCH xf86-video-ati] dri3: Always flush glamor before sharing
|
||||||
|
pixmap storage with clients
|
||||||
|
|
||||||
|
Even if glamor_gbm_bo_from_pixmap / glamor_fd_from_pixmap themselves
|
||||||
|
don't trigger any drawing, there could already be unflushed drawing to
|
||||||
|
the pixmap whose storage we share with a client.
|
||||||
|
|
||||||
|
(Ported from amdgpu commit 4b17533fcb30842caf0035ba593b7d986520cc85)
|
||||||
|
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
||||||
|
---
|
||||||
|
src/radeon_dri3.c | 26 +++++---------------------
|
||||||
|
1 file changed, 5 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c
|
||||||
|
index 73353bf5..f8f91c4b 100644
|
||||||
|
--- a/src/radeon_dri3.c
|
||||||
|
+++ b/src/radeon_dri3.c
|
||||||
|
@@ -220,29 +220,13 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
|
||||||
|
RADEONInfoPtr info = RADEONPTR(scrn);
|
||||||
|
|
||||||
|
if (info->use_glamor) {
|
||||||
|
- Bool need_flush = TRUE;
|
||||||
|
- int ret = -1;
|
||||||
|
-#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,19,99,904,0)
|
||||||
|
- struct gbm_bo *gbm_bo = glamor_gbm_bo_from_pixmap(screen, pixmap);
|
||||||
|
+ int ret = glamor_fd_from_pixmap(screen, pixmap, stride, size);
|
||||||
|
|
||||||
|
- if (gbm_bo) {
|
||||||
|
- ret = gbm_bo_get_fd(gbm_bo);
|
||||||
|
- gbm_bo_destroy(gbm_bo);
|
||||||
|
-
|
||||||
|
- if (ret >= 0)
|
||||||
|
- need_flush = FALSE;
|
||||||
|
- }
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
- if (ret < 0)
|
||||||
|
- ret = glamor_fd_from_pixmap(screen, pixmap, stride, size);
|
||||||
|
-
|
||||||
|
- /* glamor might have needed to reallocate the pixmap storage and
|
||||||
|
- * copy the pixmap contents to the new storage. The copy
|
||||||
|
- * operation needs to be flushed to the kernel driver before the
|
||||||
|
- * client starts using the pixmap storage for direct rendering.
|
||||||
|
+ /* Any pending drawing operations need to be flushed to the
|
||||||
|
+ * kernel driver before the client starts using the pixmap
|
||||||
|
+ * storage for direct rendering.
|
||||||
|
*/
|
||||||
|
- if (ret >= 0 && need_flush)
|
||||||
|
+ if (ret >= 0)
|
||||||
|
radeon_cs_flush_indirect(scrn);
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
--
|
||||||
|
2.21.0
|
||||||
|
|
||||||
BIN
xf86-video-ati-19.0.1.tar.bz2
Normal file
BIN
xf86-video-ati-19.0.1.tar.bz2
Normal file
Binary file not shown.
58
xorg-x11-drv-ati.spec
Normal file
58
xorg-x11-drv-ati.spec
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
%global moduledir %(pkg-config xorg-server --variable=moduledir )
|
||||||
|
|
||||||
|
%undefine _hardened_build
|
||||||
|
|
||||||
|
Name: xorg-x11-drv-ati
|
||||||
|
Version: 19.0.1
|
||||||
|
Release: 2
|
||||||
|
Summary: Xorg X11 ati video driver
|
||||||
|
License: MIT
|
||||||
|
URL: https://www.x.org
|
||||||
|
Source0: https://www.x.org/pub/individual/driver/xf86-video-ati-%{version}.tar.bz2
|
||||||
|
Patch1: 0001-dri3-Always-flush-glamor-before-sharing-pixmap-stora.patch
|
||||||
|
|
||||||
|
|
||||||
|
BuildRequires: pkgconfig(gbm) >= 10.6 libdrm-devel kernel-headers
|
||||||
|
BuildRequires: automake autoconf libtool pkgconfig xorg-x11-util-macros
|
||||||
|
BuildRequires: libudev-devel xorg-x11-glamor-devel xorg-x11-server-devel
|
||||||
|
|
||||||
|
Requires: Xorg %(xserver-sdk-abi-requires ansic) Xorg %(xserver-sdk-abi-requires videodrv) libdrm >= 2.4.36-1
|
||||||
|
|
||||||
|
%description
|
||||||
|
X.Org X11 ati video driver.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n xf86-video-ati-%{version} -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
autoreconf -iv
|
||||||
|
%configure --enable-glamor
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
%delete_la
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%license COPYING
|
||||||
|
%{moduledir}/drivers/ati_drv.so
|
||||||
|
%{moduledir}/drivers/radeon_drv.so
|
||||||
|
%{_datadir}/X11/xorg.conf.d/10-radeon.conf
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc README.md ChangeLog
|
||||||
|
%{_mandir}/man4/*.4*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Oct 26 2019 openEuler Buildteam <buildteam@openeuler.org> - 19.0.1-2
|
||||||
|
- Type:enhancement
|
||||||
|
- Id:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:modify the location of COPYING
|
||||||
|
|
||||||
|
* Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 19.0.1-1
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user