xf86-video-intel: 3 commits - src/sna/kgem.c src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Dec 13 05:55:08 PST 2011
src/sna/kgem.c | 4 ++--
src/sna/sna_accel.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit e39ea29bcc5d1d76dd5cb3db555516ef848647a5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Dec 13 13:18:56 2011 +0000
sna: Allow the debugger to map bo from the batch during kgem_submit()
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 972f023..fca5cd7 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1888,7 +1888,7 @@ void *kgem_bo_map(struct kgem *kgem, struct kgem_bo *bo, int prot)
{
void *ptr;
- assert(bo->refcnt);
+ assert(bo->refcnt || bo->exec); /* allow for debugging purposes */
assert(!bo->purged);
if (IS_CPU_MAP(bo->map)) {
commit 2fabb5068d36ce97242844066b5121fcf6d9c24e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Dec 13 13:15:51 2011 +0000
sna: Debug fixup for non-LLC systems
The cpu bo is only allocated on LLC systems, so do avoid the NULL deref on
debugging for others.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index c7b4ebf..be73f68 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -213,10 +213,10 @@ static void sna_pixmap_alloc_cpu(struct sna *sna,
static void sna_pixmap_free_cpu(struct sna *sna, struct sna_pixmap *priv)
{
- DBG(("%s: discarding CPU buffer, handle=%d, size=%d\n",
- __FUNCTION__, priv->cpu_bo->handle, priv->cpu_bo->size));
-
if (priv->cpu_bo) {
+ DBG(("%s: discarding CPU buffer, handle=%d, size=%d\n",
+ __FUNCTION__, priv->cpu_bo->handle, priv->cpu_bo->size));
+
kgem_bo_unmap__cpu(&sna->kgem, priv->cpu_bo, priv->ptr);
kgem_bo_destroy(&sna->kgem, priv->cpu_bo);
commit e037379c8e57f8e42956863c10a4e2b18057a6d5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Dec 13 13:14:15 2011 +0000
sna: Fix a debugging assert
The bo is allowed to be NULL, so defer the assert until after it is
known to be non-NULL.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index b76a180..972f023 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1807,13 +1807,13 @@ uint32_t kgem_add_reloc(struct kgem *kgem,
{
int index;
- assert(bo->refcnt);
assert((read_write_domain & 0x7fff) == 0 || bo != NULL);
index = kgem->nreloc++;
assert(index < ARRAY_SIZE(kgem->reloc));
kgem->reloc[index].offset = pos * sizeof(kgem->batch[0]);
if (bo) {
+ assert(bo->refcnt);
assert(!bo->purged);
delta += bo->delta;
More information about the xorg-commit
mailing list