[PATCH] Don't advertise any PRIME offloading capabilities without acceleration
Michel Dänzer
michel at daenzer.net
Fri Nov 20 01:49:38 PST 2015
From: Michel Dänzer <michel.daenzer at amd.com>
Acceleration is required even for display offloading. Trying to enable
display offloading without acceleration resulted in a crash.
Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
src/radeon_kms.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 49b922d..8f84df2 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
}
--
2.6.2
More information about the xorg-driver-ati
mailing list