Messages in this thread | | | Date | Thu, 20 Apr 2023 17:36:03 +0300 | Subject | Re: [PATCH 3/3] drm/msm/dpu: Pass catalog pointers directly from RM instead of IDs | From | Dmitry Baryshkov <> |
| |
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
| |