From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH v2 4/4] drm/msm/mdss: move is_mdp5 condition to msm_mdss_init
Date: Mon, 9 Jan 2023 02:52:09 +0200 [thread overview]
Message-ID: <20230109005209.247356-5-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230109005209.247356-1-dmitry.baryshkov@linaro.org>
Move is_mdp5 check to a more logical place, to the msm_mdss_init(),
rather than getting it in the mdss_probe() and passing it then as an
argument.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/msm_mdss.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_mdss.c b/drivers/gpu/drm/msm/msm_mdss.c
index ce554f2c2e02..c2ef50c3101b 100644
--- a/drivers/gpu/drm/msm/msm_mdss.c
+++ b/drivers/gpu/drm/msm/msm_mdss.c
@@ -396,8 +396,9 @@ static int mdp5_mdss_parse_clock(struct platform_device *pdev, struct clk_bulk_d
return num_clocks;
}
-static struct msm_mdss *msm_mdss_init(struct platform_device *pdev, bool is_mdp5)
+static struct msm_mdss *msm_mdss_init(struct platform_device *pdev)
{
+ bool is_mdp5 = of_device_is_compatible(pdev->dev.of_node, "qcom,mdss");
struct msm_mdss *msm_mdss;
int ret;
int irq;
@@ -494,11 +495,10 @@ static const struct dev_pm_ops mdss_pm_ops = {
static int mdss_probe(struct platform_device *pdev)
{
struct msm_mdss *mdss;
- bool is_mdp5 = of_device_is_compatible(pdev->dev.of_node, "qcom,mdss");
struct device *dev = &pdev->dev;
int ret;
- mdss = msm_mdss_init(pdev, is_mdp5);
+ mdss = msm_mdss_init(pdev);
if (IS_ERR(mdss))
return PTR_ERR(mdss);
--
2.39.0
prev parent reply other threads:[~2023-01-09 0:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 0:52 [PATCH v2 0/4] drm/msm/mdss: enable access to hw_rev from MDSS driver Dmitry Baryshkov
2023-01-09 0:52 ` [PATCH v2 1/4] dt-bindings: display/msm: add core clock to the mdss bindings Dmitry Baryshkov
2023-01-09 10:35 ` Krzysztof Kozlowski
2023-01-09 10:51 ` Dmitry Baryshkov
2023-01-09 11:20 ` Krzysztof Kozlowski
2023-01-09 12:06 ` Dmitry Baryshkov
2023-01-09 12:28 ` Dmitry Baryshkov
2023-01-09 14:30 ` Rob Herring
2023-01-09 0:52 ` [PATCH v2 2/4] drm/msm/mdss: enable optional core clock for MDP5 MDSS Dmitry Baryshkov
2023-01-09 0:52 ` [PATCH v2 3/4] drm/msm/mdss: check for core clk before accessing HW_REV Dmitry Baryshkov
2023-01-09 0:52 ` Dmitry Baryshkov [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=20230109005209.247356-5-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).