From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "robh@kernel.org" <robh@kernel.org>,
"tzimmermann@suse.de" <tzimmermann@suse.de>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"mripard@kernel.org" <mripard@kernel.org>,
"kernel@collabora.com" <kernel@collabora.com>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"airlied@gmail.com" <airlied@gmail.com>,
"Justin Yeh (葉英茂)" <Justin.Yeh@mediatek.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"Jason-JH Lin (林睿祥)" <Jason-JH.Lin@mediatek.com>
Subject: Re: [PATCH v2 28/46] drm/mediatek: Add support for MediaTek Digital Video Output (DVO)
Date: Fri, 20 Nov 2026 07:42:36 +0000 [thread overview]
Message-ID: <b7b4c2bf61a88b533e504603c4dcbc79c1de6f06.camel@mediatek.com> (raw)
In-Reply-To: <20260714114414.184512-29-angelogioacchino.delregno@collabora.com>
On Tue, 2026-07-14 at 13:43 +0200, AngeloGioacchino Del Regno wrote:
> Add a new driver for the Digital Video Output (DVO) hardware found
> in the MT8189, MT8196 Kompanio SoCs and their Dimensity and Genio
> variants.
>
> This version currently supports output to Embedded DisplayPort on
> MT8189 and MT8196, and to DisplayPort on MT8189.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
[snip]
> static inline struct mtk_dpi *bridge_to_dpi(struct drm_bridge *b)
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> index f7cbf9b47672..f96f887809c0 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
> @@ -621,8 +621,12 @@ static const struct of_device_id mtk_ddp_comp_dt_ids[] = {
> .data = (void *)MTK_DISP_DSI },
> { .compatible = "mediatek,mt8188-dsi",
> .data = (void *)MTK_DISP_DSI },
> - { .compatible = "mediatek,mt8196-dsi",
Why do you remove "mediatek,mt8196-dsi"? This is not related to this patch.
> - .data = (void *)MTK_DISP_DSI },
> + { .compatible = "mediatek,mt8189-dp-dvo",
> + .data = (void *)MTK_DISP_DVO },
> + { .compatible = "mediatek,mt8189-edp-dvo",
> + .data = (void *)MTK_DISP_DVO },
> + { .compatible = "mediatek,mt8196-edp-dvo",
> + .data = (void *)MTK_DISP_DVO },
> { }
> };
>
[snip]
> +static void mtk_dvo_config_color_format(struct mtk_dpi *dvo,
> + enum mtk_dpi_out_color_format format)
> +{
> + mtk_dvo_config_channel_swap(dvo, dvo->channel_swap);
> +
> + dev_err(dvo->dev, "[DPTX] format:%d", format);
I think you should use debug, not err.
> +
> + switch (format) {
> + case MTK_DPI_COLOR_FORMAT_YCBCR_444:
> + mtk_dvo_config_yuv422_enable(dvo, false);
> + mtk_dvo_config_csc_enable(dvo, true);
> + break;
> + case MTK_DPI_COLOR_FORMAT_YCBCR_422:
> + mtk_dvo_config_yuv422_enable(dvo, true);
> + mtk_dvo_config_csc_enable(dvo, true);
> + break;
> + case MTK_DPI_COLOR_FORMAT_RGB:
> + default:
> + mtk_dvo_config_yuv422_enable(dvo, false);
> + mtk_dvo_config_csc_enable(dvo, false);
> + break;
> + }
> +}
> +
[snip]
> +static void mtk_dvo_config_hw(struct mtk_dpi *dvo,
> + struct videomode *vm, struct mtk_dpi_sync *sync,
> + struct mtk_dpi_polarities *dpi_pol,
> + struct mtk_dpi_yc_limit *limit)
> +{
> + struct drm_display_mode *mode = &dvo->mode;
> + u32 vactive = vm->vactive;
> +
> + mtk_dvo_sw_reset(dvo, true);
> +
> + mtk_dvo_irq_enable(dvo);
> +
> + mtk_dpi_config_pol(dvo, dpi_pol);
> +
> + mtk_dvo_config_hsync(dvo, &sync->hsync);
> + mtk_dvo_config_vsync(dvo, &sync->vsync_l_odd, DVO_TGEN_V0, DVO_TGEN_V1);
> + mtk_dvo_config_vsync(dvo, &sync->vsync_l_even, DVO_TGEN_V_EVEN0, DVO_TGEN_V_EVEN1);
> +
> + mtk_dvo_config_interface(dvo, !!(vm->flags & DISPLAY_FLAGS_INTERLACED));
> +
> + if (vm->flags & DISPLAY_FLAGS_INTERLACED)
> + vactive >>= 1;
> +
> + mtk_dvo_config_fb_size(dvo, vm->hactive, vactive);
> +
> + mtk_dvo_config_channel_limit(dvo, limit);
> + mtk_dvo_config_channel_swap(dvo, dvo->channel_swap);
> + mtk_dvo_config_color_format(dvo, dvo->color_format);
> +
> + mtk_dvo_info_queue_start(dvo);
> + mtk_dpi_buffer_ctrl(dvo);
> +
> + mtk_dvo_trailing_blank_setting(dvo);
> + mtk_dvo_get_gs_level(dvo);
> + mtk_dvo_golden_setting(dvo);
The two register set by mtk_dvo_golden_setting() would immediately set by mtk_dvo_sodi_setting(),
so mtk_dvo_golden_setting() is redundant function. Drop it.
> + mtk_dvo_sodi_setting(dvo, mode);
> +
> + mtk_dvo_set_output_pixiter(dvo);
> +
> + mtk_dvo_sw_reset(dvo, false);
> +}
> +
[snip]
> +
> +static enum drm_mode_status
> +mtk_dvo_bridge_mode_valid(struct drm_bridge *bridge,
> + const struct drm_display_info *info,
> + const struct drm_display_mode *mode)
> +{
In dpi driver, it check mode->clock max_clock_khz, so I think here should also check this.
> + return MODE_OK;
> +}
> +
[snip]
> --- /dev/null
> +++ b/drivers/gpu/drm/mediatek/mtk_dvo_regs.h
> @@ -0,0 +1,192 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Copyright (c) 2014 MediaTek Inc.
> + * Author: Jie Qiu <jie.qiu@mediatek.com>
> + */
> +#ifndef __MTK_DPI_REGS_H
__MTK_DVO_REGS_H
> +#define __MTK_DPI_REGS_H
> +
[snip]
> +#define DVO_TGEN_INFOQ_LATENCY 0x80
> +#define INFOQ_START_LATENCY 0
> +#define INFOQ_START_LATENCY_MASK (0xffff << 0)
> +#define INFOQ_END_LATENCY 16
> +#define INFOQ_END_LATENCY_MASK (0xffff << 16)
> +
> +#define DVO_BUF_CON0 0x220
It's better to place register definition in address number order.
> +#define DISP_BUF_EN BIT(0)
> +#define FIFO_UNDERFLOW_DONE_BLOCK BIT(4)
> +
[snip]
> +#define DVO_PATTERN_COLOR 0x104
> +#define PAT_R (0x3ff << 0)
> +#define PAT_G (0x3ff << 10)
> +#define PAT_B (0x3ff << 20)
> +
> +#define DVO_Y_LIMIT 0x130
> +#define Y_LMT_BOT GENMASK(9, 0)
> +#define Y_LMT_TOP GENMASK(21, 12)
> +
> +#define DVO_C_LIMIT 0x134
> +#define C_LMT_BOT GENMASK(9, 0)
> +#define C_LMT_TOP GENMASK(21, 12)
> +
> +#define DVO_SHADOW_CTRL 0x190
> +#define FORCE_COMMIT BIT(0)
> +#define BYPASS_SHADOW BIT(1)
> +#define READ_WRK_REG BIT(2)
> +
> +#define DVO_SIZE 0x18
Ditto.
> +#define DVO_TGEN_VWIDTH 0x28
> +#define DVO_TGEN_VPORCH 0x2c
> +#define DVO_TGEN_HPORCH 0x24
> +#define DVO_TGEN_HWIDTH 0x20
> +
> +#define DVO_BUF_SODI_HIGHT 0x230
> +#define DVO_BUF_SODI_LOW 0x234
> +#define DVO_BUF_DVFS_HIGHT 0x238
> +#define DVO_BUF_DVFS_LOW 0x23c
> +#define DVO_BUF_PREULTRA_HIGHT 0x240
> +#define DVO_BUF_PREULTRA_LOW 0x244
> +#define DVO_BUF_ULTRA_HIGHT 0x248
> +#define DVO_BUF_ULTRA_LOW 0x24c
> +#define DVO_BUF_URGENT_HIGHT 0x250
> +#define DVO_BUF_URGENT_LOW 0x254
> +#define DVO_DISP_BUF_MASK GENMASK(31 ,0)
GENMASK(31, 0)
Regards,
CK
> +
> +#define DVO_MATRIX_SET 0x140
> +#define DVO_CSC_EN BIT(0)
> +#define DVO_INT_MTX_SEL_MASK GENMASK(8, 4)
> +
> +#define DVO_YUV422_SET 0x170
> +#define DVO_YUV422_EN BIT(0)
> +#define DVO_CRYCB_MAP BIT(8)
> +
next prev parent reply other threads:[~2026-11-20 7:42 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 11:43 [PATCH v2 00/46] drm/mediatek: The Huge Restructuring and MT8196 support AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 01/46] drm/mediatek: Rename OVL format naming AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 02/46] drm/mediatek: Export OVL formats definitions and format conversion API AngeloGioacchino Del Regno
2026-08-28 8:52 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 03/46] drm/mediatek: Export OVL Blend function AngeloGioacchino Del Regno
2026-08-28 9:04 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 04/46] drm/mediatek: Move mtk_ddp_comp_type enumeration to mtk-mmsys.h AngeloGioacchino Del Regno
2026-08-28 9:15 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 05/46] drm/mediatek: Add missing component types in mtk_ddp_comp_type AngeloGioacchino Del Regno
2026-08-28 9:18 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 06/46] drm/mediatek: Rename all display component type to have DISP_ prefix AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 07/46] drm/mediatek: Use hashtable for components discovery and registration AngeloGioacchino Del Regno
2026-10-27 7:42 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 08/46] drm/mediatek: ddp_comp: Move internal component register in function AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 09/46] drm/mediatek: De-duplicate internal component checks AngeloGioacchino Del Regno
2026-10-27 7:54 ` CK Hu (胡俊光)
2026-11-09 9:47 ` Fei Shao
2026-07-14 11:43 ` [PATCH v2 10/46] drm/mediatek: Introduce and use path/comp definition structures AngeloGioacchino Del Regno
2026-10-28 7:04 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 11/46] drm/mediatek: Create new mtk_drm_legacy and move deprecated code AngeloGioacchino Del Regno
2026-10-28 8:23 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 12/46] dt-bindings: soc: mediatek: mutex: Allow #trigger-source-cells AngeloGioacchino Del Regno
2026-07-22 15:45 ` Rob Herring
2026-07-22 16:39 ` AngeloGioacchino Del Regno
2026-07-22 15:46 ` Rob Herring (Arm)
2026-10-28 8:33 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 13/46] dt-bindings: display: mediatek: Allow trigger-sources on relevant HW AngeloGioacchino Del Regno
2026-10-28 8:35 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 14/46] drm/mediatek: Add support for MuteX trigger-sources parsing AngeloGioacchino Del Regno
2026-10-29 6:52 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 15/46] drm/mediatek: ovl_adaptor: Add special MERGE component check AngeloGioacchino Del Regno
2026-11-03 8:04 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 16/46] drm/mediatek: mtk_hdmi_v2: Don't warn on RPM active during detach AngeloGioacchino Del Regno
2026-11-04 5:57 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 17/46] drm/mediatek: Add support for hardware multi-stage layers AngeloGioacchino Del Regno
2026-11-04 9:46 ` CK Hu (胡俊光)
2026-11-04 10:19 ` AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 18/46] drm/mediatek: mtk_crtc: Complete documentation for struct mtk_crtc AngeloGioacchino Del Regno
2026-11-05 2:29 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 19/46] drm/mediatek: mtk_crtc: Minimize spinlocked time in cmdq callback AngeloGioacchino Del Regno
2026-11-05 6:19 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 20/46] drm/mediatek: mtk_crtc: Dynamically find vblank/cfg component indices AngeloGioacchino Del Regno
2026-11-05 9:36 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 21/46] soc: mediatek: mtk-mutex: Add new functions to add/remove triggers AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 22/46] soc: mediatek: mtk-mmsys: Migrate to new Multimedia DDP HW indexing AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 23/46] drm/mediatek: Fully migrate to new Display Controller " AngeloGioacchino Del Regno
2026-11-06 8:36 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 24/46] drm/mediatek: mtk_dpi: Pass parameters with new mtk_dpi_sync structure AngeloGioacchino Del Regno
2026-11-12 7:00 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 25/46] drm/mediatek: mtk_dpi: Fully separate HW setup from common code AngeloGioacchino Del Regno
2026-11-16 0:41 ` CK Hu (胡俊光)
2026-11-16 3:26 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 26/46] drm/mediatek: Create new mtk_dpi_common lib and move mtk_dpi code AngeloGioacchino Del Regno
2026-11-19 7:00 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 27/46] dt-bindings: display: mediatek: Introduce Digital Video Output HW AngeloGioacchino Del Regno
2026-07-22 16:40 ` Rob Herring
2026-11-20 2:17 ` CK Hu (胡俊光)
2026-07-14 11:43 ` [PATCH v2 28/46] drm/mediatek: Add support for MediaTek Digital Video Output (DVO) AngeloGioacchino Del Regno
2026-11-20 7:42 ` CK Hu (胡俊光) [this message]
2026-07-14 11:43 ` [PATCH v2 29/46] drm/mediatek: Pass mtk_ddp_comp in clk and config callbacks AngeloGioacchino Del Regno
2026-07-14 11:43 ` [PATCH v2 30/46] dt-bindings: display: mediatek: Introduce MT8196 Layer Blender AngeloGioacchino Del Regno
2026-07-22 16:42 ` Rob Herring
2026-07-14 11:43 ` [PATCH v2 31/46] drm/mediatek: Add support for Display Layer Blender component AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 32/46] dt-bindings: display: mediatek: Introduce MT8196 extended DMA Engine AngeloGioacchino Del Regno
2026-07-22 16:43 ` Rob Herring
2026-07-14 11:44 ` [PATCH v2 33/46] drm/mediatek: Add support for Display Controller exDMA component AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 34/46] dt-bindings: display: mediatek: Introduce MT8196 Output Processor AngeloGioacchino Del Regno
2026-07-22 16:45 ` Rob Herring
2026-07-14 11:44 ` [PATCH v2 35/46] drm/mediatek: Add support for Display Output Processor component AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 36/46] drm/mediatek: mtk_crtc: Dynamically find suitable CRTC DMA device AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 37/46] drm/mediatek: Prepare path builder for multi-controller architecture AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 38/46] drm/mediatek: Enable bring-up of multi-controller CRTC paths AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 39/46] drm/mediatek: Introduce MediaTek Asynchronous DirectLink Controller AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 40/46] drm/mediatek: Support registering disp controller device subnodes AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 41/46] soc: mediatek: mtk-mmsys: Populate multimedia subsystem subdevices AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 42/46] dt-bindings: display: mediatek: Introduce MT8196 2D Sharpness Processor AngeloGioacchino Del Regno
2026-07-28 13:40 ` Rob Herring
2026-07-28 13:49 ` AngeloGioacchino Del Regno
2026-08-04 18:19 ` Rob Herring
2026-08-05 3:48 ` Chen-Yu Tsai
2026-07-14 11:44 ` [PATCH v2 43/46] drm/mediatek: Add Two-Dimension Sharpness Processor (TDSHP) driver AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 44/46] dt-bindings: display: mediatek: Introduce MT8196 Image Resizer AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 45/46] drm/mediatek: Add support for Display Image Resizer (Scaler) AngeloGioacchino Del Regno
2026-07-14 11:44 ` [PATCH v2 46/46] drm/mediatek: mtk_drm_drv: Fail init only if all paths are invalid AngeloGioacchino Del Regno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7b4c2bf61a88b533e504603c4dcbc79c1de6f06.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=Jason-JH.Lin@mediatek.com \
--cc=Justin.Yeh@mediatek.com \
--cc=airlied@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthias.bgg@gmail.com \
--cc=mripard@kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®