All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: dri-devel@lists.freedesktop.org
Cc: Tony Lindgren <tony@atomide.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH v2 3/4] drm/omap: dsi: Ensure the device is active during probe
Date: Mon,  5 Nov 2018 17:10:27 +0200	[thread overview]
Message-ID: <20181105151028.4091-4-laurent.pinchart@ideasonboard.com> (raw)
In-Reply-To: <20181105151028.4091-1-laurent.pinchart@ideasonboard.com>

The probe function performs hardware access to read the number of
supported data lanes from a configuration register and thus requires the
device to be active. Ensure this by surrounding the access with
dsi_runtime_get() and dsi_runtime_put() calls.

Fixes: edb715dffdee ("drm/omap: dss: dsi: Move initialization code from bind to probe")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 394c129cfb3b..b9d5ad7e67d8 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -5409,11 +5409,14 @@ static int dsi_probe(struct platform_device *pdev)
 
 	/* DSI on OMAP3 doesn't have register DSI_GNQ, set number
 	 * of data to 3 by default */
-	if (dsi->data->quirks & DSI_QUIRK_GNQ)
+	if (dsi->data->quirks & DSI_QUIRK_GNQ) {
+		dsi_runtime_get(dsi);
 		/* NB_DATA_LANES */
 		dsi->num_lanes_supported = 1 + REG_GET(dsi, DSI_GNQ, 11, 9);
-	else
+		dsi_runtime_put(dsi);
+	} else {
 		dsi->num_lanes_supported = 3;
+	}
 
 	r = dsi_init_output(dsi);
 	if (r)
-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-11-05 15:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 15:10 [PATCH v2 0/4] omapdrm: Fix runtime PM issues at module load and unload time Laurent Pinchart
2018-11-05 15:10 ` [PATCH v2 1/4] drm/omap: Populate DSS children in omapdss driver Laurent Pinchart
2018-11-05 20:00   ` Tony Lindgren
2018-11-05 15:10 ` [PATCH v2 2/4] drm/omap: hdmi4: Ensure the device is active during bind Laurent Pinchart
2018-11-05 20:02   ` Tony Lindgren
2018-11-05 21:45     ` Laurent Pinchart
2018-11-05 15:10 ` Laurent Pinchart [this message]
2018-11-05 20:11   ` [PATCH v2 3/4] drm/omap: dsi: Ensure the device is active during probe Tony Lindgren
2018-11-05 15:10 ` [PATCH v2 4/4] drm/omap: Work around missing DISPC in runtime PM handlers Laurent Pinchart
2018-11-05 19:23 ` [RFC/PATCH] drm/omap: Move DISPC runtime PM handling to omapdrm Laurent Pinchart
2018-11-05 20:14   ` Tony Lindgren
2018-11-05 21:46     ` Laurent Pinchart
2018-11-06  9:22       ` Tomi Valkeinen
2018-11-06 12:47         ` Tomi Valkeinen
2018-11-07 13:27           ` Laurent Pinchart

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=20181105151028.4091-4-laurent.pinchart@ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.