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