summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-10-25 16:56:40 +0900
committerMichel Dänzer <michel@daenzer.net>2016-10-26 15:59:36 +0900
commit82d3c8f5500d2a6fb1495e217a0b79c396f1534c (patch)
tree1ef588bcc6705449772cb0fb133edf9000911375
parent6c940446ddadf418ee4959e46fa552b6c1cf6704 (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) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon_kms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index faa1e0ff..68c78379 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;
}