lkml.org 
[lkml]   [2023]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] drm/msm/dpu: Pass catalog pointers directly from RM instead of IDs
From
On 18/04/2023 02:14, Marijn Suijten wrote:
> The Resource Manager already iterates over all available blocks from the
> catalog, only to pass their ID to a dpu_hw_xxx_init() function which
> uses an _xxx_offset() helper to search for and find the exact same
> catalog pointer again to initialize the block with, fallible error
> handling and all.
>
> Instead, pass const pointers to the catalog entries directly to these
> _init functions and drop the for loops entirely, saving on both
> readability complexity and unnecessary cycles at boot.
>
> Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c | 30 +++--------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h | 10 +++---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 32 +++---------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.h | 11 +++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c | 38 ++++-----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.h | 12 +++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 2 +-
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 40 ++++++-----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 12 +++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c | 38 ++++-----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.h | 10 +++---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c | 33 +++----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.h | 14 ++++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c | 33 +++----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.h | 14 ++++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 33 +++----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 8 ++---
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 33 +++----------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h | 11 +++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c | 33 ++++---------------
> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.h | 11 +++----
> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 17 +++++-----
> drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 18 +++++-----
> 23 files changed, 127 insertions(+), 366 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

--
With best wishes
Dmitry

\
 
 \ /
  Last update: 2023-04-20 16:37    [W:0.166 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site