OSDN Git Service

msm: mdss: Don't allocate memory dynamically for small layer buffers
authorSultan Alsawaf <sultan@kerneltoast.com>
Wed, 31 Jul 2019 04:29:13 +0000 (21:29 -0700)
committer0ranko0P <ranko0p@outlook.com>
Sat, 7 Dec 2019 10:22:18 +0000 (18:22 +0800)
commit10ad665bbf0a8bc81279558848a7c5945c87d676
treee9063f3f4c41dfebc36360531c52c34239cea713
parent12fd7705a9125aab7f6d0a83ac4b622549c9c741
msm: mdss: Don't allocate memory dynamically for small layer buffers

There's no reason to dynamically allocate memory for a single, small
struct instance (output_layer) when it can be allocated on the stack.
Additionally, layer_list and validate_info_list are limited by the
maximum number of layers allowed, so they can be replaced by stack
allocations.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
drivers/video/fbdev/msm/mdss_fb.c
drivers/video/fbdev/msm/mdss_mdp_layer.c