[PATCH xf86-video-ati 3/4] PRIME: Fix swapping of provider sink / source capabilities

Michel Dänzer michel at daenzer.net
Tue Oct 25 08:41:27 UTC 2016


From: Hans de Goede <hdegoede at redhat.com>

When a card has import capability it can be an offload _sink_, not a
source and vice versa for export capability.

This went unnoticed sofar because most gpus have both import and export
capability.

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
(Ported from xserver commit 94a1c77259ce39ba59ad87615df39b570ffab435)

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index faa1e0f..68c7837 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1587,9 +1587,9 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn)
     ret = drmGetCap(info->dri2.drm_fd, DRM_CAP_PRIME, &value);
     if (ret == 0) {
 	if (value & DRM_PRIME_CAP_EXPORT)
-	    pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload;
+	    pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SourceOffload;
 	if (value & DRM_PRIME_CAP_IMPORT) {
-	    pScrn->capabilities |= RR_Capability_SourceOffload;
+	    pScrn->capabilities |= RR_Capability_SinkOffload;
 	    if (info->drmmode.count_crtcs)
 		pScrn->capabilities |= RR_Capability_SinkOutput;
 	}
-- 
2.10.1



More information about the amd-gfx mailing list