From: Kuogee Hsieh <quic_khsieh@quicinc.com>
To: Stephen Boyd <swboyd@chromium.org>,
Rob Clark <robdclark@gmail.com>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <linux-kernel@vger.kernel.org>, <patches@lists.linux.dev>,
Sean Paul <sean@poorly.run>, <dri-devel@lists.freedesktop.org>,
<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/msm/dp: Get rid of dp_ctrl_on_stream_phy_test_report()
Date: Mon, 20 Jun 2022 08:23:07 -0700 [thread overview]
Message-ID: <8cc1d090-3f5a-8b30-0bf2-ccb4c9eda176@quicinc.com> (raw)
In-Reply-To: <20220617204750.2347797-4-swboyd@chromium.org>
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@quicinc.com>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.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)
prev parent reply other threads:[~2022-06-20 15:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-17 20:47 [PATCH 0/3] drm/msm/dp: More cleanups for force link train Stephen Boyd
2022-06-17 20:47 ` [PATCH 1/3] drm/msm/dp: Reorganize code to avoid forward declaration Stephen Boyd
2022-06-17 22:50 ` Dmitry Baryshkov
2022-06-20 15:23 ` Kuogee Hsieh
2022-06-17 20:47 ` [PATCH 2/3] drm/msm/dp: Remove pixel_rate from struct dp_ctrl Stephen Boyd
2022-06-17 23:07 ` Dmitry Baryshkov
2022-06-22 2:59 ` Stephen Boyd
2022-06-22 7:24 ` Dmitry Baryshkov
2022-06-22 15:22 ` Kuogee Hsieh
2022-06-22 17:58 ` Dmitry Baryshkov
2022-06-17 20:47 ` [PATCH 3/3] drm/msm/dp: Get rid of dp_ctrl_on_stream_phy_test_report() Stephen Boyd
2022-06-20 15:23 ` Kuogee Hsieh [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8cc1d090-3f5a-8b30-0bf2-ccb4c9eda176@quicinc.com \
--to=quic_khsieh@quicinc.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®