Re: [PATCH xf86-video-amdgpu 2/2] Wait for pending flips in drmmode_output_set_tear_free
On 2018-04-26 08:48 PM, Samuel Li wrote: > On 2018-04-26 11:58 AM, Michel Dänzer wrote: >> From: Michel Dänzer>> >> This prevents a nested call to drmHandleEvent, which would hang. >> >> Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is >> page flipping. >> >> Signed-off-by: Michel Dänzer >> --- >> src/drmmode_display.c | 9 + >> 1 file changed, 9 insertions(+) >> >> diff --git a/src/drmmode_display.c b/src/drmmode_display.c >> index cf1e5d1f1..4fac645b9 100644 >> --- a/src/drmmode_display.c >> +++ b/src/drmmode_display.c >> @@ -1750,6 +1750,15 @@ drmmode_output_set_tear_free(AMDGPUEntPtr pAMDGPUEnt, >> drmmode_output->tear_free = tear_free; >> >> if (crtc) { >> +drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; >> + >> +/* Wait for pending flips before drmmode_set_mode_major calls > Trailing white space. > Otherwise the two patches are > Reviewed-by: Samuel Li Thanks Sam! I removed the trailing white space before pushing. -- Earthling Michel Dänzer | http://www.amd.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
Re: [PATCH xf86-video-amdgpu 2/2] Wait for pending flips in drmmode_output_set_tear_free
On 2018-04-26 11:58 AM, Michel Dänzer wrote: > From: Michel Dänzer> > This prevents a nested call to drmHandleEvent, which would hang. > > Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is > page flipping. > > Signed-off-by: Michel Dänzer > --- > src/drmmode_display.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/src/drmmode_display.c b/src/drmmode_display.c > index cf1e5d1f1..4fac645b9 100644 > --- a/src/drmmode_display.c > +++ b/src/drmmode_display.c > @@ -1750,6 +1750,15 @@ drmmode_output_set_tear_free(AMDGPUEntPtr pAMDGPUEnt, > drmmode_output->tear_free = tear_free; > > if (crtc) { > + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; > + > + /* Wait for pending flips before drmmode_set_mode_major calls Trailing white space. Otherwise the two patches are Reviewed-by: Samuel Li Sam > + * drmmode_crtc_update_tear_free, to prevent a nested > + * drmHandleEvent call, which would hang > + */ > + drmmode_crtc_wait_pending_event(drmmode_crtc, > + pAMDGPUEnt->fd, > + drmmode_crtc->flip_pending); > drmmode_set_mode_major(crtc, >mode, crtc->rotation, > crtc->x, crtc->y); > } > ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH xf86-video-amdgpu 2/2] Wait for pending flips in drmmode_output_set_tear_free
From: Michel DänzerThis prevents a nested call to drmHandleEvent, which would hang. Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is page flipping. Signed-off-by: Michel Dänzer --- src/drmmode_display.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index cf1e5d1f1..4fac645b9 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1750,6 +1750,15 @@ drmmode_output_set_tear_free(AMDGPUEntPtr pAMDGPUEnt, drmmode_output->tear_free = tear_free; if (crtc) { + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + + /* Wait for pending flips before drmmode_set_mode_major calls +* drmmode_crtc_update_tear_free, to prevent a nested +* drmHandleEvent call, which would hang +*/ + drmmode_crtc_wait_pending_event(drmmode_crtc, + pAMDGPUEnt->fd, + drmmode_crtc->flip_pending); drmmode_set_mode_major(crtc, >mode, crtc->rotation, crtc->x, crtc->y); } -- 2.17.0 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx