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: 10211873 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.web.codeaurora.org (Postfix) with ESMTP id E7D2D60329 for ; Mon, 12 Feb 2018 06:31:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D500C28BC9 for ; Mon, 12 Feb 2018 06:31:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C81E128BC2; Mon, 12 Feb 2018 06:31:19 +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=-5.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB, 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 32D1928BC2 for ; Mon, 12 Feb 2018 06:31:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751081AbeBLGbS (ORCPT ); Mon, 12 Feb 2018 01:31:18 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:39644 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783AbeBLGbR (ORCPT ); Mon, 12 Feb 2018 01:31:17 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 92F5860B67; 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 Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, sibis@codeaurora.org, Archit Taneja 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 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 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; }