From patchwork Fri Jun 16 05:09:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Archit Taneja X-Patchwork-Id: 9790545 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 518FA60231 for ; Fri, 16 Jun 2017 05:09:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 49C10285B3 for ; Fri, 16 Jun 2017 05:09:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EDC52863B; Fri, 16 Jun 2017 05:09:47 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, 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 EE843285B3 for ; Fri, 16 Jun 2017 05:09:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750827AbdFPFJq (ORCPT ); Fri, 16 Jun 2017 01:09:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50266 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbdFPFJp (ORCPT ); Fri, 16 Jun 2017 01:09:45 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2F0FE60D09; Fri, 16 Jun 2017 05:09:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1497589785; bh=Duuw12nE6gUdKw0UmCE4T8Q9IXNndCkbaViZD4OW4GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SOFI6QbhQh9H8K1qEkReOsiRjnPViUN03YmHuF/w3pfiKubDmKKRdQCHNQ+Lj+p7k CB9/hHw3SnbISeQ+FDL0UDeEt7P7lBu9xfjXUGU/dakILVOgoT7yWfpqxBNDLgJPSR WeK//ssiDtGcmmqLc1GqNrdH/aH1r38lbQnIGxPU= Received: from localhost (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: architt@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1D6E560CF0; Fri, 16 Jun 2017 05:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1497589784; bh=Duuw12nE6gUdKw0UmCE4T8Q9IXNndCkbaViZD4OW4GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ozAs1YZecvH2o9X6Xw6Osa/nChGk/13+am7pHC+Qeklpv0QF2eQVAczAfPnlG+R7M cwgxMAQJ37zjJUQFMl6STNyky5hRLLDlbEi5lVrwtIlea5SRPLqljet1BXpnC5LDMz z/au0EUi3a6Tkc2vCjTxw2wVgeiCA2mMiDmgt0gE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1D6E560CF0 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: Archit Taneja To: robdclark@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Archit Taneja Subject: [PATCH 1/3] drm/msm/hdmi: 8996 PLL: Populate unprepare Date: Fri, 16 Jun 2017 10:39:34 +0530 Message-Id: <20170616050936.1280-2-architt@codeaurora.org> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170616050936.1280-1-architt@codeaurora.org> References: <20170616050936.1280-1-architt@codeaurora.org> 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 Without doing anything in unprepare, the HDMI driver isn't able to switch modes successfully. Calling set_rate with a new rate results in an un-locked PLL. If we reset the PLL in unprepare, the PLL is able to lock with the new rate. Signed-off-by: Archit Taneja --- drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c index 143eab46ba68..1fb7645cc721 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c @@ -670,6 +670,11 @@ static unsigned long hdmi_8996_pll_recalc_rate(struct clk_hw *hw, static void hdmi_8996_pll_unprepare(struct clk_hw *hw) { + struct hdmi_pll_8996 *pll = hw_clk_to_pll(hw); + struct hdmi_phy *phy = pll_get_phy(pll); + + hdmi_phy_write(phy, REG_HDMI_8996_PHY_CFG, 0x6); + usleep_range(100, 150); } static int hdmi_8996_pll_is_enabled(struct clk_hw *hw)