Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2207487imu; Wed, 21 Nov 2018 08:11:16 -0800 (PST) X-Google-Smtp-Source: AFSGD/WYj7Ws++5bDsLDPdqHx/IP4CEL7BCcOnMvmucAGaiyAKKH6YGZQOOp0q76qTdhwMv9ndL9 X-Received: by 2002:a63:ea15:: with SMTP id c21mr6213361pgi.361.1542816676895; Wed, 21 Nov 2018 08:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542816676; cv=none; d=google.com; s=arc-20160816; b=VB48eLJF5nhJrldXD5viXnwtyexkz+i7S60J8Pud8Ch5Oq4VMf/pxgP3ipw6tNAQH2 oOeGJxk9+qhnh8Tbai/lBFzlS6Xin2NSqIbC5Q408uqEpKdonSGBJhWEh4OtTjuCBIqU N4D3DN18qMF5Bz2qHAG1Sr9eG3r1DVhit74VcAdecRPTKqI2zapkXiFcK2Jwa6oFc2GS b/QdJ4oHUs4ib3zYDqmPKICg0sBYIcY0OvNRyqUDFgen7ans6GaU/OuD5+TLehGVRQXx uzhdyFdWuPCuEaAi+AiDPSQaMveNJ/DhLDsqM8HG7T1XjjAVWBiwrYURPP+FEZnHUwUW V2Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=uRp66//BBwJGvIzADmJijycCyCMR9+rZl9L5+2Y76tY=; b=QkdLHz/1+kj4PxanKJJn93h0A3Nc2waPO3C0epKbNVZUeeyE6Mz4aYyAuSWIcmzTxg W2neKyAA+J7njVuGNKXYlwuxxCWHstVIEkEtGz8dXuXylFmUlGmatQz5gXNsaFxnZJ5w kJWx1GCpQkfFJgU25VQ6NluUMhZyZh4a8im+v4SCwUgmfBgHJL8thghm+P7TmZqfLyFC qJ1/Mr7TH7F+XiUwkOjwmHBzxQ3rJ30xXOxBxRPj9Q5qy39zqKughHE7e2KKxeJJNB0K 584olme5oGUpr1cZ3/RZbEtLB5DQl2ZY6mEb3TBDzNQS3aTJjEHNKywh539+waPWwq4X V1Uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si28206848plb.14.2018.11.21.08.10.46; Wed, 21 Nov 2018 08:11:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731753AbeKVCoc (ORCPT + 99 others); Wed, 21 Nov 2018 21:44:32 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49186 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731421AbeKVCob (ORCPT ); Wed, 21 Nov 2018 21:44:31 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id EBC5827E7B1 From: Sebastian Reichel To: Sebastian Reichel , Tomi Valkeinen , Tony Lindgren , Pavel Machek , Laurent Pinchart Cc: "H. Nikolaus Schaller" , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Sebastian Reichel Subject: [PATCHv5 2/6] drm/omap: populate DSI platform bus earlier Date: Wed, 21 Nov 2018 17:09:12 +0100 Message-Id: <20181121160916.22017-3-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181121160916.22017-1-sebastian.reichel@collabora.com> References: <20181121160916.22017-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org After the changes from 4.20 the DSI encoder tries to find the attached panel before populating the DSI bus. If the panel is not found -EPROBE_DEFER is returned, so the DSI bus is never populated and the panel never added. Fix this by populating the DSI bus before searching for the video sink in dsi_init_output(). Fixes: 27d624527d992 ("drm/omap: dss: Acquire next dssdev at probe time") Acked-by: Pavel Machek Tested-by: Tony Lindgren Tested-by: Pavel Machek Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dsi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 0a485c5b982e..00a9c2ab9e6c 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5418,9 +5418,15 @@ static int dsi_probe(struct platform_device *pdev) dsi->num_lanes_supported = 3; } + r = of_platform_populate(dev->of_node, NULL, NULL, dev); + if (r) { + DSSERR("Failed to populate DSI child devices: %d\n", r); + goto err_pm_disable; + } + r = dsi_init_output(dsi); if (r) - goto err_pm_disable; + goto err_of_depopulate; r = dsi_probe_of(dsi); if (r) { @@ -5428,22 +5434,16 @@ static int dsi_probe(struct platform_device *pdev) goto err_uninit_output; } - r = of_platform_populate(dev->of_node, NULL, NULL, dev); - if (r) { - DSSERR("Failed to populate DSI child devices: %d\n", r); - goto err_uninit_output; - } - r = component_add(&pdev->dev, &dsi_component_ops); if (r) - goto err_of_depopulate; + goto err_uninit_output; return 0; -err_of_depopulate: - of_platform_depopulate(dev); err_uninit_output: dsi_uninit_output(dsi); +err_of_depopulate: + of_platform_depopulate(dev); err_pm_disable: pm_runtime_disable(dev); return r; -- 2.19.1