Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1519284ybl; Thu, 22 Aug 2019 16:17:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyt+dp7z94/XsucuvFSJGi4NLhLrkyAPy9y8LJM3p5zntSFlwPExgU9vDGW0Il5xah6/aOt X-Received: by 2002:a17:902:bb94:: with SMTP id m20mr1370915pls.336.1566515879658; Thu, 22 Aug 2019 16:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566515879; cv=none; d=google.com; s=arc-20160816; b=VXuecZ4j0cLlfa2MdNtzZnbdhBLp2eIWk2gyZ3jwtq8bRdOWrRCfKRUWh3FumOGUjh XAMNZyzr6rEV/+kORlG9uXYyW9I3lcJ1J3xUD9xwrumA0zFHgDOqro7rEFReuXrzoZ9Q cO5ogyjUyEKu4TfWV+uQlJcb+ofqMJ/coOHIaar0isH42khd9IzBIn0SYll2owEdQLTX 7aK7US0X0FvCvYTpG2wQ+ICM5rfzpsO2qVlNwfLxYY6kLghnJsnf+Htcg9cmSIyfAupZ VKI6W6fzJmk7XPOxKv4wkPX7tSfmnz6LnN0wwYm36Ux3y4WA+g5bmDc/VR+EEyX6I7iF Xm4Q== 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 :dkim-signature; bh=mtIck9CBNE5Kh4dFMYx/Z3+6LO+vQbSgLuLBn4j3cPA=; b=WJYFpNP7fbUhHMv8pK+l/HiCf8V+j+L9gR4JPI8uzvuS7+dagcIbRHwo/n/9EYP+X2 RPN34OWHEnBr1bAM7jsZcBwwVrW63NzlNsKLjmQoIG+fLtV6LaSKQAhXhtlqYWMy5RsF 1aJK4GmWaxcJVIXF89nZIJ7G5AdwTQwvpDI+89q8hZkFS479OD1ga6pJjm2j4pkMKg/0 sILgSMHeQ9qh5VAPzDSaE9pQouxlZ/bQGOVJUuNeK8b619fbKqAjCUt7/V0FQ3NsmElE 6NndcOqaJ6OPD0xJSq9M9oE1ayQPn+WoA+IqNQLh7UxcQLSrFmjAvMB298HIXIGMPUoA RxBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CmNXarrE; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u141si891514pfc.95.2019.08.22.16.17.43; Thu, 22 Aug 2019 16:17:59 -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=@kernel.org header.s=default header.b=CmNXarrE; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390608AbfHVRNm (ORCPT + 99 others); Thu, 22 Aug 2019 13:13:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:59022 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390598AbfHVRI7 (ORCPT ); Thu, 22 Aug 2019 13:08:59 -0400 Received: from sasha-vm.mshome.net (wsip-184-188-36-2.sd.sd.cox.net [184.188.36.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF47A2341B; Thu, 22 Aug 2019 17:08:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566493738; bh=NK3Gu0440IlcmUfslpeJUoyzrVonh+nts5KJQ4s0wiY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CmNXarrENYaLPR1pmlTuPH9ob6oeCbBMWFqxklHJL48E19GFVaFha6nuJGXS0DXSW Eo/NikUQa3VnUN+8eDUQUpnMeNaMusK6LVCR9Y314+XJBAVjqNp466MILQ/LVlT0ws 5xjc2A24rVw1O/9HOZcGuSZlhLQOXmGeqzSonUCc= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeffrey Hugo , Rob Clark , Sean Paul , Sasha Levin Subject: [PATCH 5.2 081/135] drm: msm: Fix add_gpu_components Date: Thu, 22 Aug 2019 13:07:17 -0400 Message-Id: <20190822170811.13303-82-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190822170811.13303-1-sashal@kernel.org> References: <20190822170811.13303-1-sashal@kernel.org> MIME-Version: 1.0 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.2.10-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.2.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.2.10-rc1 X-KernelTest-Deadline: 2019-08-24T17:07+00:00 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jeffrey Hugo [ Upstream commit 9ca7ad6c7706edeae331c1632d0c63897418ebad ] 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) Reviewed-by: Rob Clark Signed-off-by: Jeffrey Hugo Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20190626180015.45242-1-jeffrey.l.hugo@gmail.com Signed-off-by: Sasha Levin --- 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 4a0fe8a25ad77..a56eef3cfee78 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1267,7 +1267,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.20.1