diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-06 00:17:03 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-03-16 18:43:44 +0000 |
commit | 38f467ce6a521b58384f9a0ee5088df52da4f383 (patch) | |
tree | 24bc57fbdd9ab4e7406171c8407f7df98d1c4097 /src/intel_uxa.c | |
parent | fe71c4a928785d03598399f03b7bdd851aaca6c1 (diff) |
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@chris-wilson.co.uk>
(cherry picked from commit d1925deedd70c6c4374e42de5aa44989fe328b58)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
Diffstat (limited to 'src/intel_uxa.c')
-rw-r--r-- | src/intel_uxa.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel_uxa.c b/src/intel_uxa.c index cfa30ab0..694b7502 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -783,6 +783,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); @@ -1026,6 +1027,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; } @@ -1061,6 +1063,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); @@ -1097,6 +1100,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; } |