mirror of
https://github.com/X11Libre/xf86-video-amdgpu.git
synced 2026-04-14 11:04:42 +00:00
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>
This commit is contained in:
committed by
Michel Dänzer
parent
9c4416422f
commit
c87dff3257
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user