Skip to contentSkip to conversation

Don't install Flush/EventCallback for GPU screens

PATCH In review Michel Dänzer 2 participants 2 messages Nov 22, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Don't install Flush/EventCallback for GPU screens

From: Michel Dänzer <[email protected]>

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 commit 13c6bc5e382765fe567091e1c616c0a26eec04ca)

---
 src/amdgpu_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/amdgpu_kms.c +2 -2
index 09b7ea0..aad4a58 100644
@@ -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,7 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
 		amdgpu_glamor_create_screen_resources(pScreen);
 
 	info->callback_event_type = -1;
-	if (damage_ext) {
+	if (!pScreen->isGPU && (damage_ext = CheckExtension("DAMAGE"))) {
 		info->callback_event_type = damage_ext->eventBase + XDamageNotify;
 
 		if (!AddCallback(&FlushCallback, amdgpu_flush_callback, pScrn))
Signature · 6 lines
2.10.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20161122075555.26731-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 9 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

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 commit 13c6bc5e382765fe567091e1c616c0a26eec04ca)

Quoted 29 lines
---
 src/amdgpu_kms.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/amdgpu_kms.c +2 -3
index 09b7ea0..aad4a58 100644
@@ -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,7 @@ static Bool AMDGPUCreateScreenResources_KMS(ScreenPtr pScreen)
                amdgpu_glamor_create_screen_resources(pScreen);
 
        info->callback_event_type = -1;
-       if (damage_ext) {
+       if (!pScreen->isGPU && (damage_ext = CheckExtension("DAMAGE"))) {
                info->callback_event_type = damage_ext->eventBase + XDamageNotify;
 
                if (!AddCallback(&FlushCallback, amdgpu_flush_callback, pScrn))
--

2.10.2

Quoted 4 lines

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx