From patchwork Mon Feb 12 06:31:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 10211875 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A266D60329 for ; Mon, 12 Feb 2018 06:31:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9117128BC2 for ; Mon, 12 Feb 2018 06:31:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85A5E28BCA; Mon, 12 Feb 2018 06:31:22 +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=-2.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2162228BC2 for ; Mon, 12 Feb 2018 06:31:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 420D46E078; Mon, 12 Feb 2018 06:31:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8093F6E078 for ; Mon, 12 Feb 2018 06:31:18 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C877360312; Mon, 12 Feb 2018 06:31:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518417077; bh=qlKrM7vs+qeLYBrIGJ8MahfwtpnLnyFgU8H0BhTLnpQ=; h=From:To:Cc:Subject:Date:From; b=bYsByDCl8k3fs3LmXWTefR3SIehvbxLyyfUlkw7Yj9UBjBTg1jv2WqeR1+7htsCXx D1pcvaaaL56fAc5gWu3pslP/wiVZQ0FYr73xiRyTwLDl7ZRwVZB0le4QgcOsJQCsUS rf7Ez+x1bCrJylEoAQzAS0XlzmAB9RA9wktX+gJc= Received: from localhost.localdomain (unknown [182.71.117.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id BE91D60312; Mon, 12 Feb 2018 06:31:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518417077; bh=qlKrM7vs+qeLYBrIGJ8MahfwtpnLnyFgU8H0BhTLnpQ=; h=From:To:Cc:Subject:Date:From; b=bYsByDCl8k3fs3LmXWTefR3SIehvbxLyyfUlkw7Yj9UBjBTg1jv2WqeR1+7htsCXx D1pcvaaaL56fAc5gWu3pslP/wiVZQ0FYr73xiRyTwLDl7ZRwVZB0le4QgcOsJQCsUS rf7Ez+x1bCrJylEoAQzAS0XlzmAB9RA9wktX+gJc= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org BE91D60312 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org From: architt@codeaurora.org To: robdclark@gmail.com Subject: [PATCH] drm/msm/dsi: Get byte_intf_clk only for versions that need it Date: Mon, 12 Feb 2018 12:01:07 +0530 Message-Id: <1518417067-7808-1-git-send-email-architt@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, sibis@codeaurora.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Archit Taneja Newer DSI host controllers (SDM845 in particular) require a new clock called byte_intf_clk. A recent patch tried to add this as an optional clock, but it still set 'ret' to an error number if it didn't find it. This breaks the host's probe for all previous DSI host versions. Instead of setting this up as an optional clock, try to get the clock only for the DSI version that supports it. Fixes: 56558fb ("drm/msm/dsi: Add byte_intf_clk") Signed-off-by: Archit Taneja --- drivers/gpu/drm/msm/dsi/dsi_host.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index f675975..62ac614 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -378,11 +378,16 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host) goto exit; } - msm_host->byte_intf_clk = msm_clk_get(pdev, "byte_intf"); - if (IS_ERR(msm_host->byte_intf_clk)) { - ret = PTR_ERR(msm_host->byte_intf_clk); - pr_debug("%s: can't find byte_intf clock. ret=%d\n", - __func__, ret); + if (cfg_hnd->major == MSM_DSI_VER_MAJOR_6G && + cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_2_1) { + msm_host->byte_intf_clk = msm_clk_get(pdev, "byte_intf"); + if (IS_ERR(msm_host->byte_intf_clk)) { + ret = PTR_ERR(msm_host->byte_intf_clk); + pr_err("%s: can't find byte_intf clock. ret=%d\n", + __func__, ret); + goto exit; + } + } else { msm_host->byte_intf_clk = NULL; }