Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3428611yba; Tue, 7 May 2019 00:42:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9+iTLFRyI/lJ7L3WzbgRaEkXNpGbz0CQWupM7YOpeWaXnzAw3HvhDHizIG6FK30ZnmeDh X-Received: by 2002:a62:14d6:: with SMTP id 205mr39274313pfu.4.1557214958200; Tue, 07 May 2019 00:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557214958; cv=none; d=google.com; s=arc-20160816; b=ujbwrWsTOYPqGbOVUt+1K/UA16WlIi5TpY218j6NxSficmYFd1WbiMfUdiIOG+PPqw payw7LS46gecPBYmP+rpSjMnio5Py9Q++VATl12wk574+Tj0J9fW28Z/1ChRVtpVAIle eSKMVPgSnnAWSuxV55q4j2TOBt3Rioa0ubjZ7TR20qzR90dcrSypUiNk2IkIjlcqOaTa k9W0Z9aBXTZhLL77LA+4j9i0ou65GzXQqJQRy9w8TE1wLJtJR0DMBQsg8t+KWruQy5bw D7WaLFwF0B3eGugml0R0CSBV4wVSAlXCedJe1js6XHm5XHNTfJuQ/kCdP/nIK+2FEbx7 dAMQ== 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:date:cc:to:from:subject:message-id; bh=ZSibfwkOYn0TTQGJlL+RWlhRHvpWQV7AnPXWcqDwZXo=; b=BelQOI9g53wnV0nMEMzKFIcj2OuDktAGKuwAtkoY5hPg2mA+jOhEQ3DvHhQbKFx0RI R1ZZVyIDCUrkNyVoVKpdQkUBY6M953krj5Mh4mvyGUKfk4fjyQ13AKdRJ+vbPa0B1cW3 LbnOyqbMGp+0VQGCZ5VUg5U7phub1RQ5zGxz6TJNnaaRQACVDdte4FXOUxq66GKX3Hgw 9BBfQCbPjhfiWL2LWCl0z3rbNS61YRgINrd4B7AyOPcX/TH67St8Ux38xdi4VpFCGGpm 4uFVYIQbKZQ+jAz3oMfy7JByr5A/7Rx34o+cSKGslnsYqzGA2NDJo//1ZZxQMISCU2gb t6kw== ARC-Authentication-Results: i=1; mx.google.com; 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 f9si17787836plo.101.2019.05.07.00.42.22; Tue, 07 May 2019 00:42:38 -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; 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 S1726928AbfEGHld (ORCPT + 99 others); Tue, 7 May 2019 03:41:33 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:30640 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726561AbfEGHlc (ORCPT ); Tue, 7 May 2019 03:41:32 -0400 X-UUID: 5c8c42ba27db4e4e9655739fc1987802-20190507 X-UUID: 5c8c42ba27db4e4e9655739fc1987802-20190507 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 601173642; Tue, 07 May 2019 15:41:29 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS33N1.mediatek.inc (172.27.4.75) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 7 May 2019 15:41:27 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 7 May 2019 15:41:27 +0800 Message-ID: <1557214887.3498.7.camel@mtksdaap41> Subject: Re: [v3 3/3] drm/mediatek: add mt8183 dpi support From: CK Hu To: Jitao Shi CC: Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , Kumar Gala , , David Airlie , "Matthias Brugger" , Thierry Reding , "Ajay Kumar" , Inki Dae , "Rahul Sharma" , Sean Paul , Vincent Palatin , Andy Yan , Philipp Zabel , "Russell King" , , , , , , , Sascha Hauer , , , , , Date: Tue, 7 May 2019 15:41:27 +0800 In-Reply-To: <20190416055242.75764-4-jitao.shi@mediatek.com> References: <20190416055242.75764-1-jitao.shi@mediatek.com> <20190416055242.75764-4-jitao.shi@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jitao: On Tue, 2019-04-16 at 13:52 +0800, Jitao Shi wrote: I need the commit message. Even though the code is easy to understand, words for this patch is still necessary. Regards, CK > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c > index 66405159141a..fbb087218775 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -681,6 +681,16 @@ static unsigned int mt2701_calculate_factor(int clock) > return 2; > } > > +static unsigned int mt8183_calculate_factor(int clock) > +{ > + if (clock <= 27000) > + return 8; > + else if (clock <= 167000) > + return 4; > + else > + return 2; > +} > + > static const struct mtk_dpi_conf mt8173_conf = { > .cal_factor = mt8173_calculate_factor, > .reg_h_fre_con = 0xe0, > @@ -692,6 +702,12 @@ static const struct mtk_dpi_conf mt2701_conf = { > .edge_sel_en = true, > }; > > +static const struct mtk_dpi_conf mt8183_conf = { > + .cal_factor = mt8183_calculate_factor, > + .reg_h_fre_con = 0xe0, > + .dual_edge = true, > +}; > + > static int mtk_dpi_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > @@ -787,6 +803,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { > { .compatible = "mediatek,mt8173-dpi", > .data = &mt8173_conf, > }, > + { .compatible = "mediatek,mt8183-dpi", > + .data = &mt8183_conf, > + }, > { }, > }; >