[PATCH 0/7] drm/msm/dp: Simplify DPCD related code with helpers

Stephen Boyd posted 7 patches 2 years, 3 months ago
drivers/gpu/drm/msm/dp/dp_display.c |   9 +--
drivers/gpu/drm/msm/dp/dp_link.c    |  38 +---------
drivers/gpu/drm/msm/dp/dp_panel.c   | 105 +++++-----------------------
drivers/gpu/drm/msm/dp/dp_panel.h   |  10 +--
4 files changed, 22 insertions(+), 140 deletions(-)
[PATCH 0/7] drm/msm/dp: Simplify DPCD related code with helpers
Posted by Stephen Boyd 2 years, 3 months ago
This driver open-codes a few of the DPCD register reads when it can be
simplified by using the helpers instead. This series reworks the MSM DP
driver to use the DPCD helpers and removes some dead code along the way.
There's the potential for even more code reduction around the test
registers, but I haven't tried to do that yet.

Stephen Boyd (7):
  drm/msm/dp: Replace open-coded drm_dp_read_dpcd_caps()
  drm/msm/dp: Use drm_dp_read_sink_count() helper
  drm/msm/dp: Remove dead code related to downstream cap info
  drm/msm/dp: Remove aux_cfg_update_done and related code
  drm/msm/dp: Simplify with drm_dp_{max_link_rate,max_lane_count}()
  drm/msm/dp: Inline dp_link_parse_sink_count()
  drm/msm/dp: Remove dp_display_is_ds_bridge()

Cc: Vinod Polimera <quic_vpolimer@quicinc.com>
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>

 drivers/gpu/drm/msm/dp/dp_display.c |   9 +--
 drivers/gpu/drm/msm/dp/dp_link.c    |  38 +---------
 drivers/gpu/drm/msm/dp/dp_panel.c   | 105 +++++-----------------------
 drivers/gpu/drm/msm/dp/dp_panel.h   |  10 +--
 4 files changed, 22 insertions(+), 140 deletions(-)


base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c
-- 
https://chromeos.dev
Re: [PATCH 0/7] drm/msm/dp: Simplify DPCD related code with helpers
Posted by Dmitry Baryshkov 2 years, 3 months ago
On 29/08/2023 21:47, Stephen Boyd wrote:
> This driver open-codes a few of the DPCD register reads when it can be
> simplified by using the helpers instead. This series reworks the MSM DP
> driver to use the DPCD helpers and removes some dead code along the way.
> There's the potential for even more code reduction around the test
> registers, but I haven't tried to do that yet.

For the whole series:

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

Using drm_dp_get_phy_test_pattern() / drm_dp_set_phy_test_pattern() 
would be definitely a benefit, especially since the latter one has 
support for DP >= 1.2, while msm DP code doesn't.

> 
> Stephen Boyd (7):
>    drm/msm/dp: Replace open-coded drm_dp_read_dpcd_caps()
>    drm/msm/dp: Use drm_dp_read_sink_count() helper
>    drm/msm/dp: Remove dead code related to downstream cap info
>    drm/msm/dp: Remove aux_cfg_update_done and related code
>    drm/msm/dp: Simplify with drm_dp_{max_link_rate,max_lane_count}()
>    drm/msm/dp: Inline dp_link_parse_sink_count()
>    drm/msm/dp: Remove dp_display_is_ds_bridge()
> 
> Cc: Vinod Polimera <quic_vpolimer@quicinc.com>
> Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>
> 
>   drivers/gpu/drm/msm/dp/dp_display.c |   9 +--
>   drivers/gpu/drm/msm/dp/dp_link.c    |  38 +---------
>   drivers/gpu/drm/msm/dp/dp_panel.c   | 105 +++++-----------------------
>   drivers/gpu/drm/msm/dp/dp_panel.h   |  10 +--
>   4 files changed, 22 insertions(+), 140 deletions(-)
> 
> 
> base-commit: 2dde18cd1d8fac735875f2e4987f11817cc0bc2c

-- 
With best wishes
Dmitry
Re: [PATCH 0/7] drm/msm/dp: Simplify DPCD related code with helpers
Posted by Dmitry Baryshkov 2 years, 2 months ago
On Tue, 29 Aug 2023 11:47:25 -0700, Stephen Boyd wrote:
> This driver open-codes a few of the DPCD register reads when it can be
> simplified by using the helpers instead. This series reworks the MSM DP
> driver to use the DPCD helpers and removes some dead code along the way.
> There's the potential for even more code reduction around the test
> registers, but I haven't tried to do that yet.
> 
> Stephen Boyd (7):
>   drm/msm/dp: Replace open-coded drm_dp_read_dpcd_caps()
>   drm/msm/dp: Use drm_dp_read_sink_count() helper
>   drm/msm/dp: Remove dead code related to downstream cap info
>   drm/msm/dp: Remove aux_cfg_update_done and related code
>   drm/msm/dp: Simplify with drm_dp_{max_link_rate,max_lane_count}()
>   drm/msm/dp: Inline dp_link_parse_sink_count()
>   drm/msm/dp: Remove dp_display_is_ds_bridge()
> 
> [...]

Applied, thanks!

[1/7] drm/msm/dp: Replace open-coded drm_dp_read_dpcd_caps()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/f906b95755f7
[2/7] drm/msm/dp: Use drm_dp_read_sink_count() helper
      https://gitlab.freedesktop.org/lumag/msm/-/commit/284a245d8bdc
[3/7] drm/msm/dp: Remove dead code related to downstream cap info
      https://gitlab.freedesktop.org/lumag/msm/-/commit/8bddc2d12e9c
[4/7] drm/msm/dp: Remove aux_cfg_update_done and related code
      https://gitlab.freedesktop.org/lumag/msm/-/commit/62ebb19fb32d
[5/7] drm/msm/dp: Simplify with drm_dp_{max_link_rate,max_lane_count}()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/a9905b469931
[6/7] drm/msm/dp: Inline dp_link_parse_sink_count()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/d89ce4cdb7a6
[7/7] drm/msm/dp: Remove dp_display_is_ds_bridge()
      https://gitlab.freedesktop.org/lumag/msm/-/commit/b41c5ca70684

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>