commit a459443f03224e55385cc59f9efb77da6242eee8 Author: Michel Dänzer Date: Wed Aug 6 11:08:00 2014 +0900 PRIME: Don't advertise offload capabilities when acceleration is disabled Xorg tends to crash if the user tries to actually use the offload capabilities with acceleration disabled. diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 00d1ce5..ebdbe0c 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -791,10 +791,16 @@ static void RADEONSetupCapabilities(ScrnInfoPtr pScrn) pScrn->capabilities = 0; 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; - if (value & DRM_PRIME_CAP_IMPORT) - pScrn->capabilities |= RR_Capability_SourceOffload | RR_Capability_SinkOutput; + 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; + } } #endif }