summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-03-30 07:24:42 +0100
committerOwain G. Ainsworth <oga@openbsd.org>2011-05-29 23:34:28 +0100
commitc8e6b5af2994b5ba2f745634a2a90f1c6303b6d1 (patch)
treed7539526fc4391ef5a8fc80974e1d41e0762d460
parente8739a9cc5be501d75f5218ade44793e2f71f314 (diff)
Add a DRI2SwapEventPtr typedef for retro xservers
Because people are still trying to build upon our solid historical foundations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit 630d77bf10ba6234bb9c04538636f7d8aa319aea) Conflicts: src/intel.h
-rw-r--r--src/intel.h37
-rw-r--r--src/intel_dri.c19
2 files changed, 37 insertions, 19 deletions
diff --git a/src/intel.h b/src/intel.h
index 06faf2da..8351f002 100644
--- a/src/intel.h
+++ b/src/intel.h
@@ -813,6 +813,43 @@ enum {
DEBUG_FLUSH_WAIT = 0x4,
};
+extern Bool intel_mode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp);
+extern void intel_mode_init(struct intel_screen_private *intel);
+extern void intel_mode_remove_fb(intel_screen_private *intel);
+extern void intel_mode_fini(intel_screen_private *intel);
+
+extern int intel_get_pipe_from_crtc_id(drm_intel_bufmgr *bufmgr, xf86CrtcPtr crtc);
+extern int intel_crtc_id(xf86CrtcPtr crtc);
+extern int intel_output_dpms_status(xf86OutputPtr output);
+
+enum DRI2FrameEventType {
+ DRI2_SWAP,
+ DRI2_FLIP,
+ DRI2_WAITMSC,
+};
+
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1,7,99,3,0)
+typedef void (*DRI2SwapEventPtr)(ClientPtr client, void *data, int type,
+ CARD64 ust, CARD64 msc, CARD64 sbc);
+#endif
+
+typedef struct _DRI2FrameEvent {
+ XID drawable_id;
+ XID client_id; /* fake client ID to track client destruction */
+ ClientPtr client;
+ enum DRI2FrameEventType type;
+ int frame;
+
+ /* for swaps & flips only */
+ DRI2SwapEventPtr event_complete;
+ void *event_data;
+ DRI2BufferPtr front;
+ DRI2BufferPtr back;
+} DRI2FrameEventRec, *DRI2FrameEventPtr;
+
+extern Bool intel_do_pageflip(intel_screen_private *intel,
+ dri_bo *new_front,
+ DRI2FrameEventPtr flip_info, int ref_crtc_hw_id);
static inline intel_screen_private *
intel_get_screen_private(ScrnInfoPtr scrn)
diff --git a/src/intel_dri.c b/src/intel_dri.c
index 32d4f3b1..0a654924 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -568,25 +568,6 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
#if DRI2INFOREC_VERSION >= 4
-enum DRI2FrameEventType {
- DRI2_SWAP,
- DRI2_FLIP,
- DRI2_WAITMSC,
-};
-
-typedef struct _DRI2FrameEvent {
- XID drawable_id;
- ClientPtr client;
- enum DRI2FrameEventType type;
- int frame;
-
- /* for swaps & flips only */
- DRI2SwapEventPtr event_complete;
- void *event_data;
- DRI2BufferPtr front;
- DRI2BufferPtr back;
-} DRI2FrameEventRec, *DRI2FrameEventPtr;
-
static int
I830DRI2DrawablePipe(DrawablePtr pDraw)
{