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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C780C4345F for ; Wed, 17 Apr 2024 10:14:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OocJ0hBejD7iAPy768DCzKcMEY+U03bwa3QdMhGshLE=; b=SebYEvRRq+jEVz3Bj2oiznbWhE 6OALfT+Pd11p0uy0YNFmcOSrCzzOf/Kwy5ZZNgzDX9SxvZ0CxJoK36b+4qEKFMsBRuR/E+xaUHOzB Ajuqcl+ezyd7ph0ArLnz1YZkddGHeRxxParaR5KWySgwgOirfqMD9fMtWNI7SFrVqlqF9LTP/2eOp OE+lg2AVa/lSXCdtHBCp01wgp2s38kE+p71L+s9vQRyZZZT/6xIxebqeepv21Iwdth6cbMvVGFAHW 7fhTkjFax6TAgrXHQx54mduT2ke2wYHSSmDYj4FGPGLAGEoAtoYyj4Cusmm156F5Voj0n9hQeQqBg fyMqGmGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx2JV-0000000FX7o-2rG6; Wed, 17 Apr 2024 10:14:49 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rx2JK-0000000FX0E-1RHy; Wed, 17 Apr 2024 10:14:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1713348877; bh=YvVBQEYNETjnryX3V3rRszU6fJ5mSGyMpP5/6fWcdx0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ZRCz0NtOmGL19dZ/AZdo/eQy9yQ/QLs/EgbA8ahuojL/37QEyFW/BCKJYkFjZy3x/ q9Ammmd57wt4pdsZfcbnDam3UveEKyWuDwOgxPUqd/BoGzRBke/cPeyuRuQ4lI3DGL UKFDrnWF5J4xbfrW6UuFUMZZDiNrGwMpX6RPmFNHZqEAnmaRvlN5aTS2N6UE9dc78d iWoe5AFsSG0un1IExZ5Gd2YI5S9PuLzKCDdqyG6iQfNFfZhv28KHPlOfppszSx1hJa ATLyLerogfrBucrR0WZ+Gjq1/L4Ay3hmdnhAaP9EmZa+vCM0iAn2+zXPvMIRbtpllT pj7RwG5VkGNRQ== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id B84D437820F9; Wed, 17 Apr 2024 10:14:35 +0000 (UTC) Message-ID: <2550d65a-7963-40d1-b360-8ce7a2aff1a8@collabora.com> Date: Wed, 17 Apr 2024 12:14:35 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 14/18] drm/mediatek: add mt8365 dpi support To: Alexandre Mergnat , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , Jitao Shi , CK Hu , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , Michael Turquette , Stephen Boyd , Catalin Marinas , Will Deacon Cc: dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, linux-clk@vger.kernel.org References: <20231023-display-support-v2-0-33ce8864b227@baylibre.com> <20231023-display-support-v2-14-33ce8864b227@baylibre.com> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20231023-display-support-v2-14-33ce8864b227@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240417_031438_557226_2CF118D9 X-CRM114-Status: GOOD ( 19.34 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Il 16/04/24 17:53, Alexandre Mergnat ha scritto: > - Add compatibles and platform data into the Mediatek DPI driver. > - Fix the DPI0 parent clock to be consistent. > > This SoC is compatible with the mt8183 calculate factor. > > Signed-off-by: Alexandre Mergnat > --- > drivers/clk/mediatek/clk-mt8365-mm.c | 2 +- > drivers/gpu/drm/mediatek/mtk_dpi.c | 18 ++++++++++++++++++ > 2 files changed, 19 insertions(+), 1 deletion(-) > > diff --git a/drivers/clk/mediatek/clk-mt8365-mm.c b/drivers/clk/mediatek/clk-mt8365-mm.c > index 01a2ef8f594e..3f62ec750733 100644 > --- a/drivers/clk/mediatek/clk-mt8365-mm.c > +++ b/drivers/clk/mediatek/clk-mt8365-mm.c > @@ -53,7 +53,7 @@ static const struct mtk_gate mm_clks[] = { > GATE_MM0(CLK_MM_MM_DSI0, "mm_dsi0", "mm_sel", 17), > GATE_MM0(CLK_MM_MM_DISP_RDMA1, "mm_disp_rdma1", "mm_sel", 18), > GATE_MM0(CLK_MM_MM_MDP_RDMA1, "mm_mdp_rdma1", "mm_sel", 19), > - GATE_MM0(CLK_MM_DPI0_DPI0, "mm_dpi0_dpi0", "vpll_dpix", 20), > + GATE_MM0(CLK_MM_DPI0_DPI0, "mm_dpi0_dpi0", "dpi0_sel", 20), While I can agree with that change, this needs a Fixes tag and needs a commit on its own. > GATE_MM0(CLK_MM_MM_FAKE, "mm_fake", "mm_sel", 21), > GATE_MM0(CLK_MM_MM_SMI_COMMON, "mm_smi_common", "mm_sel", 22), > GATE_MM0(CLK_MM_MM_SMI_LARB0, "mm_smi_larb0", "mm_sel", 23), > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c > index beb7d9d08e97..a4f9376ee472 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -997,6 +997,23 @@ static const struct mtk_dpi_conf mt8195_dpintf_conf = { > .csc_enable_bit = DPINTF_CSC_ENABLE, > }; > > +static const struct mtk_dpi_conf mt8365_conf = { > + .cal_factor = mt8183_calculate_factor, > + .reg_h_fre_con = 0xe0, > + .max_clock_khz = 150000, > + .output_fmts = mt8183_output_fmts, > + .num_output_fmts = ARRAY_SIZE(mt8183_output_fmts), > + .pixels_per_iter = 1, > + .is_ck_de_pol = true, > + .swap_input_support = true, > + .support_direct_pin = true, > + .dimension_mask = HPW_MASK, > + .hvsize_mask = HSIZE_MASK, > + .channel_swap_shift = CH_SWAP, > + .yuv422_en_bit = YUV422_EN, > + .csc_enable_bit = CSC_ENABLE, > +}; You don't need this, as that's a direct copy of `mt8192_conf`. > + > static int mtk_dpi_probe(struct platform_device *pdev) > { > struct device *dev = &pdev->dev; > @@ -1092,6 +1109,7 @@ static const struct of_device_id mtk_dpi_of_ids[] = { > { .compatible = "mediatek,mt8188-dp-intf", .data = &mt8195_dpintf_conf }, > { .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf }, > { .compatible = "mediatek,mt8195-dp-intf", .data = &mt8195_dpintf_conf }, > + { .compatible = "mediatek,mt8365-dpi", .data = &mt8365_conf }, ...and you don't need to add any mt8365 specific compatible in there as well, as you can simply add the node as compatible = "mediatek,mt8365-dpi", "mediatek,mt8192-dpi"; Cheers, Angelo > { /* sentinel */ }, > }; > MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids); >