xf86-video-intel: src/intel_dri.c src/intel_uxa.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Oct 5 16:25:37 PDT 2010
src/intel_dri.c | 1 +
src/intel_uxa.c | 4 ++++
2 files changed, 5 insertions(+)
New commits:
commit d1925deedd70c6c4374e42de5aa44989fe328b58
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Oct 6 00:17:03 2010 +0100
Clear pixmap->devPrivate.ptr [regression from 7c7294e]
ModifyPixmapHeader(pixdata = NULL) does not clear the
pixmap->devPrivate.ptr, instead the NULL value is interpreted as meaning
to keep the current value. (This is similar to the interpretation of the
other invalid values like depth=-1 which also mean not to change the
current property). However pixadata=NULL is indeed a valid value, and in
7c7294e, devPrivate.ptr == NULL was used to differentiate a bo pixmap
from a system pixmap. Except that we never did clear the ptr as
intended, and so X would immediately crash.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/intel_dri.c b/src/intel_dri.c
index 1527dba..7d109e9 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -91,6 +91,7 @@ static PixmapPtr get_front_buffer(DrawablePtr drawable, DrawablePtr *ret)
0, 0,
intel->front_pitch,
NULL);
+ pixmap->devPrivate.ptr = NULL;
intel_set_pixmap_bo(pixmap, intel->front_buffer);
}
} else if (intel_get_pixmap_bo(pixmap)) {
diff --git a/src/intel_uxa.c b/src/intel_uxa.c
index d964a95..34649b8 100644
--- a/src/intel_uxa.c
+++ b/src/intel_uxa.c
@@ -796,6 +796,7 @@ static Bool intel_uxa_put_image(PixmapPtr pixmap,
w, h,
0, 0,
stride, NULL);
+ pixmap->devPrivate.ptr = NULL;
intel_set_pixmap_bo(pixmap, bo);
dri_bo_unreference(bo);
@@ -1039,6 +1040,7 @@ intel_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
list_del(&priv->in_flight);
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, stride, NULL);
+ pixmap->devPrivate.ptr = NULL;
intel_set_pixmap_private(pixmap, priv);
return pixmap;
}
@@ -1072,6 +1074,7 @@ intel_uxa_create_pixmap(ScreenPtr screen, int w, int h, int depth,
priv->tiling = tiling;
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, stride, NULL);
+ pixmap->devPrivate.ptr = NULL;
list_init(&priv->batch);
list_init(&priv->flush);
@@ -1108,6 +1111,7 @@ void intel_uxa_create_screen_resources(ScreenPtr screen)
-1, -1,
intel->front_pitch,
NULL);
+ pixmap->devPrivate.ptr = NULL;
}
scrn->displayWidth = intel->front_pitch / intel->cpp;
}
More information about the xorg-commit
mailing list