From: seanpaul@chromium.org (Sean Paul)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 02/10] drm/rockchip: analogix_dp: Remove unnecessary init code
Date: Fri, 20 Oct 2017 13:05:54 -0400 [thread overview]
Message-ID: <20171020170554.uhhctvhx2igwdotw@art_vandelay> (raw)
In-Reply-To: <88902b60-d096-f828-6d5d-44d44b6f4c50@rock-chips.com>
On Fri, Oct 20, 2017 at 09:48:35AM +0800, Mark yao wrote:
> On 2017?10?19? 11:48, Jeffy Chen wrote:
> > Remove unnecessary init code, since we would do it in the power_on()
> > callback.
> >
> > Also move of parse code to probe().
> >
> > Fixes: 9e32e16e9e98 ("drm: rockchip: dp: add rockchip platform dp driver")
> > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>
> Looks good for me
> Acked-by: Mark Yao <mark.yao@rock-chips.com>
Pushed to -misc-next
Thanks,
Sean
>
> > ---
> >
> > Changes in v6: None
> > Changes in v5: None
> >
> > drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 27 ++++++-------------------
> > 1 file changed, 6 insertions(+), 21 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > index 4d3f6ad0abdd..8cae5ad926cd 100644
> > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > @@ -269,7 +269,7 @@ static struct drm_encoder_funcs rockchip_dp_encoder_funcs = {
> > .destroy = rockchip_dp_drm_encoder_destroy,
> > };
> > -static int rockchip_dp_init(struct rockchip_dp_device *dp)
> > +static int rockchip_dp_of_probe(struct rockchip_dp_device *dp)
> > {
> > struct device *dev = dp->dev;
> > struct device_node *np = dev->of_node;
> > @@ -303,19 +303,6 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp)
> > return PTR_ERR(dp->rst);
> > }
> > - ret = clk_prepare_enable(dp->pclk);
> > - if (ret < 0) {
> > - DRM_DEV_ERROR(dp->dev, "failed to enable pclk %d\n", ret);
> > - return ret;
> > - }
> > -
> > - ret = rockchip_dp_pre_init(dp);
> > - if (ret < 0) {
> > - DRM_DEV_ERROR(dp->dev, "failed to pre init %d\n", ret);
> > - clk_disable_unprepare(dp->pclk);
> > - return ret;
> > - }
> > -
> > return 0;
> > }
> > @@ -361,10 +348,6 @@ static int rockchip_dp_bind(struct device *dev, struct device *master,
> > if (!dp_data)
> > return -ENODEV;
> > - ret = rockchip_dp_init(dp);
> > - if (ret < 0)
> > - return ret;
> > -
> > dp->data = dp_data;
> > dp->drm_dev = drm_dev;
> > @@ -398,7 +381,6 @@ static void rockchip_dp_unbind(struct device *dev, struct device *master,
> > rockchip_drm_psr_unregister(&dp->encoder);
> > analogix_dp_unbind(dev, master, data);
> > - clk_disable_unprepare(dp->pclk);
> > }
> > static const struct component_ops rockchip_dp_component_ops = {
> > @@ -414,7 +396,7 @@ static int rockchip_dp_probe(struct platform_device *pdev)
> > int ret;
> > ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL);
> > - if (ret)
> > + if (ret < 0)
> > return ret;
> > dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
> > @@ -422,9 +404,12 @@ static int rockchip_dp_probe(struct platform_device *pdev)
> > return -ENOMEM;
> > dp->dev = dev;
> > -
> > dp->plat_data.panel = panel;
> > + ret = rockchip_dp_of_probe(dp);
> > + if (ret < 0)
> > + return ret;
> > +
> > /*
> > * We just use the drvdata until driver run into component
> > * add function, and then we would set drvdata to null, so
>
--
Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2017-10-20 17:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-19 3:48 [PATCH v6 00/10] rockchip: kevin: Enable edp display Jeffy Chen
2017-10-19 3:48 ` [PATCH v6 01/10] arm64: dts: rockchip: Enable edp disaplay on kevin Jeffy Chen
2017-12-01 12:28 ` Enric Balletbo Serra
2017-12-04 17:59 ` Heiko Stuebner
2017-10-19 3:48 ` [PATCH v6 02/10] drm/rockchip: analogix_dp: Remove unnecessary init code Jeffy Chen
2017-10-20 1:48 ` Mark yao
2017-10-20 17:05 ` Sean Paul [this message]
2017-10-19 3:48 ` [PATCH v6 03/10] drm/bridge: analogix: Do not use device's drvdata Jeffy Chen
2017-10-20 16:52 ` Sean Paul
2017-10-20 23:14 ` jeffy
2017-10-19 3:48 ` [PATCH v6 04/10] drm/bridge: analogix_dp: Fix connector and encoder cleanup Jeffy Chen
2017-10-19 3:48 ` [PATCH v6 05/10] drm/rockchip: analogix_dp: Add a sanity check for rockchip_drm_psr_register() Jeffy Chen
2017-10-20 1:49 ` Mark yao
2017-10-19 3:48 ` [PATCH v6 06/10] drm/rockchip: dw-mipi-dsi: Fix error handling path Jeffy Chen
2017-10-20 1:50 ` Mark yao
2017-10-19 3:48 ` [PATCH v6 07/10] drm/rockchip: inno_hdmi: " Jeffy Chen
2017-10-20 1:50 ` Mark yao
2017-10-19 3:48 ` [PATCH v6 09/10] drm/bridge/synopsys: dw-hdmi: Do not use device's drvdata Jeffy Chen
2017-10-19 3:48 ` [PATCH v6 10/10] drm/rockchip: dw_hdmi: Fix error handling path Jeffy Chen
2017-10-20 1:51 ` Mark yao
2017-10-20 17:07 ` [PATCH v6 00/10] rockchip: kevin: Enable edp display Sean Paul
2017-10-30 23:01 ` Heiko Stuebner
2017-10-31 4:37 ` JeffyChen
2017-11-01 19:33 ` Sean Paul
2017-11-10 12:15 ` Enric Balletbo Serra
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=20171020170554.uhhctvhx2igwdotw@art_vandelay \
--to=seanpaul@chromium.org \
--cc=linux-arm-kernel@lists.infradead.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