projects
/
platform
/
upstream
/
xf86-video-intel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7df3da1
)
sna: Add assertions for set/get binding
author
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 29 Jan 2014 13:15:43 +0000
(13:15 +0000)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 29 Jan 2014 13:15:43 +0000
(13:15 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/kgem.c
patch
|
blob
|
history
diff --git
a/src/sna/kgem.c
b/src/sna/kgem.c
index
0c3e0b0
..
14a3f95
100644
(file)
--- a/
src/sna/kgem.c
+++ b/
src/sna/kgem.c
@@
-6592,6
+6592,8
@@
uint32_t kgem_bo_get_binding(struct kgem_bo *bo, uint32_t format)
{
struct kgem_bo_binding *b;
+ assert(bo->refcnt);
+
for (b = &bo->binding; b && b->offset; b = b->next)
if (format == b->format)
return b->offset;
@@
-6603,6
+6605,8
@@
void kgem_bo_set_binding(struct kgem_bo *bo, uint32_t format, uint16_t offset)
{
struct kgem_bo_binding *b;
+ assert(bo->refcnt);
+
for (b = &bo->binding; b; b = b->next) {
if (b->offset)
continue;