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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hans de Goede <hdegoede@xxxxxxxxxx>

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)
(Ported from radeon commit 82d3c8f5500d2a6fb1495e217a0b79c396f1534c)

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

diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index 4ae7995..6fa63e9 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -1235,9 +1235,9 @@ static void AMDGPUSetupCapabilities(ScrnInfoPtr pScrn)
 	ret = drmGetCap(pAMDGPUEnt->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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux