drm/msm: Optimize adreno_show_object()
authorSharat Masetty <smasetty@codeaurora.org>
Thu, 1 Nov 2018 14:46:45 +0000 (20:16 +0530)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 18:07:03 +0000 (13:07 -0500)
commit1df4289d5b23178a8a2c38ca766feb3d9c40d9fb
tree4d6c6049c23bd53cbd16e0b160f4ef582f97caa9
parent84c6127580c1cee58d57d5f97ce22f1131ecdfc9
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>
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/msm_gpu.h