From b19417e2fddf4df725951aea5ad5e9558338f59e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 20 Nov 2015 18:48:56 +0900 Subject: 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 --- src/radeon_kms.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'src/radeon_kms.c') 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 } -- cgit v1.2.3