[PATCH xf86-video-amdgpu 1/9] dri2: Handle PRIME for source buffer as well in amdgpu_dri2_copy_region2

Michel Dänzer michel at daenzer.net
Wed Nov 11 01:30:47 PST 2015


From: Michel Dänzer <michel.daenzer at amd.com>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77810

(ported from radeon commit c84230d686c078aac1dc98d82153f8b02521b2e1)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/amdgpu_dri2.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index 0feca59..230e8ba 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -333,7 +333,14 @@ amdgpu_dri2_copy_region2(ScreenPtr pScreen,
 	dst_drawable = &dst_private->pixmap->drawable;
 
 	if (src_private->attachment == DRI2BufferFrontLeft) {
-		src_drawable = drawable;
+#ifdef USE_DRI2_PRIME
+		if (drawable->pScreen != pScreen) {
+			src_drawable = DRI2UpdatePrime(drawable, src_buffer);
+			if (!src_drawable)
+				return;
+		} else
+#endif
+			src_drawable = drawable;
 	}
 	if (dst_private->attachment == DRI2BufferFrontLeft) {
 #ifdef USE_DRI2_PRIME
-- 
2.6.2



More information about the xorg-driver-ati mailing list