From patchwork Tue Feb 18 11:36:02 2014
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Philipp Zabel
X-Patchwork-Id: 3668931
Return-Path:
X-Original-To: patchwork-linux-arm@patchwork.kernel.org
Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org
Received: from mail.kernel.org (mail.kernel.org [198.145.19.201])
by patchwork1.web.kernel.org (Postfix) with ESMTP id 82CDB9F2EC
for ;
Tue, 18 Feb 2014 11:37:56 +0000 (UTC)
Received: from mail.kernel.org (localhost [127.0.0.1])
by mail.kernel.org (Postfix) with ESMTP id A495920127
for ;
Tue, 18 Feb 2014 11:37:55 +0000 (UTC)
Received: from casper.infradead.org (casper.infradead.org [85.118.1.10])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id C442C200D5
for ;
Tue, 18 Feb 2014 11:37:54 +0000 (UTC)
Received: from merlin.infradead.org ([2001:4978:20e::2])
by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux))
id 1WFizO-0004ts-JK; Tue, 18 Feb 2014 11:37:26 +0000
Received: from localhost ([::1] helo=merlin.infradead.org)
by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux))
id 1WFizG-00079A-8t; Tue, 18 Feb 2014 11:37:18 +0000
Received: from metis.ext.pengutronix.de
([2001:6f8:1178:4:290:27ff:fe1d:cc33])
by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux))
id 1WFiyt-00071g-ES for linux-arm-kernel@lists.infradead.org;
Tue, 18 Feb 2014 11:36:58 +0000
Received: from dude.hi.pengutronix.de ([10.1.0.7] helo=dude.pengutronix.de)
by metis.ext.pengutronix.de with esmtp (Exim 4.72)
(envelope-from )
id 1WFiyN-000532-GA; Tue, 18 Feb 2014 12:36:23 +0100
From: Philipp Zabel
To: Russell King - ARM Linux
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
Message-Id: <1392723370-4772-2-git-send-email-p.zabel@pengutronix.de>
X-Mailer: git-send-email 1.8.5.3
In-Reply-To: <1392723370-4772-1-git-send-email-p.zabel@pengutronix.de>
References: <1392723370-4772-1-git-send-email-p.zabel@pengutronix.de>
X-SA-Exim-Connect-IP: 10.1.0.7
X-SA-Exim-Mail-From: p.zabel@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);
SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20140218_063656_113689_4FD0FEB7
X-CRM114-Status: GOOD ( 16.36 )
X-Spam-Score: 0.4 (/)
Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org,
Philipp Zabel , David Airlie ,
Greg Kroah-Hartman ,
dri-devel@lists.freedesktop.org, kernel@pengutronix.de,
Grant Likely ,
Shawn Guo , Fabio Estevam ,
linux-arm-kernel@lists.infradead.org,
Lucas Stach
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id:
List-Unsubscribe:
,
List-Archive:
List-Post:
List-Help:
List-Subscribe:
,
MIME-Version: 1.0
Sender: "linux-arm-kernel"
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC,
RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham
version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
From: Lucas Stach
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
Signed-off-by: Philipp Zabel
---
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. */