Re: 答复: [PATCH] sync amdgpu scanout update event before mode setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-04-18 11:12 AM, Qu, Jim wrote:
> Hi Michel,
> 
> drmmode_crtc_wait_pending_event(drmmode_crtc, pAMDGPUEnt->fd,
>                                 drmmode_crtc->flip_pending ||
>                                 drmmode_crtc->scanout_update_pending);
> 
> Here, should not use && for this condition?

No; that would only wait as long as both drmmode_crtc->flip_pending and
drmmode_crtc->scanout_update_pending are non-zero, i.e. while a TearFree
flip is pending. But it needs to wait while a non-TearFree flip is
pending as well (as the existing code did), and while a non-TearFree
scanout update is pending (the case your patch fixes).


Anyway, I've come to realize this isn't the right place to fix the
problem, it should only be done when drmmode_crtc_scanout_free is
called:

		if (drmmode_crtc->scanout[scanout_id].pixmap &&
		    fb != amdgpu_pixmap_get_fb(drmmode_crtc->
					       scanout[scanout_id].pixmap)) {
			drmmode_crtc_wait_pending_event(drmmode_crtc, pAMDGPUEnt->fd,
							drmmode_crtc->scanout_update_pending);
			drmmode_crtc_scanout_free(drmmode_crtc);
		} ...

Do you prefer if I make this modification to your patch before pushing
it, or submit my own patch instead?


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


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux