summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-07 21:08:52 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-10-07 21:09:23 +0100
commit57c48e4973ac0dad09744eaa82315a5f023094e7 (patch)
treea6fb231c5ed4ce9d10aa4dacc142e62818b3c77f
parentc481254c17316e6c8299705fd0a218484dd369fe (diff)
sna: Fix the TearFree flip handler for the change in argument order
From the last commit c481254c17316e6c8299705fd0a218484dd369fe, we need to pass along the private pointer as the flip data as we no longer pass it down from the caller. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 01ba234f..48cdb251 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -6826,7 +6826,11 @@ sna_crtc_redisplay(xf86CrtcPtr crtc, RegionPtr region, struct kgem_bo *bo)
sna_crtc_redisplay__fallback(crtc, region, bo);
}
-#define shadow_flip_handler (sna_flip_handler_t)sna_mode_redisplay
+static void shadow_flip_handler(struct drm_event_vblank *e,
+ void *data)
+{
+ sna_mode_redisplay(data);
+}
void sna_shadow_set_crtc(struct sna *sna,
xf86CrtcPtr crtc,
@@ -7060,6 +7064,7 @@ disable1:
assert(sna_crtc->flip_bo == NULL);
sna_crtc->flip_handler = shadow_flip_handler;
+ sna_crtc->flip_data = sna;
sna_crtc->flip_bo = bo;
sna_crtc->flip_bo->active_scanout++;
sna_crtc->flip_serial = sna_crtc->mode_serial;
@@ -7196,6 +7201,7 @@ fixup_flip:
assert(crtc->flip_bo == NULL);
crtc->flip_handler = shadow_flip_handler;
+ crtc->flip_data = sna;
crtc->flip_bo = kgem_bo_reference(flip_bo);
crtc->flip_bo->active_scanout++;
crtc->flip_serial = crtc->mode_serial;