Message ID | 1439567497-13855-1-git-send-email-srinivas.kandagatla@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBC27VH7PV4DBBK45XCXAKGQEMTQ2FLY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id CD6132031F for <linaro@patches.linaro.org>; Fri, 14 Aug 2015 15:52:12 +0000 (UTC) Received: by labth1 with SMTP id th1sf29261481lab.2 for <linaro@patches.linaro.org>; Fri, 14 Aug 2015 08:52:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=yNhvhEBkz+ET+azmzD81kTbZILciOR9uNcHjDUn4viM=; b=kaIJx/2C5W+m21QtJtuIhDC+a8rZfBA8UcANK0Co7m/Y/HGdYjm2NQ4wyWBg3XFmOh 1lL34eApXWYbiaAtD5OUOHrZuYNFGnK+ruUsHpFnoek6ATvZLDVpheNNI2l2fT00Ah9y 0KLJDl6HEQlgC7GvVsx28h3/FiOweYak0Aj+ZJNYp/9uP4zve/ZGQCZtThXD0Kr24NbS c7K/IrwJUepHAQ8pCnsVfC1Il/n+db+S3g/4+yjMxkMd6gKn7F1zZwBBlo3wwE+5GKZF 3LE8DgyckofHZBH9VOyT6hl2kytqa6WaPaCjcxLcAUAlvvT1yfSviStIPXWlPlzEHEB7 hJxQ== X-Gm-Message-State: ALoCoQkK/qkC3QNzp0Gxsvjr0s26Y+dNZbCELn6DrVys1hs/lgCR4A37Zjdz5OwFl6hABm0N7wYH X-Received: by 10.152.6.103 with SMTP id z7mr13081733laz.8.1439567531730; Fri, 14 Aug 2015 08:52:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.224.129 with SMTP id rc1ls385852lac.25.gmail; Fri, 14 Aug 2015 08:52:11 -0700 (PDT) X-Received: by 10.152.205.43 with SMTP id ld11mr33575309lac.61.1439567531548; Fri, 14 Aug 2015 08:52:11 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id q10si6195421lbp.109.2015.08.14.08.52.11 for <patchwork-forward@linaro.org> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Aug 2015 08:52:11 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labd1 with SMTP id d1so46556479lab.1 for <patchwork-forward@linaro.org>; Fri, 14 Aug 2015 08:52:11 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr44419386lbb.36.1439567531413; Fri, 14 Aug 2015 08:52:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1716198lba; Fri, 14 Aug 2015 08:52:10 -0700 (PDT) X-Received: by 10.70.61.68 with SMTP id n4mr75401799pdr.122.1439567529514; Fri, 14 Aug 2015 08:52:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pk8si9604002pbb.112.2015.08.14.08.52.08; Fri, 14 Aug 2015 08:52:09 -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; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755610AbbHNPwH (ORCPT <rfc822;matthew.hart@linaro.org> + 28 others); Fri, 14 Aug 2015 11:52:07 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:36151 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755331AbbHNPwE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 14 Aug 2015 11:52:04 -0400 Received: by wicja10 with SMTP id ja10so22196474wic.1 for <linux-kernel@vger.kernel.org>; Fri, 14 Aug 2015 08:52:03 -0700 (PDT) X-Received: by 10.180.103.34 with SMTP id ft2mr8018089wib.62.1439567523478; Fri, 14 Aug 2015 08:52:03 -0700 (PDT) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id w8sm3683555wiy.10.2015.08.14.08.52.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Aug 2015 08:52:02 -0700 (PDT) From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> To: Thierry Reding <thierry.reding@gmail.com>, dri-devel@lists.freedesktop.org Cc: David Airlie <airlied@linux.ie>, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, robdclark@gmail.com, bjorn@kryo.se, Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Subject: [PATCH RFC 5/5] drm/msm: mdp4 lvds: Check the panel node in detect_panel() Date: Fri, 14 Aug 2015 16:51:37 +0100 Message-Id: <1439567497-13855-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <439567280-13491-1-git-send-email-srinivas.kandagatla@linaro.org> References: <439567280-13491-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: <patchwork-forward.linaro.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: srinivas.kandagatla@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.52 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c index ad02b8b..167f402 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c @@ -262,6 +262,11 @@ static struct drm_panel *detect_panel(struct drm_device *dev) of_node_put(endpoint); + if (!of_device_is_available(panel_node)) { + dev_err(dev->dev, "panel is not enabled in DT\n"); + return ERR_PTR(-ENODEV); + } + panel = of_drm_find_panel(panel_node); if (!panel) { of_node_put(panel_node);
This patch checks if the panel node is disabled in DT or not, this would let us return proper error code so that the driver could stop panel specific intialization. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 5 +++++ 1 file changed, 5 insertions(+)