diff options
author | Eric Anholt <eric@anholt.net> | 2014-10-17 12:19:19 +0100 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2015-06-04 14:15:22 -0700 |
commit | 5a7327694bb9c3a207a21499b6ecc09d2adf7cd4 (patch) | |
tree | 8d5762b6a81e6117d703da98c7ea59520f34b9ec | |
parent | 6b6ad00fbb3f3e7dca47f82f6563a619c920d202 (diff) | |
download | linux-5a7327694bb9c3a207a21499b6ecc09d2adf7cd4.tar.gz |
drm/vc4: Pass through the EOF flag in the low bits of tile store general.
We'll use the frame counts to make sure that the render job was
actually completed.
Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_validate.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_validate.c b/drivers/gpu/drm/vc4/vc4_validate.c index 1baf1e45dad3..977e071d22dc 100644 --- a/drivers/gpu/drm/vc4/vc4_validate.c +++ b/drivers/gpu/drm/vc4/vc4_validate.c @@ -268,7 +268,7 @@ validate_loadstore_tile_buffer_general(VALIDATE_ARGS) uint32_t packet_b1 = *(uint8_t *)(untrusted + 1); struct drm_gem_cma_object *fbo; uint32_t buffer_type = packet_b0 & 0xf; - uint32_t offset, cpp; + uint32_t untrusted_address, offset, cpp; switch (buffer_type) { case VC4_LOADSTORE_TILE_BUFFER_NONE: @@ -295,7 +295,8 @@ validate_loadstore_tile_buffer_general(VALIDATE_ARGS) if (!vc4_use_handle(exec, 0, VC4_MODE_RENDER, &fbo)) return -EINVAL; - offset = *(uint32_t *)(untrusted + 2) & ~0xf; + untrusted_address = *(uint32_t *)(untrusted + 2); + offset = untrusted_address & ~0xf; if (!check_tex_size(exec, fbo, offset, ((packet_b0 & @@ -305,7 +306,8 @@ validate_loadstore_tile_buffer_general(VALIDATE_ARGS) return -EINVAL; } - *(uint32_t *)(validated + 2) = offset + fbo->paddr; + *(uint32_t *)(validated + 2) = (offset + fbo->paddr + + (untrusted_address & 0xf)); return 0; } |