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

Qu, Jim Jim.Qu at amd.com
Wed Apr 18 09:44:33 UTC 2018


Yeah, I realize that it should use || . I will check it again with your modification. and then push it immediately. The issue has delayed a long time.

May I get your RB?

Thanks
JimQu

________________________________________
发件人: Michel Dänzer <michel at daenzer.net>
发送时间: 2018年4月18日 17:29
收件人: Qu, Jim
抄送: amd-gfx at lists.freedesktop.org
主题: Re: 答复: [PATCH] sync amdgpu scanout update event before mode setting

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


More information about the amd-gfx mailing list