From patchwork Fri Aug 14 15:51:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 7022741 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2DFFB9F372 for ; Mon, 17 Aug 2015 00:51:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 641EC2063C for ; Mon, 17 Aug 2015 00:51:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7CADE2063B for ; Mon, 17 Aug 2015 00:51:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AABDD6E7CB; Sun, 16 Aug 2015 17:51:55 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by gabe.freedesktop.org (Postfix) with ESMTPS id B58416EFBA for ; Fri, 14 Aug 2015 08:52:04 -0700 (PDT) Received: by wicja10 with SMTP id ja10so25218829wic.1 for ; Fri, 14 Aug 2015 08:52:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MvpwYI0D+JcljfJyBdqoRflaGZVFkrY+cpY9Gs0MilI=; b=m/cMFE03SnfinS13jcYxweFCIPxXH+KRl1pdm7KpRCmG/MCYnCsVxTIWWkugWfmHNd dgO6jxpSAtUcSBEHYyei3GCSpVAbgGyDiYnwIOTyh6v+9DsOtwCD+xgYEqV/ORHxKtBQ bO1Lsy0t++6ESeqSStHbGu3j20jN3yG0jMMIkC9D+dUMTZUwZLjOC06P5d4HKa6b9fn1 mffMUuYozH/Ozj9zITqtzds7U3qx1i/V86d6S0CRQZ0Rhl/dBYtGz6hdu2qtKsgOgP3y HqUOe2t2fhMJvyHplRqi7xoIYvkOxu3cPjoj1WsQXin5950Ns2+3cWCIhyQt+iu4MNTC A+aQ== X-Gm-Message-State: ALoCoQkFs2V0qP5+ZYS2VbJnpvlz80HcU0SLNbGQywtup2zGfo7wEgxS1424WIa1PPJ+gq5esA/k 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 To: Thierry Reding , dri-devel@lists.freedesktop.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> X-Mailman-Approved-At: Sun, 16 Aug 2015 17:51:43 -0700 Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c | 5 +++++ 1 file changed, 5 insertions(+) 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);