From patchwork Mon Jul 30 15:26:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10549231 X-Patchwork-Delegate: agross@codeaurora.org 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 C05C6A755 for ; Mon, 30 Jul 2018 15:28:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B082E29FEA for ; Mon, 30 Jul 2018 15:28:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4C7F29FF2; Mon, 30 Jul 2018 15:28:24 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 57D8E29FEA for ; Mon, 30 Jul 2018 15:28:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbeG3RDv (ORCPT ); Mon, 30 Jul 2018 13:03:51 -0400 Received: from mail-yb0-f196.google.com ([209.85.213.196]:42942 "EHLO mail-yb0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726787AbeG3RDu (ORCPT ); Mon, 30 Jul 2018 13:03:50 -0400 Received: by mail-yb0-f196.google.com with SMTP id c10-v6so4891021ybf.9 for ; Mon, 30 Jul 2018 08:28:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/OlpT6F7XbgfCCcBVmt5ec4be1ZqYvKNni0y9AuUBHQ=; b=aLbRqsSNkjy3Addrs/sKmWuTUhuYmKrzFFePvPY05IB7BJS8JjGE6m1zVa+75k0cCf XMxIu7aSatxV8EVmmQvv6ixGxGrSOPDUH6zVsrerJhINY147cbVtBqs5qv7mY4gOQQHm lWct4CMPzJSPmqJN2aH0GpWOWsVC9rYYut/rA= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=/OlpT6F7XbgfCCcBVmt5ec4be1ZqYvKNni0y9AuUBHQ=; b=iBCXuUBW7BaQWlcGaQ3E/9WfYxaak9EmmCxrm/EP9SoJgntLcAfPQPZqCUtb0vFp6j ekh176G8sHhQFi0kIv7sVGdFvTp9hJ03/go0WoVvPRUYU/znGawtVCYWYxrNWEzAKMdH pov3LvcmPv6Q+pCgTxj+2huWP+ivxfcUBduzwmKLJ8ncIdJT5XJaGQXNheZQn/Bq9tlN ckhcXKvAmDjXj8wCL6njdAgt4mglmYuK2z1vO4kQZXBGaWH3fEd+j8O2+sbelLQCZd38 nXGddh4Rdn9xqQt+0pgi3W8gSIBC2pj3komhRgRaS95bJBomavIsPINZUNxPmfPFn7cy IS6w== X-Gm-Message-State: AOUpUlGV7y8Syl595Ws0d766QtXdkiwk3HODQsAnRPc8P81pliYuroH3 Y/Mlb7Vtp7H8aDxpOr3qx2q6BQ== X-Google-Smtp-Source: AAOMgpdBriOWX7bgM4iNSufDjihaBxfpQZs2Fu1B1tl37tBz4ivx9q8c5XVQ/3zq7pcyM9WEksGrLQ== X-Received: by 2002:a25:b00a:: with SMTP id q10-v6mr9482567ybf.255.1532964501146; Mon, 30 Jul 2018 08:28:21 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id s63-v6sm937383ywd.63.2018.07.30.08.28.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Jul 2018 08:28:20 -0700 (PDT) From: Sean Paul To: robdclark@gmail.com, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org Cc: dianders@chromium.org, Sean Paul , Archit Taneja Subject: [PATCH 3/3] drm/msm: Don't fail bind if nothing connected to dsi Date: Mon, 30 Jul 2018 11:26:55 -0400 Message-Id: <20180730152658.157098-4-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.345.g5c9ce644c3-goog In-Reply-To: <20180730152658.157098-1-seanpaul@chromium.org> References: <20180730152658.157098-1-seanpaul@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If there is no bridge or panel connected to a dsi node, don't fail the entire msm bind. Just ignore the dsi block and move on. Cc: Doug Anderson Signed-off-by: Sean Paul Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/dsi/dsi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index ee07d58c2d97..a9768f823290 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -118,8 +118,13 @@ static int dsi_bind(struct device *dev, struct device *master, void *data) DBG(""); msm_dsi = dsi_init(pdev); - if (IS_ERR(msm_dsi)) - return PTR_ERR(msm_dsi); + if (IS_ERR(msm_dsi)) { + /* Don't fail the bind if the dsi port is not connected */ + if (PTR_ERR(msm_dsi) == -ENODEV) + return 0; + else + return PTR_ERR(msm_dsi); + } priv->dsi[msm_dsi->id] = msm_dsi;