Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3268663yba; Tue, 16 Apr 2019 08:01:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzevzRK53RdG373PoLGktv9oK7eBCORvo13ixkhzH9mS5jraF/hB6lQltmMLrklEf3bZZLd X-Received: by 2002:a62:e304:: with SMTP id g4mr77590628pfh.71.1555426917623; Tue, 16 Apr 2019 08:01:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555426917; cv=none; d=google.com; s=arc-20160816; b=sxC2pXJR6xn6iIkjEiFCPIpAr+y9/iW5mW4fBl4MxFJg9tt79elUmPpb3xUIADlj2L Co7f6NAOgN6QJqR+r18bffrL/awfRjMe22g8Nqe6LJeG3uzjcOIqhLIaXR8QLQ5ZAAs4 jG+iZcb02zgboTndrizI5IA3tZhnH9lFGY63RNyeTlyUtL4h9kT891OCTueI6vHPXoZT 3f61yWHswAVaVBlhQkN8yrspfius1Vg32aojJg05Z3+gmDcG4eHjCOj+DTgrdwHzb0oG ywogseL1ePx8F4T4/Z+Y5t8jUfdeyAtoI81WLFEfMyIhVpeOmBROC318/5RenlOkB25W AwWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=TX1rJAt+gEGcu8t0NNwYy68GW+RUZ3ZEyrSdsky9YV0=; b=uSf+cErCED+v0mF8sAJqhhTz5ZvURRwe8NYLjujHRJeGMcYyuhaDFhk0ga633/GsiP zNL81355OeRoBqh6VX/GfE0U6Zp9yx6rHarLoD1ypp/OocfZSziZc9R+3PIbTiezLWsB 4qRQFZ2Fw4ox/+Prv+e3RaDdhxp0M+O0+yQqRMBSAJHdaxTLDlwGwCdrdRVqgbLPVfw+ DGaPdmanir2sLfgUPm2abUV3cL/gW9ZjyU/UXlxncw/X/FstzFdSdMcoKEx4fbRI87SA 4m3OpoiNb5rk0IPcUzz4iGyWs7Iozezhk3p4u5GYRWy+NQaz9Znxh6XAr+stPoCkgL3U MBig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=fqpCQmYR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si48607382plp.201.2019.04.16.08.01.40; Tue, 16 Apr 2019 08:01:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=fqpCQmYR; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729915AbfDPPAg (ORCPT + 99 others); Tue, 16 Apr 2019 11:00:36 -0400 Received: from mout.gmx.net ([212.227.17.22]:35267 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729871AbfDPPAP (ORCPT ); Tue, 16 Apr 2019 11:00:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1555426750; bh=V+zaO1oNND4YPt599ysKBo3HAApCHzDDfia1P8jPJ5Y=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=fqpCQmYRC4IViathwE3LSgtixwoUFESenPT9Wu59Ka/0cIl950PXx7JjRxH62ZNlx c8dKpBn0g2pUPdqWznDaw/vbA9oTRR8Hoy3qCMjl33j6gZXUjk2IhiYhVecoYY8KL/ AuFVnpvNySOamTCbc7EQ6TbUneSlZO6V3CT3ePUk= 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 Cc: Frank Wunderlich 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-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:gdUGEW4INsw=:dIPi0TF04leMtAK5KC/cBr +rpCeJs7tcDAPLKsgOP5r4iP7wJS0brLeb0C8eYtgaoXbkgQvf/UfkAjw1pQ2ruCtgsEJE888 K11is0HPzpTRUHZqB1dNFN+rHJBeb9xUIEUo4/37vvBr92u5QY8sQegqjI/3RiecAfQm1pXyh I8FZ2/wb6GIqEHnYMIcIFvK+YNF7hvFUkXBujBje6h3VX5eNADUZ/P9BdGpq+ES21+5eHUmZj ycc5CJEoiY4cxJXwSSEgexcf9nZ2fAVTTbGmuCLV8tyQyJcncCn3tVF64Uyr2UAlnPy9jhavm em+qlq/tVl238Y3mdHD+GapQiHmkFbsafYTeSDcP00uAoMXOB4mHnK+8gjB7q3eJOy9+CxiWe TG4TMAWsvKZLKOBz/6CDuC7Bt9ST9GqGzmp1WJV1y7cit97GmMq+CTd+i8hdteL2+SsUViS9W r+FUP9+Xq/Du/U6NTGOkaPQOck3Z7KGg0gpZ/+4DHU3jbgjRrVgEblDC5YiriakrzLyQAJ+fO yxwcawASedZHHHVBidJFOBPnWq5IT/8IHf6K5ZdNrG+XqJ6sUcY1QYyBUG7KmON/eCxKhs2kc l5UNSNocuZRxbSkrKqxiaUX/+SqRdvQw/27MOZREVdyHlpuUH4IZ33qhu+SP3yxSMLBF3bFja p3aS/qdnr02Jjsohu4Kd8YByB4yUMhdwLF6Y4sNI/AMMDwBsT/Nk9Ck9crtNHsOHsXFQI5ZhA pIIOh6qrjLxVjYl8n9RTjeKum/fpTtkA75xpIgeXixkOPZ3XHt6T0YaY0DwBmw2Pvz48VQkCE nksMYjkQ+IoTGhxDb1ty11pHb1XixlIHfoZ3sWhbYGQOuZHAITXkPIHrAdZDs5v0HVBxqg3nJ XckjoaMvrfPsqHeesZ/WOzqf3DeD4qpboDnws05XjEdL3VmgRaqBHg381QLsXY Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 =2D-- 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(+) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi_phy.c b/drivers/gpu/drm/med= iatek/mtk_hdmi_phy.c index 5223498502c4..edadb7a700f1 100644 =2D-- 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/med= iatek/mtk_hdmi_phy.h index 2d8b3182470d..f472fdeb63dc 100644 =2D-- 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 =2D-- 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 =3D { .tz_disabled =3D true, .flags =3D CLK_SET_RATE_GATE, + .pll_default_off =3D true, .hdmi_phy_clk_ops =3D &mtk_hdmi_phy_pll_ops, .hdmi_phy_enable_tmds =3D mtk_hdmi_phy_enable_tmds, .hdmi_phy_disable_tmds =3D mtk_hdmi_phy_disable_tmds, =2D- 2.17.1