summaryrefslogtreecommitdiff
path: root/src/i830.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-06-15 12:48:57 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-06-17 14:08:11 +0100
commit0e0101758438debf98f989d815989b45e78cf5f6 (patch)
tree03dfe959978b113b9015c4ab462e33fc79865378 /src/i830.h
parent2ff7a2fc9d939554502e9adec89cae5597a9e82c (diff)
i830: Tidy i830_uxa_put_image()
Use a single code path to upload the image data after selecting the right bo, and take advantage of pwrite() when possible. Fixes: Bug 28569 - [i965] IGN's flash-based video player crashes X https://bugs.freedesktop.org/show_bug.cgi?id=28569 Bug 28573 - [i965] Fullscreen flash and windowed SDL games fail to update the screen https://bugs.freedesktop.org/show_bug.cgi?id=28573 Reported-and-tested-by: Brian Rogers <brian@xyzw.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i830.h')
-rw-r--r--src/i830.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/i830.h b/src/i830.h
index 02220ea9..a5fee3dc 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -165,12 +165,17 @@ list_is_empty(struct list *head)
struct intel_pixmap {
dri_bo *bo;
- uint32_t tiling, stride;
- uint32_t flush_write_domain;
- uint32_t flush_read_domains;
- uint32_t batch_write_domain;
- uint32_t batch_read_domains;
+
struct list flush, batch, in_flight;
+
+ int8_t busy;
+ uint8_t tiling;
+ uint16_t stride;
+
+ uint16_t flush_write_domain;
+ uint16_t flush_read_domains;
+ uint16_t batch_write_domain;
+ uint16_t batch_read_domains;
};
#if HAS_DEVPRIVATEKEYREC
@@ -188,6 +193,13 @@ static inline struct intel_pixmap *i830_get_pixmap_intel(PixmapPtr pixmap)
#endif
}
+static inline Bool intel_pixmap_is_busy(struct intel_pixmap *priv)
+{
+ if (priv->busy == -1)
+ priv->busy = drm_intel_bo_busy(priv->bo);
+ return priv->busy;
+}
+
static inline void i830_set_pixmap_intel(PixmapPtr pixmap, struct intel_pixmap *intel)
{
dixSetPrivate(&pixmap->devPrivates, &uxa_pixmap_index, intel);