From: Robert Chiras <robert.chiras@nxp.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
Philipp Zabel <p.zabel@pengutronix.de>,
Marek Vasut <marex@denx.de>
Cc: Robert Chiras <robert.chiras@nxp.com>,
Stefan Agner <stefan@agner.ch>, Shawn Guo <shawnguo@kernel.org>,
Fabio Estevam <fabio.estevam@nxp.com>,
David Airlie <airlied@linux.ie>,
Anson Huang <anson.huang@nxp.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
dl-linux-imx <linux-imx@nxp.com>,
"kernel@pengutronix.de" <kernel@pengutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 09/11] drm/mxsfb: Move pm_runtime_enable at the end of probe
Date: Wed, 16 Jan 2019 11:48:46 +0000 [thread overview]
Message-ID: <1547639306-19151-10-git-send-email-robert.chiras@nxp.com> (raw)
In-Reply-To: <1547639306-19151-1-git-send-email-robert.chiras@nxp.com>
Move the pm_runtime_enable call at the end of probbe, since it was made too
early, causing issues to DRM enable routines.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
---
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 3032007..9247c76 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -301,12 +301,10 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
if (ret)
return ret;
- pm_runtime_enable(drm->dev);
-
ret = drm_vblank_init(drm, MAX_CRTCS);
if (ret < 0) {
dev_err(drm->dev, "Failed to initialise vblank\n");
- goto err_vblank;
+ return ret;
}
/* Modeset init */
@@ -315,7 +313,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
ret = mxsfb_create_output(drm);
if (ret < 0) {
dev_err(drm->dev, "Failed to create outputs\n");
- goto err_vblank;
+ return ret;
}
ret = drm_simple_display_pipe_init(drm, &mxsfb->pipe, &mxsfb_funcs,
@@ -323,7 +321,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
mxsfb->connector);
if (ret < 0) {
dev_err(drm->dev, "Cannot setup simple display pipe\n");
- goto err_vblank;
+ return ret;
}
drm_crtc_vblank_off(&mxsfb->pipe.crtc);
@@ -340,14 +338,14 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
ret = drm_panel_attach(mxsfb->panel, mxsfb->connector);
if (ret) {
dev_err(drm->dev, "Cannot connect panel\n");
- goto err_vblank;
+ return ret;
}
} else if (mxsfb->bridge) {
ret = drm_simple_display_pipe_attach_bridge(&mxsfb->pipe,
mxsfb->bridge);
if (ret) {
dev_err(drm->dev, "Cannot connect bridge\n");
- goto err_vblank;
+ return ret;
}
}
@@ -367,9 +365,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
drm_mode_config_reset(drm);
- pm_runtime_get_sync(drm->dev);
ret = drm_irq_install(drm, platform_get_irq(pdev, 0));
- pm_runtime_put_sync(drm->dev);
if (ret < 0) {
dev_err(drm->dev, "Failed to install IRQ handler\n");
@@ -391,14 +387,14 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
drm_helper_hpd_irq_event(drm);
+ pm_runtime_enable(drm->dev);
+
return 0;
err_cma:
drm_irq_uninstall(drm);
err_irq:
drm_panel_detach(mxsfb->panel);
-err_vblank:
- pm_runtime_disable(drm->dev);
return ret;
}
--
2.7.4
next prev parent reply other threads:[~2019-01-16 11:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-16 11:48 [PATCH 00/11] Add support for DRM bridge and additional pixel formats Robert Chiras
2019-01-16 11:48 ` [PATCH 01/11] drm/mxsfb: Update mxsfb to support a bridge Robert Chiras
2019-01-16 11:48 ` [PATCH 02/11] dt-bindings: display: Add max-res property for mxsfb Robert Chiras
2019-01-16 11:48 ` [PATCH 03/11] drm/mxsfb: Add max-res property for MXSFB Robert Chiras
2019-01-16 11:48 ` [PATCH 04/11] drm/mxsfb: Update mxsfb with additional pixel formats Robert Chiras
2019-01-16 11:48 ` [PATCH 05/11] drm/mxsfb: Fix the vblank events Robert Chiras
2019-01-16 11:48 ` [PATCH 06/11] drm/mxsfb: Add support for new pixel formats in eLCDIF Robert Chiras
2019-01-16 11:48 ` [PATCH 07/11] drm/mxsfb: Signal mode changed when bpp changed Robert Chiras
2019-01-16 11:48 ` Robert Chiras [this message]
2019-01-16 11:48 ` [PATCH 08/11] drm/mxsfb: Update mxsfb to support LCD reset Robert Chiras
2019-01-16 11:48 ` [PATCH 10/11] drm/mxsfb: Improve the axi clock usage Robert Chiras
2019-01-16 11:48 ` [PATCH 11/11] drm/mxsfb: Clear OUTSTANDING_REQS bits Robert Chiras
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=1547639306-19151-10-git-send-email-robert.chiras@nxp.com \
--to=robert.chiras@nxp.com \
--cc=airlied@linux.ie \
--cc=anson.huang@nxp.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabio.estevam@nxp.com \
--cc=kernel@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=p.zabel@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=stefan@agner.ch \
/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).