From: Stephen Boyd <swboyd@chromium.org>
To: Abhinav Kumar <quic_abhinavk@quicinc.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>
Cc: David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH v2 2/4] drm/msm: remove extra indirection for msm_mdss
Date: Thu, 3 Mar 2022 14:54:14 -0800 [thread overview]
Message-ID: <CAE-0n51MFCFedPR4H__ousJGsatRWJKJpoo8rHUmJ4qdea22pw@mail.gmail.com> (raw)
In-Reply-To: <20220119224005.3104578-3-dmitry.baryshkov@linaro.org>
Quoting Dmitry Baryshkov (2022-01-19 14:40:03)
> diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
> index be06a62d7ccb..f18dfbb614f0 100644
> --- a/drivers/gpu/drm/msm/msm_drv.c
> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -1211,19 +1212,32 @@ static int msm_pdev_probe(struct platform_device *pdev)
>
> switch (get_mdp_ver(pdev)) {
> case KMS_MDP5:
> - ret = msm_mdss_init(pdev, true);
> + mdss = msm_mdss_init(pdev, true);
> + if (IS_ERR(mdss)) {
> + ret = PTR_ERR(mdss);
> + platform_set_drvdata(pdev, NULL);
> +
> + return ret;
> + } else {
Drop else
> + priv->mdss = mdss;
> + pm_runtime_enable(&pdev->dev);
> + }
> break;
> case KMS_DPU:
> - ret = msm_mdss_init(pdev, false);
> + mdss = msm_mdss_init(pdev, false);
> + if (IS_ERR(mdss)) {
> + ret = PTR_ERR(mdss);
> + platform_set_drvdata(pdev, NULL);
> +
> + return ret;
> + } else {
> + priv->mdss = mdss;
> + pm_runtime_enable(&pdev->dev);
> + }
This is the same so why can't it be done below in the deleted if (ret)?
> break;
> default:
> - ret = 0;
> break;
> }
> - if (ret) {
> - platform_set_drvdata(pdev, NULL);
> - return ret;
> - }
>
> if (get_mdp_ver(pdev)) {
> ret = add_display_components(pdev, &match);
> diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h
> index 2459ba479caf..0c341660941a 100644
> --- a/drivers/gpu/drm/msm/msm_kms.h
> +++ b/drivers/gpu/drm/msm/msm_kms.h
> @@ -239,50 +228,44 @@ int mdp5_mdss_parse_clock(struct platform_device *pdev, struct clk_bulk_data **c
> return num_clocks;
> }
>
> -int msm_mdss_init(struct platform_device *pdev, bool mdp5)
> +struct msm_mdss *msm_mdss_init(struct platform_device *pdev, bool mdp5)
Ah I see it will quickly become not static. Still should have static
first and remove it here.
next prev parent reply other threads:[~2022-03-03 22:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 22:40 [PATCH v2 0/4] drm/msm: rework MDSS drivers Dmitry Baryshkov
2022-01-19 22:40 ` [PATCH v2 1/4] drm/msm: unify " Dmitry Baryshkov
2022-03-03 22:50 ` Stephen Boyd
2022-01-19 22:40 ` [PATCH v2 2/4] drm/msm: remove extra indirection for msm_mdss Dmitry Baryshkov
2022-03-03 22:54 ` Stephen Boyd [this message]
2022-03-03 23:44 ` Dmitry Baryshkov
2022-01-19 22:40 ` [PATCH v2 3/4] drm/msm: split the main platform driver Dmitry Baryshkov
2022-03-03 23:00 ` Stephen Boyd
2022-03-03 23:46 ` Dmitry Baryshkov
2022-01-19 22:40 ` [PATCH v2 4/4] drm/msm: stop using device's match data pointer Dmitry Baryshkov
2022-03-03 23:04 ` Stephen Boyd
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=CAE-0n51MFCFedPR4H__ousJGsatRWJKJpoo8rHUmJ4qdea22pw@mail.gmail.com \
--to=swboyd@chromium.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
/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;
as well as URLs for NNTP newsgroup(s).