diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-11-20 18:48:56 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-11-20 18:48:56 +0900 |
commit | b19417e2fddf4df725951aea5ad5e9558338f59e (patch) | |
tree | b73168021280e747415b32b8517dc5ccecd1e165 /src/radeon_kms.c | |
parent | 10b7c3def58bb34acc38f076bc230e25b454ab79 (diff) |
Don't advertise any PRIME offloading capabilities without acceleration
Acceleration is required even for display offloading. Trying to enable
display offloading without acceleration resulted in a crash.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/radeon_kms.c')
-rw-r--r-- | src/radeon_kms.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 49b922d2..8f84df25 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -1017,18 +1017,17 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn) int ret; pScrn->capabilities = 0; + + /* PRIME offloading requires acceleration */ + if (info->r600_shadow_fb) + return; + ret = drmGetCap(info->dri2.drm_fd, DRM_CAP_PRIME, &value); if (ret == 0) { - if (value & DRM_PRIME_CAP_EXPORT) { - pScrn->capabilities |= RR_Capability_SourceOutput; - if (!info->r600_shadow_fb && info->dri2.available) - pScrn->capabilities |= RR_Capability_SinkOffload; - } - if (value & DRM_PRIME_CAP_IMPORT) { - pScrn->capabilities |= RR_Capability_SinkOutput; - if (!info->r600_shadow_fb && info->dri2.available) - pScrn->capabilities |= RR_Capability_SourceOffload; - } + if (value & DRM_PRIME_CAP_EXPORT) + pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload; + if (value & DRM_PRIME_CAP_IMPORT) + pScrn->capabilities |= RR_Capability_SinkOutput | RR_Capability_SourceOffload; } #endif } |