diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-01-21 15:20:35 +0000 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2016-03-07 15:36:58 +0100 |
commit | 33b1be99fb4cfd0d7d483a9947f9c95d6d17ede9 (patch) | |
tree | ce51406e625ae4880e429ef67b2ade2ec8e486db /drivers | |
parent | 90747b9511d14a2eb6c7dbd78ea9251e3b2b092a (diff) | |
download | op-kernel-dev-33b1be99fb4cfd0d7d483a9947f9c95d6d17ede9.zip op-kernel-dev-33b1be99fb4cfd0d7d483a9947f9c95d6d17ede9.tar.gz |
drm: etnaviv: clean up GPU command submission
Clean up the GPU command submission path to prepare for the next change.
This makes the next change easier to read and understand.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_buffer.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_buffer.c b/drivers/gpu/drm/etnaviv/etnaviv_buffer.c index 22b3bfa..2a10463 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_buffer.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_buffer.c @@ -224,7 +224,8 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, { struct etnaviv_cmdbuf *buffer = gpu->buffer; unsigned int waitlink_offset = buffer->user_size - 16; - u32 back, link_target, link_size, reserve_size, extra_size = 0; + u32 back, reserve_size, extra_size = 0; + u32 link_target, link_dwords; if (drm_debug & DRM_UT_DRIVER) etnaviv_buffer_dump(gpu, buffer, 0, 0x50); @@ -251,7 +252,7 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, /* save offset back into main buffer */ back = buffer->user_size + reserve_size - 6 * 4; - link_size = 6; + link_dwords = 6; /* Skip over any extra instructions */ link_target += extra_size * sizeof(u32); @@ -261,10 +262,10 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, link_target, gpu_va(gpu, cmdbuf), cmdbuf->vaddr); /* jump back from cmd to main buffer */ - CMD_LINK(cmdbuf, link_size, link_target); + CMD_LINK(cmdbuf, link_dwords, link_target); link_target = gpu_va(gpu, cmdbuf); - link_size = cmdbuf->size / 8; + link_dwords = cmdbuf->size / 8; if (drm_debug & DRM_UT_DRIVER) { print_hex_dump(KERN_INFO, "cmd ", DUMP_PREFIX_OFFSET, 16, 4, @@ -297,12 +298,12 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, gpu->switch_context = false; } - /* And the link to the first buffer */ - CMD_LINK(buffer, link_size, link_target); + /* And the link to the submitted buffer */ + CMD_LINK(buffer, link_dwords, link_target); /* Update the link target to point to above instructions */ link_target = new_target; - link_size = extra_size; + link_dwords = extra_size; } /* trigger event */ @@ -315,7 +316,7 @@ void etnaviv_buffer_queue(struct etnaviv_gpu *gpu, unsigned int event, etnaviv_buffer_replace_wait(buffer, waitlink_offset, VIV_FE_LINK_HEADER_OP_LINK | - VIV_FE_LINK_HEADER_PREFETCH(link_size), + VIV_FE_LINK_HEADER_PREFETCH(link_dwords), link_target); if (drm_debug & DRM_UT_DRIVER) |