diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-05-21 08:58:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-02 08:32:11 +0100 |
commit | 975b9798be77b30cbed485583d0ccb48318708f7 (patch) | |
tree | bf261f2cabeebff54c92a24f2ed751e8c2e9c9d5 /src/sna/sna.h | |
parent | d8eb87f84f88ad2df42c6fed1d93df76589a14e3 (diff) |
sna: Add support for Present
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna.h')
-rw-r--r-- | src/sna/sna.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/sna/sna.h b/src/sna/sna.h index 5114927d..b9a40db1 100644 --- a/src/sna/sna.h +++ b/src/sna/sna.h @@ -340,6 +340,13 @@ struct sna { #endif } dri3; + struct sna_present { + bool available; + bool open; +#if HAVE_PRESENT +#endif + } present; + struct sna_xv { XvAdaptorPtr adaptors; int num_adaptors; @@ -538,6 +545,22 @@ static inline bool sna_dri3_open(struct sna *sna, ScreenPtr pScreen) { return fa static inline void sna_dri3_close(struct sna *sna, ScreenPtr pScreen) { } #endif +#if HAVE_PRESENT +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_flip_handler(struct sna *sna, + struct drm_event_vblank *event); +void sna_present_vblank_handler(struct sna *sna, + 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_flip_handler(struct sna *sna, struct drm_event_vblank *event) { } +static inline void sna_present_vblank_handler(struct sna *sna, struct drm_event_vblank *event) { } +#endif + extern bool sna_crtc_set_sprite_rotation(xf86CrtcPtr crtc, uint32_t rotation); extern int sna_crtc_to_pipe(xf86CrtcPtr crtc); extern uint32_t sna_crtc_to_sprite(xf86CrtcPtr crtc); |