From patchwork Tue Dec 4 18:04:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 10712329 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15ABD13BF for ; Tue, 4 Dec 2018 18:04:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09C942BEF1 for ; Tue, 4 Dec 2018 18:04:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F20742C27D; Tue, 4 Dec 2018 18:04:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B47E72BEF1 for ; Tue, 4 Dec 2018 18:04:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8EDB36E263; Tue, 4 Dec 2018 18:04:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4EE36E263 for ; Tue, 4 Dec 2018 18:04:46 +0000 (UTC) Received: by mail-pg1-x544.google.com with SMTP id v28so7715599pgk.10 for ; Tue, 04 Dec 2018 10:04:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qCJFFS6Aem8oBZGbr8g7FAKf5TobHEublKm03jHyLoA=; b=FCvTNawoEex1X24VX2J4dA+05EOYMdSsSWVYEpKe2g9Xyd9xl4fgfJvfg/nMs65EYL ukOtIztL9+g8fiSITH6upWiJ3XY+6xHV2XEdi8qsOCbxIP9zY43eVRnhcr/Xh28yJKIF wBqaA56DsFAgeu0qvpequEnqpuxaqUjP2sZEVpV1v2g4T+VibsZGQRay5ty60CjUnNLl xTh9hOV08dq+c6negRMXt9yLG+2Jlf6scVWiExnbRjLP6UUFe2BYhLjo2ZBBFQhu9lH/ 0nKtUQEYatOvq8wDkrLv1PkiRVolHUjwXNzB8upbcw7tLDNtAzyWIWWgvDpzKE6VRYeJ nSFQ== X-Gm-Message-State: AA+aEWZK2/ic8gvvFJ0oCbsZdiWrK/tCjG/z+2ZW8CNp/iCPD8Oc4Lul jBl0u3VfySOS/qVPV5UTqO6HNw== X-Google-Smtp-Source: AFSGD/Uys9k+5ZOk+PNf5vLhfAG9BfmBbeHsPSixY7hSs0srLwaRXBSIbWWkc3v67nGjcQQlG/k6DQ== X-Received: by 2002:a63:6205:: with SMTP id w5mr17528906pgb.53.1543946686548; Tue, 04 Dec 2018 10:04:46 -0800 (PST) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:c8e0:70d7:4be7:a36]) by smtp.gmail.com with ESMTPSA id u137sm35861805pfc.140.2018.12.04.10.04.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Dec 2018 10:04:45 -0800 (PST) From: Douglas Anderson To: Rob Clark , Sean Paul Subject: [PATCH] drm/msm: Only add available components Date: Tue, 4 Dec 2018 10:04:41 -0800 Message-Id: <20181204180441.218160-1-dianders@chromium.org> X-Mailer: git-send-email 2.20.0.rc1.387.gf8505762e3-goog MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Douglas Anderson , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When trying to get the display up on my sdm845 board I noticed that the display wouldn't probe if I had the dsi1 node marked as "disabled" even though my board doesn't use dsi1. It looks like the msm code adds all nodes to its list of components even if they are disabled. I believe this doesn't work because all registered components need to come up before we finish probing. Let's do like other DRM code and only add available components. Signed-off-by: Douglas Anderson Reviewed-by: Rob Clark --- drivers/gpu/drm/msm/msm_drv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index b1577e960889..0b828822117b 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1190,8 +1190,10 @@ static int add_components_mdp(struct device *mdp_dev, if (!intf) continue; - drm_of_component_match_add(master_dev, matchptr, compare_of, - intf); + if (of_device_is_available(intf)) + drm_of_component_match_add(master_dev, matchptr, + compare_of, intf); + of_node_put(intf); }