Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp218790ybg; Tue, 28 Jul 2020 04:20:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIpCKAmabSx3Spx27pLtzbnVn2SV9FJ2aAM27DcHvvyk6Rrh+ZURUHtBveACT2wC4AB03Q X-Received: by 2002:a17:907:7202:: with SMTP id dr2mr17927701ejc.36.1595935253777; Tue, 28 Jul 2020 04:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595935253; cv=none; d=google.com; s=arc-20160816; b=KzgSjMw1iDyd/tNquyr87h9cKcAcey3xHZFQY/4T2Fo47nPOIAX6YZvpH5vCVDpPpC yvATvtELxSoIy5VIoigE8K6C7x2Y/4r//7bUm2pq1L5OpuVmWZaM0Wz4noYlZL3kGeM8 rOxWMsBnWI+xYdn93C9hRK7iFkVsr8nkDeYAed3ev07UOyugNcHQWG+NJbkCLgyrk6WL 0Unazysk3/MS6pqk5pU1LZKKN4GR4ZF6EXofk8tZPhvegOezm59mmyFNVN5CSbUhbeUK X2+VlLJmRbjOAEVh6weqPNePafRO1b3OK1TjtjVrlSmlDq8iIIwdtrDEbFfQ7G/Q02/B 3Cxw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hOEK9xNUhPZZvCXtVt+fk6gQJJthsjrweXYwp+PV0Mg=; b=R/iJPu0k7gCSpYqw1zfZpyILfv/9xOgQIPE5Ta9cTGSjd5VqW7LGyc5OyEGpHy4Nuv cYiUQbjYBrCvA5ssj6hrqmKsztoYQZSkz04ulrGYvHxdbVW8oCyipBdjR+Ueg7Llbyym GaiOUq/djFZtAgYnvbNAqYJ1vD16FfDTSPA4ewlWOYOmW1bU+/B139xRRP4uuU9jnLHd /Vno55SRNhvUjjkbQZExtKEytbPSNikgPiICDRCY/1ZZGx80hYgtT2c5lKgL6ViJ87aE wpYZ04pe926eDjkaGIic4OkmvvZqs31W7qRgSvxwInN2dEiaxUb2MHXnzI9mI045TLwh iVYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=D8wok7Vx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si8026101ejf.228.2020.07.28.04.20.32; Tue, 28 Jul 2020 04:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=D8wok7Vx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729074AbgG1LTh (ORCPT + 99 others); Tue, 28 Jul 2020 07:19:37 -0400 Received: from mout.gmx.net ([212.227.17.21]:47797 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729048AbgG1LTc (ORCPT ); Tue, 28 Jul 2020 07:19:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935103; bh=+AN/A7LaJ8QE7aEa8re6PrqGoq/kSyCmQ9u1D7Iy5LI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=D8wok7VxB0mIvkh48xKtrEvGEbuIEDbNRu2dKCl4Hgek+N85Rue7sHVaXCxm4mVTl MN8dP5oBINRQZLdZpNVChq0a48UnOuDhey02LN/mVAaHVKG61QLc3PfaylK5xsekef DhZJeAxZaq/GxOXTGfB/jWknlu+A4ro/v2EOUftw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MgNh1-1kiFof40mV-00hsD8; Tue, 28 Jul 2020 13:18:23 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, chunhui dai Subject: [PATCH v2 2/5] drm/mediatek: fix boot up for 720 and 480 but 1080 Date: Tue, 28 Jul 2020 13:17:57 +0200 Message-Id: <20200728111800.77641-3-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ak6ylIwTkGEi+mVAT3DUFYeBflxF5UYrm21Ep/FvtMOgSVvosry re5T5r+z1mGqxMwD61JmDn8kXvfaEsk8E5o6GNX/A4yzkKQh5AmNhTlp8O1kK8euvhrXFWp NhVShiqVk49RchrRqkTBVvSn/O/dsTnEra+yI4Ykv0nQELNnk7mjirt/GkINhIpGwhrgcNx 8Jnt6M95h7lBxQSpTgtWQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:dqUcR0KBXak=:aRyR9GOnlN77WX8Zjvk0JI YepXy56eg10gErublaOanE/Bmqqf2Baw8del2gqrNPIwfPQ7n+DOiqTR6n6G8yVLuk9IQU5j8 i76C1QN0Cukxg3eowP4JKteczmd/mfBaqFkGzbegQSZ1AvW/p7+wSx4iQSANEFBwoxEL+6HQU kSAhV52L9qNFPJQnreTu0t+PQo14ZzBgt/zzb3hBY4juiWVycCBp2233Zt5rhxcGIaJQ5mehn 9GSgv0KeuDWcnZsBWA4x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bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: chunhui dai - disable tmds on phy on mt2701 - support other resolutions like 1280x1024 without this Patch i see flickering on my TFT (1280x1024), so i guess clock is wrong. 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.25.1