diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-10-26 16:17:04 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-10-27 11:02:18 +0900 |
commit | c87dff3257e797cfd80d208c9a612b21978ff4eb (patch) | |
tree | 04ded6086c1de49ba54d95c6f8872d9c025a472f /src/amdgpu_kms.c | |
parent | 9c4416422f2d07dbfa7c0b18beb1353f122fc1a1 (diff) |
PRIME: Fix swapping of provider sink / source capabilities
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@redhat.com>
(Ported from xserver commit 94a1c77259ce39ba59ad87615df39b570ffab435)
(Ported from radeon commit 82d3c8f5500d2a6fb1495e217a0b79c396f1534c)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_kms.c')
-rw-r--r-- | src/amdgpu_kms.c | 4 |
1 files 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; } |