summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2015-05-29 16:09:51 -0700
committerEric Anholt <eric@anholt.net>2015-06-04 14:15:39 -0700
commit83bf3e60e7fe504e82bd030064e3a7c17624ad44 (patch)
treee32c70af9b373bf84ba66cb34c3fcfef3d702eb0
parentdaaefada7fb313811c2c9a781f69a2b40dd3fcb8 (diff)
downloadlinux-83bf3e60e7fe504e82bd030064e3a7c17624ad44.tar.gz
drm/vc4: Stop using relocations for BRANCH_TO_SUBLIST.
If we're going to insist that the relocation target is the tile alloc BO that we saw during binner config, then just ignore the relocations and point at the tile alloc BO. Saves an immediate .6% or so of CPU, and will let us ditch the relocations we've been processing for it, too. Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/vc4/vc4_validate.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c
index b1f88bb8ecaa..29fc4476f75e 100644
--- a/drivers/gpu/drm/vc4/vc4_validate.c
+++ b/drivers/gpu/drm/vc4/vc4_validate.c
@@ -269,14 +269,11 @@ validate_wait_on_semaphore(VALIDATE_ARGS)
static int
validate_branch_to_sublist(VALIDATE_ARGS)
{
- struct drm_gem_cma_object *target;
uint32_t offset;
- if (!vc4_use_handle(exec, 0, VC4_MODE_TILE_ALLOC, &target))
- return -EINVAL;
-
- if (target != exec->tile_alloc_bo) {
- DRM_ERROR("Jumping to BOs other than tile alloc unsupported\n");
+ if (!exec->tile_alloc_bo) {
+ DRM_ERROR("VC4_PACKET_BRANCH_TO_SUB_LIST seen before "
+ "binner setup\n");
return -EINVAL;
}
@@ -293,7 +290,7 @@ validate_branch_to_sublist(VALIDATE_ARGS)
return -EINVAL;
}
- *(uint32_t *)(validated + 0) = target->paddr + offset;
+ *(uint32_t *)(validated + 0) = exec->tile_alloc_bo->paddr + offset;
return 0;
}