remove amdgpu_vrr_atom

Submitted by Cui, Flora on March 7, 2019, 3:25 a.m.

Details

Message ID 1551929107-20010-1-git-send-email-flora.cui@amd.com
State New
Headers show
Series "remove amdgpu_vrr_atom" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Cui, Flora March 7, 2019, 3:25 a.m.
it doesn't work as expected

Change-Id: I21c4a5251105f8293686a5d6331b7c23e02854e9
Signed-off-by: Flora Cui <flora.cui@amd.com>
---
 src/amdgpu_kms.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

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);

Comments

Hi Flora,


note that xf86-video-amdgpu patches are reviewed as GitLab merge
requests these days, as documented in README.md:

https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests


On 2019-03-07 4:25 a.m., Cui, Flora wrote:
> it doesn't work as expected

Why is that? Maybe you ran into the Mesa bug fixed by
https://gitlab.freedesktop.org/mesa/mesa/commit/c0a540f32067cc8cb126d9aa1eb12a11cf15373a?merge_request_iid=202
, or a similar bug elsewhere?
Drop amd-gfx.

Hi Michel, 
Thanks for your info.

Hi Hui,
Could you make similar changes in ugl?

-----Original Message-----
From: Michel Dänzer <michel@daenzer.net> 

Sent: Thursday, March 07, 2019 5:05 PM
To: Cui, Flora <Flora.Cui@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] remove amdgpu_vrr_atom


Hi Flora,


note that xf86-video-amdgpu patches are reviewed as GitLab merge requests these days, as documented in README.md:

https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests


On 2019-03-07 4:25 a.m., Cui, Flora wrote:
> it doesn't work as expected


Why is that? Maybe you ran into the Mesa bug fixed by
https://gitlab.freedesktop.org/mesa/mesa/commit/c0a540f32067cc8cb126d9aa1eb12a11cf15373a?merge_request_iid=202
, or a similar bug elsewhere?


-- 
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer