it doesn't work as expected Change-Id: I21c4a5251105f8293686a5d6331b7c23e02854e9 Signed-off-by: Flora Cui <flora.cui@xxxxxxx> --- src/amdgpu_kms.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c index 74d5806..54d7e9e 100644 --- a/src/amdgpu_kms.c +++ b/src/amdgpu_kms.c @@ -66,7 +66,6 @@ static DevPrivateKeyRec amdgpu_window_private_key; static DevScreenPrivateKeyRec amdgpu_client_private_key; DevScreenPrivateKeyRec amdgpu_device_private_key; -static Atom amdgpu_vrr_atom; static Bool amdgpu_property_vectors_wrapped; static Bool restore_property_vector; static int (*saved_change_property) (ClientPtr client); @@ -136,7 +135,7 @@ amdgpu_change_property(ClientPtr client) if (ret != Success) return ret; - if (stuff->property == amdgpu_vrr_atom && + if (!strcmp(NameForAtom(stuff->property), "_VARIABLE_REFRESH") && xf86ScreenToScrn(window->drawable.pScreen)->PreInit == AMDGPUPreInit_KMS && stuff->format == 32 && stuff->nUnits == 1) { uint32_t *value = (uint32_t*)(stuff + 1); @@ -171,7 +170,7 @@ amdgpu_delete_property(ClientPtr client) if (ret != Success) return ret; - if (stuff->property == amdgpu_vrr_atom && + if (!strcmp(NameForAtom(stuff->property), "_VARIABLE_REFRESH") && xf86ScreenToScrn(window->drawable.pScreen)->PreInit == AMDGPUPreInit_KMS) amdgpu_vrr_property_update(window, FALSE); @@ -2187,9 +2186,6 @@ Bool AMDGPUScreenInit_KMS(ScreenPtr pScreen, int argc, char **argv) ProcVector[X_DeleteProperty] = amdgpu_delete_property; amdgpu_property_vectors_wrapped = TRUE; } - - amdgpu_vrr_atom = MakeAtom("_VARIABLE_REFRESH", - strlen("_VARIABLE_REFRESH"), TRUE); } drmmode_init(pScrn, &info->drmmode); -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx