Thanks for the information Michel. Even in amdgpu_present_flip(), there is a check for amdgpu_window_has_variable_refresh() which actually checks whether window has a variable_refresh property set from the MESA or not ? this check is failing in my case and never calls amdgpu_present_set_screen_vrr. Is there any way that i can check whether MESA is setting this property ?
To my understanding, MESA will set this property to true or false based on whether application is running in Full screen mode or in normal mode. Please correct me if I am wrong. Thanks Uday Kiran On Mon, Apr 20, 2020 at 8:14 PM Michel Dänzer <mic...@daenzer.net> wrote: > On 2020-04-20 6:12 a.m., uday kiran pichika wrote: > > Hello Team, > > > > I'm working on adding Adaptive Sync feature in Xserver/modesetting. When > > understanding the existing AMD's implementation, I've few doubts > regarding > > the vrr property being set on the Window from MESA. > > > > I have made the modifications in xserver/modesetting but when i launch > the > > application(DOTA2), below condition gets failed > > > https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/blob/master/src/amdgpu_kms.c#L110 > > BTW, one should always use a specific Git commit for this kind of > reference, otherwise it will tend to point to unrelated code or even > nirvana as time passes. > > > > As per the code, i had a confusion that this condition will never met. > > > > *I had analysed the code and here is the analysis made when the flip > > happens in xserver When full screen gaming application is opened, > > variable_refresh property is being set in MESA and xserver will get > > notified with amdgpu_change_property() method(Same method we registered > > with the client during AMDGPUScreenInit_KMS()). * > > > > *Below actions will happen in ms_change_property() * > > > > *1. Create Local WindowPtr and copy the data from Stuff->window to this > > WindowPtr* > > > > *2. Call amdgpu_vrr_property_update() based on the property set in Stuff > by > > passing the WindowPtr to it.* > > > > * a. Read Private Keys for WindowPtr in amdgpu_vrr_property_update(). > * > > > > * b. Compare info->flip_window and this WindowPtr and make a call to > > amdgpu_present_set_screen_vrr(). → But this method will never gets > called > > due to the condition mismatch every time. Why ? * > > > > *Why ?* > > > > *info->flip_window gets updated with window (WindowPtr) > > in amdgpu_present_check_flip() when amdgpu_present_flip() method gets > > called from DIX. This pointer will never same as the WindowPtr created in > > amdgpu_change_property() and variable_refresh flag is being set for in > > amdgpu_change_property() WindowPtr only. * > > > > Can you please help me in understanding on this ? > > This code in amdgpu_vrr_property_update is for the case when the > ChangeProperty request is called for a window which is already flipping. > > In the case you're looking at, the window only starts flipping later, > and the KMS property is enabled from amdgpu_present_flip => > amdgpu_present_set_screen_vrr. > > > -- > Earthling Michel Dänzer | https://redhat.com > Libre software enthusiast | Mesa and X developer >
_______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx