diff options
author | Stephen Boyd <swboyd@chromium.org> | 2022-06-23 02:25:40 +0200 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-09-18 18:38:04 +0200 |
commit | 62b060e06e2af9c00fe59445fdf78b3fc7525650 (patch) | |
tree | 46557b035caf79f71c3d03b096d61d1b8b61cc7f /drivers/gpu/drm/msm/dp | |
parent | drm/msm/dp: Remove pixel_rate from struct dp_ctrl (diff) | |
download | linux-62b060e06e2af9c00fe59445fdf78b3fc7525650.tar.xz linux-62b060e06e2af9c00fe59445fdf78b3fc7525650.zip |
drm/msm/dp: Get rid of dp_ctrl_on_stream_phy_test_report()
This API isn't really more than a couple lines now that we don't store
the pixel_rate to the struct member. Inline it into the caller.
Cc: Kuogee Hsieh <quic_khsieh@quicinc.com>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/490775/
Link: https://lore.kernel.org/r/20220623002540.871994-4-swboyd@chromium.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/dp')
-rw-r--r-- | drivers/gpu/drm/msm/dp/dp_ctrl.c | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c index 22b239bf2c0f..3854c9f1f7e9 100644 --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c @@ -1565,36 +1565,15 @@ static bool dp_ctrl_send_phy_test_pattern(struct dp_ctrl_private *ctrl) return success; } -static int dp_ctrl_on_stream_phy_test_report(struct dp_ctrl *dp_ctrl) +static int dp_ctrl_process_phy_test_request(struct dp_ctrl_private *ctrl) { int ret; - struct dp_ctrl_private *ctrl; unsigned long pixel_rate; - ctrl = container_of(dp_ctrl, struct dp_ctrl_private, dp_ctrl); - - pixel_rate = ctrl->panel->dp_mode.drm_mode.clock; - dp_ctrl_set_clock_rate(ctrl, DP_STREAM_PM, "stream_pixel", pixel_rate * 1000); - - ret = dp_power_clk_enable(ctrl->power, DP_STREAM_PM, true); - if (ret) { - DRM_ERROR("Unable to start pixel clocks. ret=%d\n", ret); - return ret; - } - - dp_ctrl_send_phy_test_pattern(ctrl); - - return 0; -} - -static int dp_ctrl_process_phy_test_request(struct dp_ctrl_private *ctrl) -{ - int ret = 0; - if (!ctrl->link->phy_params.phy_test_pattern_sel) { drm_dbg_dp(ctrl->drm_dev, "no test pattern selected by sink\n"); - return ret; + return 0; } /* @@ -1609,12 +1588,23 @@ static int dp_ctrl_process_phy_test_request(struct dp_ctrl_private *ctrl) } ret = dp_ctrl_on_link(&ctrl->dp_ctrl); - if (!ret) - ret = dp_ctrl_on_stream_phy_test_report(&ctrl->dp_ctrl); - else + if (ret) { DRM_ERROR("failed to enable DP link controller\n"); + return ret; + } - return ret; + pixel_rate = ctrl->panel->dp_mode.drm_mode.clock; + dp_ctrl_set_clock_rate(ctrl, DP_STREAM_PM, "stream_pixel", pixel_rate * 1000); + + ret = dp_power_clk_enable(ctrl->power, DP_STREAM_PM, true); + if (ret) { + DRM_ERROR("Failed to start pixel clocks. ret=%d\n", ret); + return ret; + } + + dp_ctrl_send_phy_test_pattern(ctrl); + + return 0; } void dp_ctrl_handle_sink_request(struct dp_ctrl *dp_ctrl) |