summaryrefslogtreecommitdiff
path: root/src/i830.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-11 14:55:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-12 21:37:49 +0100
commit9f54107f866a25cf670f81f7c52b8c108728c6a5 (patch)
tree2a47cfa1e4e01980b0f91f8863637e6943c7269a /src/i830.h
parent6c27f6e4f76b97df71094acf25083b2922966b42 (diff)
dri2: Handle reference counting across page flipping
1. Instead of swapping bos, swap the entire private structure. 2. If we update the pixmap bo for the Screen, make sure we update the reference inside intel->front_buffer so that xrandr still functions. Fixes: Bug 27922 - i965: Rapidly resizing OpenGL window causes GPU to hang. https://bugs.freedesktop.org/show_bug.cgi?id=27922 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i830.h')
-rw-r--r--src/i830.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/i830.h b/src/i830.h
index fdaa47ee..9e1b4ca2 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -154,7 +154,17 @@ struct intel_pixmap {
struct list flush, batch, in_flight;
};
-struct intel_pixmap *i830_get_pixmap_intel(PixmapPtr pixmap);
+extern int uxa_pixmap_index;
+
+static inline struct intel_pixmap *i830_get_pixmap_intel(PixmapPtr pixmap)
+{
+ return dixLookupPrivate(&pixmap->devPrivates, &uxa_pixmap_index);
+}
+
+static inline void i830_set_pixmap_intel(PixmapPtr pixmap, struct intel_pixmap *intel)
+{
+ dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, intel);
+}
static inline Bool i830_uxa_pixmap_is_dirty(PixmapPtr pixmap)
{