[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cc1d090-3f5a-8b30-0bf2-ccb4c9eda176@quicinc.com>
Date: Mon, 20 Jun 2022 08:23:07 -0700
From: Kuogee Hsieh <quic_khsieh@...cinc.com>
To: Stephen Boyd <swboyd@...omium.org>,
Rob Clark <robdclark@...il.com>,
Abhinav Kumar <quic_abhinavk@...cinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
CC: <linux-kernel@...r.kernel.org>, <patches@...ts.linux.dev>,
Sean Paul <sean@...rly.run>, <dri-devel@...ts.freedesktop.org>,
<freedreno@...ts.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/msm/dp: Get rid of
dp_ctrl_on_stream_phy_test_report()
On 6/17/2022 1:47 PM, Stephen Boyd wrote:
> 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@...cinc.com>
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
Reviewed-by: Kuogee Hsieh <quic_khsieh@...cinc.com>
> ---
> drivers/gpu/drm/msm/dp/dp_ctrl.c | 40 ++++++++++++--------------------
> 1 file changed, 15 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_ctrl.c b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> index e114521af2e9..d04fddb29fdf 100644
> --- a/drivers/gpu/drm/msm/dp/dp_ctrl.c
> +++ b/drivers/gpu/drm/msm/dp/dp_ctrl.c
> @@ -1582,34 +1582,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;
> - ret = dp_ctrl_enable_stream_clocks(ctrl, pixel_rate);
> - if (ret) {
> - DRM_ERROR("Failed 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;
> }
>
> /*
> @@ -1624,12 +1605,21 @@ 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;
> + ret = dp_ctrl_enable_stream_clocks(ctrl, pixel_rate);
> + 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)
Powered by blists - more mailing lists