Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1090129ybd; Wed, 26 Jun 2019 11:01:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyv3Php0B3IN+6qzv1aoUtQO5IjOvDWcfxc46GFzjXpEsUwWew3z19hBcarwT5h4lXMZbwO X-Received: by 2002:a17:902:404:: with SMTP id 4mr7023330ple.200.1561572101163; Wed, 26 Jun 2019 11:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561572101; cv=none; d=google.com; s=arc-20160816; b=Do2t6eIi2pzeeYgxbtU1SXX+4o6RE+dLP5onx60cgrzO6ZruQT4I+hZ0yJCIweumKk FPFJoo7++q/T8f7Tooj2diq2Guuf880+pop2TOs3Nb5RHH9HYTZOTvrRy4td8tyAnB8n ixoH8/x5e2uEMPmbQ07LE3HZgtIldNLITE3P69rNzzshZKqVOOvG1IE5Xk+Vqby4dPUy mG8j768bVJCp7q4bZUTOxGc1FukoM05VzVcmhr+ndvI6q/EhSS4xlRP6eFoG7EOO2I8s SDtcl3i6g2B79L5dDXqPikPhlmOVrjvpk1uNCYXALmKEW9q6PrtH6+ldz0CjhtvQ9/Bs F45w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=FTgn6r6fcSmHF8w98dfXXuAN9IuTef3VgDyLMVSYVPY=; b=tKY2tHmTRZVrZDdYS5HRy+KSpWCYkq0MfaCpozW/GJrTT9vkbq0n6KTI8Y2kdLWmTT QiXXmZttCf1Lkmhvp9ls8ivO+UpkMXgD7b8i8qhgPVAHga5egX+Nlp49MyBdjuadnwFq SL0/9H5+ES9xmTLalfwyXHHKGnOuixA8Bd9ErEloXfn5K/GibVLLHXx6mJq3D1XE3PRP VGF6cuHQTAxjsPXIAQQa3GtRGzR7p2uvlF4EH94mPD3ICRCkDX7CipTZYQD8TvxNiA+n 9ki+R/OaEIaiw9eJgbL1wbiNS+tU9EyMsZZ9VlmvjtpsO1JExCdPwEH/VpWTQFBrV3BW xS4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGr5ZXAJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b16si18621574pfd.126.2019.06.26.11.01.25; Wed, 26 Jun 2019 11:01:41 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VGr5ZXAJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726594AbfFZSA0 (ORCPT + 99 others); Wed, 26 Jun 2019 14:00:26 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40656 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726042AbfFZSAZ (ORCPT ); Wed, 26 Jun 2019 14:00:25 -0400 Received: by mail-pg1-f196.google.com with SMTP id w10so1561263pgj.7; Wed, 26 Jun 2019 11:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=FTgn6r6fcSmHF8w98dfXXuAN9IuTef3VgDyLMVSYVPY=; b=VGr5ZXAJt+EIRsczuWIzhQbJHSaDJO4BnpDAA2L+zSr9WZQ67LAlB5Q7t8XI1Fe2CS O7lTk/jAw4mS/C69rYPzGuWh4IjkbRyjA5rcG0WAfbOgQRW/vLQLw8KBW8g3YHnjXYv0 pQPmTeQyE4gRy8vXmpJ4JUWY0BRmmey+G61TPTyDU8qJSEUVuVQp08i3JOg7QTRPhMv9 vqWbe2Q2A+TqXNrzKaUc8mPdBC8a1xE3/4n5zXNHNfMR1W3OhMUozMED4V29h2Eos7vU zI4/3w2G8mwYhx5MTg2bBL+wdBCXnbIbvhwnnW4Mz3cdPFEmW2FDep2Ee9TsjE+q5BAd JUZA== 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; bh=FTgn6r6fcSmHF8w98dfXXuAN9IuTef3VgDyLMVSYVPY=; b=n2V2ihHbiPl6rDNTO9qFlECR3mlFtgGIPT30ezfzTyUlQx3ECW7EfPj36bpgUu3PSt CbZC7TOhWusY80U2xb8MwxMLq6uKhxAefHfw7w7nrGUJqrdV1faAqWfcubJsxyQYgGnG QdQktPPAnr3PsYF5BMseRUiDFnuhneSJ0cXImUYJi8cd8euFJuyAaNkkmWNgl1gc7ejg kyppZmm26Zgdvzt8FOC3vTrsEqWb7Va4NgKtitUpM/Kn6oSPanPK+GpuzjuF1y0ivMp4 d7GsvesnFh7CIIWka1m9a2GUC0ntCLle520bYR0qHASkQDadP2DCSlQPEk1Rp6SUuo18 0wkw== X-Gm-Message-State: APjAAAW04l70q/yXAh4tjF6fEtPh79LBlHHVfBuZ+ki/7UHqF+nel+KN QCqpR/ncpu56FjWFENpTH+c= X-Received: by 2002:a17:90a:9503:: with SMTP id t3mr370826pjo.47.1561572024205; Wed, 26 Jun 2019 11:00:24 -0700 (PDT) Received: from aw-bldr-10.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id v4sm20106391pff.45.2019.06.26.11.00.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Jun 2019 11:00:23 -0700 (PDT) From: Jeffrey Hugo To: robdclark@gmail.com, sean@poorly.run, airlied@linux.ie, daniel@ffwll.ch Cc: bjorn.andersson@linaro.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jeffrey Hugo Subject: [PATCH] drm: msm: Fix add_gpu_components Date: Wed, 26 Jun 2019 11:00:15 -0700 Message-Id: <20190626180015.45242-1-jeffrey.l.hugo@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org add_gpu_components() adds found GPU nodes from the DT to the match list, regardless of the status of the nodes. This is a problem, because if the nodes are disabled, they should not be on the match list because they will not be matched. This prevents display from initing if a GPU node is defined, but it's status is disabled. Fix this by checking the node's status before adding it to the match list. Fixes: dc3ea265b856 ("drm/msm: Drop the gpu binding") Signed-off-by: Jeffrey Hugo --- drivers/gpu/drm/msm/msm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index ab64ab470de7..4aeb84f1d874 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1279,7 +1279,8 @@ static int add_gpu_components(struct device *dev, if (!np) return 0; - drm_of_component_match_add(dev, matchptr, compare_of, np); + if (of_device_is_available(np)) + drm_of_component_match_add(dev, matchptr, compare_of, np); of_node_put(np); -- 2.17.1