OSDN Git Service

msm: kgsl: Avoid dynamically allocating small command buffers
authorSultan Alsawaf <sultan@kerneltoast.com>
Tue, 30 Jul 2019 21:19:59 +0000 (14:19 -0700)
committer0ranko0P <ranko0p@outlook.com>
Sat, 7 Dec 2019 10:22:17 +0000 (18:22 +0800)
commit7c30c640ea889303077ce45aab48a5dac5db2cd8
treecb1426e317379d92b42c0ffabce5457b7e865008
parent2b390d0c00554dde96ee44ba6066b0368dbe1ef3
msm: kgsl: Avoid dynamically allocating small command buffers

Most command buffers here are rather small (fewer than 256 words); it's
a waste of time to dynamically allocate memory for such a small buffer
when it could easily fit on the stack.

Conditionally using an on-stack command buffer when the size is small
enough eliminates the need for using a dynamically-allocated buffer most
of the time, reducing GPU command submission latency.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
drivers/gpu/msm/adreno_ringbuffer.c