summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-07-02 13:04:51 -0700
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-07-02 13:08:15 -0700
commitc1755599db1d9a20954b84ccc07afd892bb6ac9e (patch)
tree9c339b55d6d965581d22b330ae8f72fe1d58c873
parent324b4686204feb3a7370eeecaff8ba44635f73ca (diff)
Clear the bo on the rotate scratch pixmap
Since the scratch pixmap header will be re-used after allocation, we need to clear its bo attachment when we stop using it, otherwise a later user will use a bogus bo. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--src/drmmode_display.c4
-rw-r--r--src/i830_display.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d5904ad5..e9296dce 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -382,8 +382,10 @@ drmmode_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *dat
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
- if (rotate_pixmap)
+ if (rotate_pixmap) {
+ i830_set_pixmap_bo(rotate_pixmap, NULL);
FreeScratchPixmapHeader(rotate_pixmap);
+ }
if (data) {
diff --git a/src/i830_display.c b/src/i830_display.c
index 26874c5c..59ededcf 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1966,8 +1966,10 @@ i830_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
ScrnInfoPtr pScrn = crtc->scrn;
I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
- if (rotate_pixmap)
+ if (rotate_pixmap) {
+ i830_set_pixmap_bo(rotate_pixmap, NULL);
FreeScratchPixmapHeader(rotate_pixmap);
+ }
if (data) {
/* Be sure to sync acceleration before the memory gets unbound. */