Skip to content

drm/msm: rework clock handling

Dmitry Baryshkov dri-devel linux-arm-msm 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 14 repliesIn review
  2. v42 patches 6 repliesSuperseded
  3. v33 patches 6 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches7 repliesSuperseded
v12 patches0 repliesSuperseded

Changes in v5 from the cover letter

- Use size_t for num_clocks in dpu_kms/dpu_mdss
- Use min() in dpu_core_perf_crtc_update()
- Drop overcomplicated clock rate setting wrappers inside DP code. We were setting the opp for one clock and setting a rate for a single clock! Call dev_pm_opp_set_rate() and clk_set_rate() directly.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5drm/msm/dpu: simplify clocks handlingdrivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h +6 more+36 -1501 reply
2/5drm/msm/dp: "inline" dp_ctrl_set_clock_rate("ctrl_link")drivers/gpu/drm/msm/dp/dp_ctrl.c drivers/gpu/drm/msm/dp/dp_power.c+6 -341 reply
3/5drm/msm/dp: set stream_pixel rate directlydrivers/gpu/drm/msm/dp/dp_clk_util.c drivers/gpu/drm/msm/dp/dp_clk_util.h drivers/gpu/drm/msm/dp/dp_ctrl.c +2 more+1 -6010 replies
4/5drm/msm/dp: inline dp_power_clk_set_rate()drivers/gpu/drm/msm/dp/dp_power.c+6 -171 reply
5/5drm/msm/dp: rewrite dss_module_power to use bulk clock functionsdrivers/gpu/drm/msm/Makefile drivers/gpu/drm/msm/dp/dp_clk_util.c drivers/gpu/drm/msm/dp/dp_clk_util.h +4 more+34 -1741 reply

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchJessica ZhangStephen Boyd
1/5T-b R-b R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/5] drm/msm: rework clock handling

msm_dss_clk_*() functions significantly duplicate clk_bulk_* family of functions. Drop custom code and use bulk clocks directly. This also removes dependency of DP driver on the DPU driver internals.

Note that DP changes were compile-only tested.

Changes since v4:
- Use size_t for num_clocks in dpu_kms/dpu_mdss
- Use min() in dpu_core_perf_crtc_update()
- Drop overcomplicated clock rate setting wrappers inside DP code. We were setting the opp for one clock and setting a rate for a single clock! Call dev_pm_opp_set_rate() and clk_set_rate() directly.

Changes since v3:
- Switched to devm_clk_bulk_get_all() per Stephen's suggestion.
- Removed a call to of_clk_set_defaults() (per Stephen's suggestion again). It duplicates a call in platform_probe().
- Split the first patch (moving helpers to msm_io_utils.c), it's unused now.

Changes since v2:
- Retain conditional code/prints in DP code to ease debugging
- Rebase on top of msm-next and [1]
- Split helper functions to msm_io_utils.c as suggested by Jessica

Changes since v1:
- Rebase on top of current tree to fix conflicts

Dmitry Baryshkov (5):
drm/msm/dpu: simplify clocks handling
drm/msm/dp: "inline" dp_ctrl_set_clock_rate("ctrl_link") drm/msm/dp: set stream_pixel rate directly drm/msm/dp: inline dp_power_clk_set_rate() drm/msm/dp: rewrite dss_module_power to use bulk clock functions

 drivers/gpu/drm/msm/Makefile                  |   1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c |  23 +--
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h |   6 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c   | 187 ------------------
 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h   |  40 ----
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c       |  46 ++---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h       |   4 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c      |  26 +--
 drivers/gpu/drm/msm/dp/dp_ctrl.c              |  13 +-
 drivers/gpu/drm/msm/dp/dp_parser.c            |  43 ++--
 drivers/gpu/drm/msm/dp/dp_parser.h            |   6 +-
 drivers/gpu/drm/msm/dp/dp_power.c             | 105 ++--------
 12 files changed, 74 insertions(+), 426 deletions(-)
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c
 delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h
Signature · 1 line
2.34.1