diff options
author | Sharat Masetty <smasetty@codeaurora.org> | 2018-11-01 20:16:45 +0530 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-12-11 13:07:03 -0500 |
commit | 1df4289d5b23178a8a2c38ca766feb3d9c40d9fb (patch) | |
tree | 4d6c6049c23bd53cbd16e0b160f4ef582f97caa9 /drivers/gpu/drm/msm/msm_gpu.h | |
parent | 84c6127580c1cee58d57d5f97ce22f1131ecdfc9 (diff) | |
download | lwn-1df4289d5b23178a8a2c38ca766feb3d9c40d9fb.tar.gz lwn-1df4289d5b23178a8a2c38ca766feb3d9c40d9fb.zip |
drm/msm: Optimize adreno_show_object()
When the userspace tries to read the crashstate dump, the read side
implementation in the driver currently ascii85 encodes all the binary
buffers and it does this each time the read system call is called.
A userspace tool like cat typically does a page by page read and the
number of read calls depends on the size of the data captured by the
driver. This is certainly not desirable and does not scale well with
large captures.
This patch encodes the buffer only once in the read path. With this there
is an immediate >10X speed improvement in crashstate save time.
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index f82bac086666..efb49bb64191 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -187,6 +187,7 @@ struct msm_gpu_state_bo { u64 iova; size_t size; void *data; + bool encoded; }; struct msm_gpu_state { @@ -201,6 +202,7 @@ struct msm_gpu_state { u32 wptr; void *data; int data_size; + bool encoded; } ring[MSM_GPU_MAX_RINGS]; int nr_registers; |