devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
	Philipp Zabel <p.zabel@pengutronix.de>,
	David Airlie <airlied@linux.ie>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	dri-devel@lists.freedesktop.org, kernel@pengutronix.de,
	Grant Likely <grant.likely@linaro.org>,
	Shawn Guo <shawn.guo@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	Lucas Stach <l.stach@pengutronix.de>
Subject: [RFC PATCH v3 1/9] staging: imx-drm-core: don't request probe deferral in imx_drm_encoder_parse_of
Date: Tue, 18 Feb 2014 12:36:02 +0100	[thread overview]
Message-ID: <1392723370-4772-2-git-send-email-p.zabel@pengutronix.de> (raw)
In-Reply-To: <1392723370-4772-1-git-send-email-p.zabel@pengutronix.de>

From: Lucas Stach <l.stach@pengutronix.de>

Since imx_drm_encoder_parse_of is called from the encoder bind callbacks,
it is too late to request probe deferral. Rather the core should make sure
that the crtcs are bound before the encoders, after all needed components
are probed.

This fixes probe failure when using the LDB on i.MX6.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 drivers/staging/imx-drm/imx-drm-core.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index dcba518..98a97a2 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -457,21 +457,13 @@ int imx_drm_encoder_parse_of(struct drm_device *drm,
 			return ret;
 
 		id = args.args_count > 0 ? args.args[0] : 0;
-		mask = imx_drm_find_crtc_mask(imxdrm, args.np, id);
+		crtc_mask |= imx_drm_find_crtc_mask(imxdrm, args.np, id);
 		of_node_put(args.np);
-
-		/*
-		 * If we failed to find the CRTC(s) which this encoder is
-		 * supposed to be connected to, it's because the CRTC has
-		 * not been registered yet.  Defer probing, and hope that
-		 * the required CRTC is added later.
-		 */
-		if (mask == 0)
-			return -EPROBE_DEFER;
-
-		crtc_mask |= mask;
 	}
 
+	if (i == 0 || !crtc_mask)
+		return -ENOENT;
+
 	encoder->possible_crtcs = crtc_mask;
 
 	/* FIXME: this is the mask of outputs which can clone this output. */
-- 
1.8.5.3

  reply	other threads:[~2014-02-18 11:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 11:36 [RFC PATCH v3 0/9] imx-drm dt bindings Philipp Zabel
2014-02-18 11:36 ` Philipp Zabel [this message]
2014-02-24 15:49   ` [RFC PATCH v3 1/9] staging: imx-drm-core: don't request probe deferral in imx_drm_encoder_parse_of Russell King - ARM Linux
2014-02-24 16:56     ` Philipp Zabel
2014-02-24 17:03       ` Philipp Zabel
2014-02-24 17:06       ` Russell King - ARM Linux
2014-02-24 17:41         ` Philipp Zabel
2014-02-18 11:36 ` [RFC PATCH v3 2/9] staging: imx-drm: Add temporary copies of v4l2-of parsing functions Philipp Zabel
2014-02-24 15:52   ` Russell King - ARM Linux
2014-02-24 17:31     ` Philipp Zabel
2014-02-18 11:36 ` [RFC PATCH v3 3/9] staging: imx-drm-core: Use OF graph to find components and connections between encoder and crtcs Philipp Zabel
2014-02-18 11:36 ` [RFC PATCH v3 4/9] staging: imx-drm: Document updated imx-drm device tree bindings Philipp Zabel
2014-02-18 11:36 ` [RFC PATCH v3 5/9] staging: imx-drm: Document imx-hdmi " Philipp Zabel
2014-02-18 11:36 ` [RFC PATCH v3 7/9] ARM: dts: imx53: Add IPU DI ports and endpoints, move imx-drm node to dtsi Philipp Zabel
2014-02-18 11:36 ` [RFC PATCH v3 8/9] ARM: dts: imx6qdl: " Philipp Zabel
     [not found] ` <1392723370-4772-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-18 11:36   ` [RFC PATCH v3 6/9] ARM: dts: imx51: Add IPU " Philipp Zabel
2014-02-18 11:36   ` [RFC PATCH v3 9/9] staging: imx-drm: Update TODO Philipp Zabel
2014-02-24 15:36 ` [RFC PATCH v3 0/9] imx-drm dt bindings Philipp Zabel

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=1392723370-4772-2-git-send-email-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=airlied@linux.ie \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=shawn.guo@linaro.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).