summaryrefslogtreecommitdiff
path: root/src/sna/sna.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-10-07 16:24:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-10-07 16:30:03 +0100
commitc481254c17316e6c8299705fd0a218484dd369fe (patch)
treef0e9e1496ae1f51e48ef0c7b77edc9ae61bbe671 /src/sna/sna.h
parent9ed1ac8b506509be410c12870397417c7638886e (diff)
sna: Retrieve private pointer from vblank cookie
When using ZaphodHeads, we share the /dev/dri/card0 fd between both screens. So when we read an event back from the fd, it could be for either head and we cannot assume that our private pointer is valid for the data passed along with the event. Instead, we need to retreive that pointer from the event. Fixes regression from commit 8369166349c92a20d9a2e7d0256e63f66fe2682b [2.99.912] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jun 4 08:29:51 2014 +0100 sna/dri2: Enable immediate buffer exchanges although the design bug is actually older. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84744#c15 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna.h')
-rw-r--r--src/sna/sna.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 4cd85d19..1a6244b2 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -445,8 +445,7 @@ extern void sna_crtc_config_notify(ScreenPtr screen);
extern bool sna_cursors_init(ScreenPtr screen, struct sna *sna);
-typedef void (*sna_flip_handler_t)(struct sna *sna,
- struct drm_event_vblank *e,
+typedef void (*sna_flip_handler_t)(struct drm_event_vblank *e,
void *data);
extern int sna_page_flip(struct sna *sna,
@@ -544,14 +543,14 @@ static inline uint64_t ust64(int tv_sec, int tv_usec)
#if HAVE_DRI2
bool sna_dri2_open(struct sna *sna, ScreenPtr pScreen);
void sna_dri2_page_flip_handler(struct sna *sna, struct drm_event_vblank *event);
-void sna_dri2_vblank_handler(struct sna *sna, struct drm_event_vblank *event);
+void sna_dri2_vblank_handler(struct drm_event_vblank *event);
void sna_dri2_pixmap_update_bo(struct sna *sna, PixmapPtr pixmap, struct kgem_bo *bo);
void sna_dri2_destroy_window(WindowPtr win);
void sna_dri2_close(struct sna *sna, ScreenPtr pScreen);
#else
static inline bool sna_dri2_open(struct sna *sna, ScreenPtr pScreen) { return false; }
static inline void sna_dri2_page_flip_handler(struct sna *sna, struct drm_event_vblank *event) { }
-static inline void sna_dri2_vblank_handler(struct sna *sna, struct drm_event_vblank *event) { }
+static inline void sna_dri2_vblank_handler(struct drm_event_vblank *event) { }
static inline void sna_dri2_pixmap_update_bo(struct sna *sna, PixmapPtr pixmap, struct kgem_bo *bo) { }
static inline void sna_dri2_destroy_window(WindowPtr win) { }
static inline void sna_dri2_close(struct sna *sna, ScreenPtr pScreen) { }
@@ -569,13 +568,12 @@ static inline void sna_dri3_close(struct sna *sna, ScreenPtr pScreen) { }
bool sna_present_open(struct sna *sna, ScreenPtr pScreen);
void sna_present_update(struct sna *sna);
void sna_present_close(struct sna *sna, ScreenPtr pScreen);
-void sna_present_vblank_handler(struct sna *sna,
- struct drm_event_vblank *event);
+void sna_present_vblank_handler(struct drm_event_vblank *event);
#else
static inline bool sna_present_open(struct sna *sna, ScreenPtr pScreen) { return false; }
static inline void sna_present_update(struct sna *sna) { }
static inline void sna_present_close(struct sna *sna, ScreenPtr pScreen) { }
-static inline void sna_present_vblank_handler(struct sna *sna, struct drm_event_vblank *event) { }
+static inline void sna_present_vblank_handler(struct drm_event_vblank *event) { }
#endif
extern bool sna_crtc_set_sprite_rotation(xf86CrtcPtr crtc, uint32_t rotation);