From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,UNPARSEABLE_RELAY, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04067C004C9 for ; Tue, 7 May 2019 07:41:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC6EC21019 for ; Tue, 7 May 2019 07:41:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726959AbfEGHld (ORCPT ); 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, > + }, > { }, > }; >