[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <78a96f0e-738c-54b6-185c-7be4b5206463@linaro.org>
Date: Thu, 20 Apr 2023 17:36:03 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Marijn Suijten <marijn.suijten@...ainline.org>,
Rob Clark <robdclark@...il.com>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Sean Paul <sean@...rly.run>, David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>
Cc: ~postmarketos/upstreaming@...ts.sr.ht,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...ainline.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Martin Botka <martin.botka@...ainline.org>,
Jami Kettunen <jami.kettunen@...ainline.org>,
Jordan Crouse <jordan@...micpenguin.net>,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] drm/msm/dpu: Pass catalog pointers directly from RM
instead of IDs
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@...ainline.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@...aro.org>
--
With best wishes
Dmitry
Powered by blists - more mailing lists