drm/radeon/kms: fix r600 vbo size computation
Subsystems (2)
PATCH 1/1 drm/radeon/kms: fix r600 vbo size computation
size given in resource is the exact size (not size - 1)
Signed-off-by Jerome Glisse <[email protected]>
--- drivers/gpu/drm/radeon/r600_cs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/r600_cs.c +1 -1
@@ -1401,7 +1401,7 @@ static int r600_packet3_check(struct radeon_cs_parser *p,return -EINVAL ; } offset =radeon_get_ib_value (p, idx+1 +(i*7 )+0 ); - size =radeon_get_ib_value (p, idx+1 +(i*7 )+1 ) +1 ; + size =radeon_get_ib_value (p, idx+1 +(i*7 )+1 );if (p->rdev && (size + offset) >radeon_bo_size (reloc->robj)) {/* force size to size of the buffer */ dev_warn(p->dev, "vbo resource seems too big (%d) for the bo (%ld)\n",
Signature · 1 line
1.7.0.1
Alex Deucher
NAKQuoted 2 lines · Jerome Glisse
size given in resource is the exact size (not size - 1)
NAK, the vtx resource size is size minus 1. See the accel code in the ddx and the code in r600 driver in mesa.
Alex
Quoted 26 lines
Signed-off-by Jerome Glisse <[email protected]>---
drivers/gpu/drm/radeon/r600_cs.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/r600_cs.c +1
-2@@ -1401,7 +1401,7 @@ static int r600_packet3_check(struct radeon_cs_parser *p, return -EINVAL; } offset = radeon_get_ib_value(p, idx+1+(i*7)+0); - size = radeon_get_ib_value(p, idx+1+(i*7)+1) + 1; + size = radeon_get_ib_value(p, idx+1+(i*7)+1); if (p->rdev && (size + offset) > radeon_bo_size(reloc->robj)) { /* force size to size of the buffer */ dev_warn(p->dev, "vbo resource seems too big (%d) for the bo (%ld)\n", --1.7.0.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel