diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 74d5806c8..b273b2873 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -141,6 +141,8 @@ amdgpu_change_property(ClientPtr client) AMDGPUPreInit_KMS && stuff->format == 32 && stuff->nUnits == 1) { uint32_t *value = (uint32_t*)(stuff + 1); + xf86DrvMsg(xf86ScreenToScrn(window->drawable.pScreen)->scrnIndex, + X_INFO, "Updating VRR property for window %p\n", window); amdgpu_vrr_property_update(window, *value != 0); } @@ -173,8 +175,11 @@ amdgpu_delete_property(ClientPtr client) if (stuff->property == amdgpu_vrr_atom && xf86ScreenToScrn(window->drawable.pScreen)->PreInit == - AMDGPUPreInit_KMS) + AMDGPUPreInit_KMS) { + xf86DrvMsg(xf86ScreenToScrn(window->drawable.pScreen)->scrnIndex, + X_INFO, "Deleting VRR property for window %p\n", window); amdgpu_vrr_property_update(window, FALSE); + } return ret; } diff --git a/src/amdgpu_present.c b/src/amdgpu_present.c index fdedd3266..a323a9d77 100644 --- a/src/amdgpu_present.c +++ b/src/amdgpu_present.c @@ -94,9 +94,18 @@ void amdgpu_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); + drmmode_crtc_private_ptr drmmode_crtc = config->crtc[0]->driver_private; + AMDGPUInfoPtr info = AMDGPUPTR(scrn); xf86CrtcPtr crtc; int i; + if (drmmode_crtc->vrr_enabled != vrr_enabled) { + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "%sabling VRR for flipping window %p\n", + vrr_enabled ? "En" : "Dis", + info->flip_window); + } + for (i = 0; i < config->num_crtc; i++) { crtc = config->crtc[i]; drmmode_crtc_set_vrr(crtc, vrr_enabled); @@ -301,6 +310,11 @@ amdgpu_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, if (num_crtcs_on == 0) return FALSE; + if (info->flip_window != window) { + xf86DrvMsg(scrn->scrnIndex, X_INFO, + "Flipping window is %p now, was %p before\n", + window, info->flip_window); + } info->flip_window = window; return TRUE;