summaryrefslogtreecommitdiff
path: root/src/amdgpu_dri2.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2016-03-18 17:14:49 +0900
committerMichel Dänzer <michel@daenzer.net>2016-03-23 18:58:12 +0900
commitacd5da56f502d6ad115501e77bce06fe72b1895c (patch)
tree8d8adcceec6233247976adfe294ea4a6879deb2b /src/amdgpu_dri2.c
parenta58bfa98208cc092014d3f36a08714eb1e0d8814 (diff)
DRI2: Also clear dri2_flipping when client disconnects before event
Fixes the following problem: With DRI3 enabled, run glxgears with LIBGL_DRI3_DISABLE=1, make it fullscreen and press Escape while it's still fullscreen. This could result in dri2_flipping not getting cleared, spuriously preventing apps using DRI3 from flipping. (Ported from radeon commit e87365117acbd80b7d80fbb5eb30890ef7153291) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_dri2.c')
-rw-r--r--src/amdgpu_dri2.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index bcb5dae..6867959 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -526,6 +526,9 @@ xf86CrtcPtr amdgpu_dri2_drawable_crtc(DrawablePtr pDraw, Bool consider_disabled)
static void
amdgpu_dri2_flip_event_abort(ScrnInfoPtr scrn, void *event_data)
{
+ AMDGPUInfoPtr info = AMDGPUPTR(scrn);
+
+ info->drmmode.dri2_flipping = FALSE;
free(event_data);
}
@@ -533,7 +536,6 @@ static void
amdgpu_dri2_flip_event_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec,
void *event_data)
{
- AMDGPUInfoPtr info = AMDGPUPTR(scrn);
DRI2FrameEventPtr flip = event_data;
unsigned tv_sec, tv_usec;
DrawablePtr drawable;
@@ -578,7 +580,6 @@ amdgpu_dri2_flip_event_handler(ScrnInfoPtr scrn, uint32_t frame, uint64_t usec,
DRI2SwapComplete(flip->client, drawable, frame, tv_sec, tv_usec,
DRI2_FLIP_COMPLETE, flip->event_complete,
flip->event_data);
- info->drmmode.dri2_flipping = FALSE;
break;
default:
xf86DrvMsg(scrn->scrnIndex, X_WARNING,