mbox series

[v3,0/7] drm/msm/dpu: simplify DPU encoder init

Message ID 20230601172236.564445-1-dmitry.baryshkov@linaro.org
Headers show
Series drm/msm/dpu: simplify DPU encoder init | expand

Message

Dmitry Baryshkov June 1, 2023, 5:22 p.m. UTC
Rework dpu_encoder initialization code, simplifying calling sequences
and separating common init parts.

Changes since v2:
- Rebased on top of msm-next-lumag branch

Changes since v1:
- Withdrawn two pathes for a later consideration
- Changed dpu_encoder_phys_init() to return void (Abhinav)
- Added small simplifications of dpu_encoder_phys_cmd_init() and
  dpu_encoder_phys_wb_init()


Dmitry Baryshkov (7):
  drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup()
  drm/msm/dpu: separate common function to init physical encoder
  drm/msm/dpu: drop duplicated intf/wb indices from encoder structs
  drm/msm/dpu: inline dpu_encoder_get_wb()
  drm/msm/dpu: call dpu_rm_get_intf() from dpu_encoder_get_intf()
  drm/msm/dpu: drop temp variable from dpu_encoder_phys_cmd_init()
  drm/msm/dpu: simplify dpu_encoder_phys_wb_init()

 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c   | 178 ++++++++----------
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h   |  14 +-
 .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h  |  15 +-
 .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c  |  37 ++--
 .../drm/msm/disp/dpu1/dpu_encoder_phys_vid.c  |  19 +-
 .../drm/msm/disp/dpu1/dpu_encoder_phys_wb.c   |  35 +---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c       |  87 ++++-----
 7 files changed, 141 insertions(+), 244 deletions(-)

Comments

Abhinav Kumar June 1, 2023, 7:35 p.m. UTC | #1
On 6/1/2023 10:22 AM, Dmitry Baryshkov wrote:
> The function dpu_encoder_get_wb() returns controller_id if the
> corresponding WB is present in the catalog. We can inline this function
> and rely on dpu_rm_get_wb() returning NULL for indices for which the
> WB is not present on the device.
> 
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280
Abhinav Kumar June 1, 2023, 7:38 p.m. UTC | #2
On 6/1/2023 10:22 AM, Dmitry Baryshkov wrote:
> There is no need to assign a result to temp varable just to return it
> after a goto. Drop the temporary variable and goto and return the result
> directly.
> 
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---

Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com> # sc7280
Dmitry Baryshkov June 4, 2023, 3:01 a.m. UTC | #3
On Thu, 01 Jun 2023 20:22:29 +0300, Dmitry Baryshkov wrote:
> Rework dpu_encoder initialization code, simplifying calling sequences
> and separating common init parts.
> 
> Changes since v2:
> - Rebased on top of msm-next-lumag branch
> 
> Changes since v1:
> - Withdrawn two pathes for a later consideration
> - Changed dpu_encoder_phys_init() to return void (Abhinav)
> - Added small simplifications of dpu_encoder_phys_cmd_init() and
>   dpu_encoder_phys_wb_init()
> 
> [...]

Applied, thanks!

[1/7] drm/msm/dpu: merge dpu_encoder_init() and dpu_encoder_setup()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/9b930f14e530
[2/7] drm/msm/dpu: separate common function to init physical encoder
      https://gitlab.freedesktop.org/lumag/msm/-/commit/7731ee3b06c1
[3/7] drm/msm/dpu: drop duplicated intf/wb indices from encoder structs
      https://gitlab.freedesktop.org/lumag/msm/-/commit/8ea432b8428e
[4/7] drm/msm/dpu: inline dpu_encoder_get_wb()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/04ada3d8380a
[5/7] drm/msm/dpu: call dpu_rm_get_intf() from dpu_encoder_get_intf()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/004be38657f4
[6/7] drm/msm/dpu: drop temp variable from dpu_encoder_phys_cmd_init()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/ed02d3dd18dc
[7/7] drm/msm/dpu: simplify dpu_encoder_phys_wb_init()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/5d1227d1c7a3

Best regards,