summaryrefslogtreecommitdiff
path: root/src/amdgpu_kms.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-11-22 16:50:59 +0900
committerMichel Dänzer <michel@daenzer.net>2016-11-28 17:40:32 +0900
commit7fe2a8ed67ef82916a1eb5b241c5a602a26e10b2 (patch)
treeee7a5cc5a7a1b669e726292d1b20337f4a065fb3 /src/amdgpu_kms.c
parentff31320644b4d17b9b3f0abd612c99769d3d9643 (diff)
Don't install Flush/EventCallback for GPU screens
Their purpose is to flush GPU rendering commands corresponding to damage events, but there can be no damage events corresponding to GPU screen rendering operations. (Ported from radeon commits 13c6bc5e382765fe567091e1c616c0a26eec04ca and 487aa62a2a23b86e4ea4714fdfd465c9e513141f) v2: Squash in radeon fix for build against xserver < 1.13 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
Diffstat (limited to 'src/amdgpu_kms.c')
-rw-r--r--src/amdgpu_kms.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index cadd928..18d2abb 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -223,7 +223,7 @@ amdgpu_flush_callback(CallbackListPtr *list,
static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
{
- ExtensionEntry *damage_ext = CheckExtension("DAMAGE");
+ ExtensionEntry *damage_ext;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
PixmapPtr pixmap;
@@ -277,7 +277,11 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
amdgpu_glamor_create_screen_resources(pScreen);
info->callback_event_type = -1;
- if (damage_ext) {
+ if (
+#ifdef AMDGPU_PIXMAP_SHARING
+ !pScreen->isGPU &&
+#endif
+ (damage_ext = CheckExtension("DAMAGE"))) {
info->callback_event_type = damage_ext->eventBase + XDamageNotify;
if (!AddCallback(&FlushCallback, amdgpu_flush_callback, pScrn))