From patchwork Tue Apr 16 14:58:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 10903303 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 EE56717E0 for ; Tue, 16 Apr 2019 15:05:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D13E128587 for ; Tue, 16 Apr 2019 15:05:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5B5128986; Tue, 16 Apr 2019 15:05:57 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7896528587 for ; Tue, 16 Apr 2019 15:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=bibfNbLdWkEidomYESapnIf2s4NKLz7wqiHZxhdFkcw=; b=jPTgHUIzbL4hvGevcQVGkZFlNv jYAa6rITFnWhf57r4Io0UGQoTVY/TxBWPBHePapCIf7j/gVEfkKxwF4KFlfqu99olr5YWUhuWvXtU eyo9VnJ5WeRjd4Nc3FCwSP6qZd14c/pH7krCWhXuURE9WMFq0ZmbBnNfQDOXy9Z9B0K3KMPSxVViV U/l4xv3ym/dhKYVqilfeCypDBhOIzact78e1MEbiOt7X3tA4mEcM6rJOolZNOEjxdpUrdak7rj2XV ahyLkGpRcng0Gn3xXpm/4R7Z0WQLTT0Y8JhAaE0N5dRzL99hsXzJZM/gGkHGP6okxbb39vTxF9ylQ Mxsa4H5w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPek-0003Vt-Dj; Tue, 16 Apr 2019 15:05:54 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGPeg-0003UD-CX; Tue, 16 Apr 2019 15:05:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555427149; bh=V+zaO1oNND4YPt599ysKBo3HAApCHzDDfia1P8jPJ5Y=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=OvBi+gRm5IbrXV4qI6TZWOWZCGZ0eiU8Zl169euiYmj88nAqOg6w/7xt48Kr90iSL AHnaSC4GfMgPZygpcgL8fTkwnYUNTbFhCPh4RzRPgZh3SBVT/kOKS2VBqFf0+9ktZP fgWA9pVAOIHOStvLB3zDeQSZE/7JqK2wYDUqJBI4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([185.53.43.193]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MCwbX-1h7qxh0exv-009fzp; Tue, 16 Apr 2019 16:59:10 +0200 From: Frank Wunderlich To: CK Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, chunhui dai , Ryder Lee , Bibby Hsieh Subject: [PATCH v1 3/4] drm/mediatek: fix boot up for 720 and 480 but 1080 Date: Tue, 16 Apr 2019 16:58:47 +0200 Message-Id: <20190416145848.11932-4-frank-w@public-files.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190416145848.11932-1-frank-w@public-files.de> References: <20190416145848.11932-1-frank-w@public-files.de> X-Provags-ID: V03:K1:PiJgWiG+Mo0uMUDwX8rwuLcYg4MxdatLBtp4pICKQlJHr2Nhy2T T75TERfqyQkmhcL4Wz6tnIJ5JYuJgNoc+hpit4D33Rh6xcvtyODJUfViYejgx3O1xSGcJXs xSIRqq67asWYV61vY+hp+pW1S0LtdVOr9xX9e1c8UrNcMh7lTjoQI9R/jkiIDGRHJ1psbY/ dE0Pc/BS2OxQt7q8WFNmg== X-UI-Out-Filterresults: notjunk:1;V03:K0:8nqKLC66Sds=:uVMJbrfHa6X+713ju45EEU EIa3QOUZAavkEQ8CKf5COQwhzoPPSdvr13JC/eo107c3RgmaWPfYOaMysJjrFXTDJIaQ1zn85 acLqQL0vxzkOzMtH1KxaOGnrcNP/VIZO3+tJI7x5hgf66sRLSMqqOJgTI+P84393fLIdtEiM2 8q5MczjPYwr9WYtIAt5wLzLkw0q1qCkik4WxUU5VgtEaNpiyxwdXz5pnDO/7Kw8oyEveFrSTB wHjl6qqNfrYNrbUzcRWR/P+Kv1blfee0NzI+GgzHOJAcDFh3/HSLse+jZFWGZsus4IXH7B8L+ eD209VzUqangmokcSmfogvqIdthkUFgPF67sXgu815D3gwFPBkJjBd5M/kKWW1wFgO7MW56PD 44vyZPHhzA9OR/+y0mYDzyRqPREcshMVyrPpLW3osSmp1lN5OxZBNgVl+5FTMtyGX3ECqIOcb MtogjFXJLu0Rt69Ge9XGxGDEfmzDlQA2oBLHyDolyuhRzuowN10aixqbY8/yZVIdpEG3qOxSa wdHVcjrnOD6hSukHxRRh7nFwd2c6c0T4K3CtMdM43ZvQ+OyMuNzPufuanrN6LplT4az08GO3I iLOuG9d5NnoQaBeChOM57BH25hfKkViUQCvPRfyOsCrP86DGMN1W3c5ui+Q0D3FhIQiKb5gJ9 gvhmJCYlG1pjNG+vnu38nnpGF30W5UMEa00twMS8YFafmtD0MxH93MNdpwOWqz8kGtXf6Bqr1 9t8FCz3asBl0/qTtcO5woJXd23ogNrcHsRD3t2IGIf83X0eZS7CedSYya5CRiD5KQh+vEyJ9H UMO2AqiDMeYX9FvblEj4zsTGIYxdhOVcDYbmE00bC8dpkx1EONjeBxeluOz6Fq2oEpuYWrs0Z 3zERpmX1LVtRWri1uSa3HK0+J3nApklE67r3ZHIbyYo2P3e6x7viTxLpFn5TQm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190416_080550_762393_4A2495BE X-CRM114-Status: GOOD ( 10.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Frank Wunderlich MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: chunhui dai - 1080 plg in/out with ng/ok - support other resolutions like 1280x1024 Signed-off-by: chunhui dai Signed-off-by: Frank Wunderlich Tested-by: Frank Wunderlich --- drivers/gpu/drm/mediatek/mtk_hdmi_phy.c | 3 +++ drivers/gpu/drm/mediatek/mtk_hdmi_phy.h | 1 + drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c | 1 + 3 files changed, 5 insertions(+) -- 2.17.1 diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c index 5223498502c4..edadb7a700f1 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c @@ -184,6 +184,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) return PTR_ERR(phy_provider); } + if (hdmi_phy->conf->pll_default_off) + hdmi_phy->conf->hdmi_phy_disable_tmds(hdmi_phy); + return of_clk_add_provider(dev->of_node, of_clk_src_simple_get, hdmi_phy->pll); } diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h index 2d8b3182470d..f472fdeb63dc 100644 --- a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h +++ b/drivers/gpu/drm/mediatek/mtk_hdmi_phy.h @@ -22,6 +22,7 @@ struct mtk_hdmi_phy; struct mtk_hdmi_phy_conf { bool tz_disabled; unsigned long flags; + bool pll_default_off; const struct clk_ops *hdmi_phy_clk_ops; void (*hdmi_phy_enable_tmds)(struct mtk_hdmi_phy *hdmi_phy); void (*hdmi_phy_disable_tmds)(struct mtk_hdmi_phy *hdmi_phy); diff --git a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c index d3cc4022e988..6fbedacfc1e8 100644 --- a/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c +++ b/drivers/gpu/drm/mediatek/mtk_mt2701_hdmi_phy.c @@ -239,6 +239,7 @@ static void mtk_hdmi_phy_disable_tmds(struct mtk_hdmi_phy *hdmi_phy) struct mtk_hdmi_phy_conf mtk_hdmi_phy_2701_conf = { .tz_disabled = true, .flags = CLK_SET_RATE_GATE, + .pll_default_off = true, .hdmi_phy_clk_ops = &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds = mtk_hdmi_phy_enable_tmds, .hdmi_phy_disable_tmds = mtk_hdmi_phy_disable_tmds,