[GIT PULL] mediatek drm next - 20250515

2025-05-14 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Prepare for support MT8195/88 HDMIv2 and DDCv2 2. DPI: Cleanups and add support for more formats 3. Cleanups and sanitization 4. Replace custom compare_dev with component_compare_of Regards, Chun-Kuang. The following changes since commit 0af2f6be1b4281385b618

Re: [PATCH v1 0/5] MediaTek DPI: Cleanups and add support for more formats

2025-04-26 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年4月9日 週三 下午9:13寫道: > > This series adds support to configure the MediaTek DPI IP to output > more formats, such as YUV422 8/10/12 bits, YUV444 8/10 bits, BGR 8bits, > and RGB 10 bits, and also performs some cleanups that improve the code > readability

Re: [PATCH v9 15/23] drm/mediatek: mtk_hdmi: Improve mtk_hdmi_get_all_clk() flexibility

2025-04-21 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年4月15日 週二 下午6:44寫道: > > In preparation for splitting common bits of this driver and for > introducing a new version of the MediaTek HDMI Encoder IP, improve > the flexibility of function mtk_hdmi_get_all_clk() by adding a > pointer to the clock names a

[GIT PULL] mediatek drm next for 6.15

2025-03-12 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. HDMI fixup and refinement 2. Move to devm_platform_ioremap_resource() usage 3. Add MT8188 dsc compatible 4. Fix config_updating flag never false when no mbox channel 5. dp: drm_err => dev_err in HPD path to avoid NULL ptr 6. Add dpi power-domains example 7. Add

Re: [GIT PULL] mediatek drm next for 6.15

2025-03-12 Thread Chun-Kuang Hu
.c:630:1: > warning: label ‘update_config_out’ defined but not used > [-Wunused-label] > 630 | update_config_out: > | ^ > > Please fix and resend, Sorry not find this. I've fixed this and resend pull request. Regards, Chun-Kuang. > Thanks, > Dave

[GIT PULL v2] mediatek drm next for 6.15

2025-03-12 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. HDMI fixup and refinement 2. Move to devm_platform_ioremap_resource() usage 3. Add MT8188 dsc compatible 4. Fix config_updating flag never false when no mbox channel 5. dp: drm_err => dev_err in HPD path to avoid NULL ptr 6. Add dpi power-domains example 7. Add

Re: [PATCH RESEND] drm/mediatek: dsi: fix error codes in mtk_dsi_host_transfer()

2025-03-03 Thread Chun-Kuang Hu
Hi, Dan: Dan Carpenter 於 2025年1月8日 週三 下午5:36寫道: > > There is a type bug because the return statement: > > return ret < 0 ? ret : recv_cnt; > > The issue is that ret is an int, recv_cnt is a u32 and the function > returns ssize_t, which is a signed long. The way that the type promotion >

Re: [PATCH v7 1/6] dt-bindings: display: mediatek: dpi: add power-domains example

2025-03-03 Thread Chun-Kuang Hu
Hi, Amergnat: 於 2025年1月10日 週五 下午9:31寫道: > > From: Fabien Parent > > DPI is part of the display / multimedia block in MediaTek SoCs, and > always have a power-domain (at least in the upstream device-trees). > Add the power-domains property to the binding example. Applied to mediatek-drm-next [1]

Re: [PATCH v7 3/6] drm/mediatek: add MT8365 SoC support

2025-03-03 Thread Chun-Kuang Hu
Hi, Amergnat: 於 2025年1月10日 週五 下午9:31寫道: > > From: Fabien Parent > > Add DRM support for MT8365 SoC. > > Signed-off-by: Fabien Parent > Reviewed-by: AngeloGioacchino Del Regno > Applied to mediatek-drm-next [1], thanks. [1] https://web.git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/li

Re: [PATCH] drm/mediatek: dp: drm_err => dev_err in HPD path to avoid NULL ptr

2025-03-03 Thread Chun-Kuang Hu
Hi, Douglas: Douglas Anderson 於 2025年1月17日 週五 上午1:43寫道: > > The function mtk_dp_wait_hpd_asserted() may be called before the > `mtk_dp->drm_dev` pointer is assigned in mtk_dp_bridge_attach(). > Specifically it can be called via this callpath: > - mtk_edp_wait_hpd_asserted > - [panel probe] > -

Re: [PATCH] drm/mediatek: Fix config_updating flag never false when no mbox channel

2025-03-03 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH Lin 於 2025年2月24日 週一 下午1:13寫道: > > When CONFIG_MTK_CMDQ is enabled, if the display is controlled by the CPU > while other hardware is controlled by the GCE, the display will encounter > a mbox request channel failure. > However, it will still enter the CONFIG_MTK_CMDQ statement

Re: [PATCH] dt-bindings: display: mediatek: dsc: Add MT8188 compatible

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月18日 週二 下午5:04寫道: > > Add compatible for Display Stream Compression (DSC) IP found in > the display controller of the MT8188 SoC. > > This IP is fully compatible with the one found on MT8195. Applied to mediatek-drm-next [1], thanks. [1] https://w

Re: [PATCH 04/12] drm/mediatek: move to devm_platform_ioremap_resource() usage

2025-03-02 Thread Chun-Kuang Hu
inux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. > > Cc: Chun-Kuang Hu > Cc: Philipp Zabel > Reviewed-by: Maxime Ripard > Reviewed-by: CK Hu > Signed-off-by: Anusha Srivatsa > --- > drivers/gpu/drm/mediatek/mtk_disp_color.c | 4 +--- >

Re: [PATCH v7 10/43] drm/mediatek: Add support for MT8195 Digital Parallel Interface

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Add support for the DPI block found in the MT8195 and MT8188 SoCs. > Inside of the SoC, this block is directly connected to the HDMI IP. After fix conflicts, applied to mediatek-drm-next [1], thanks. [1] https://web.git.kern

Re: [PATCH v7 09/43] drm/mediatek: mtk_dpi: Explicitly manage TVD clock in power on/off

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > In preparation for adding support for MT8195's HDMI reserved > DPI, add calls to clk_prepare_enable() / clk_disable_unprepare() > for the TVD clock: in this particular case, the aforementioned > clock is not (and cannot be) par

Re: [PATCH v7 08/43] drm/mediatek: mtk_dpi: Support AFIFO 1T1P output and conversion

2025-03-02 Thread Chun-Kuang Hu
Chun-Kuang Hu 於 2025年3月2日 週日 下午7:29寫道: > > Hi, Angelo: > > AngeloGioacchino Del Regno 於 > 2025年2月17日 週一 下午11:49寫道: > > > > On some SoCs, like MT8195 and MT8188, the DPI's FIFO controller > > (afifo) supports outputting either one or two pixels per round >

Re: [PATCH v7 08/43] drm/mediatek: mtk_dpi: Support AFIFO 1T1P output and conversion

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > On some SoCs, like MT8195 and MT8188, the DPI's FIFO controller > (afifo) supports outputting either one or two pixels per round > regardless of the input being 1T1P or 1T2P. > > Add a `output_1pixel` member to struct mtk_dpi_c

Re: [PATCH v7 07/43] drm/mediatek: mtk_dpi: Add support for DPI input clock from HDMI

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > On some SoCs, like MT8195 and MT8188, the DPI instance that is > reserved to the HDMI Transmitter uses a different clock topology. > > In this case, the DPI is clocked by the HDMI IP, and this outputs > its clock to the MM inpu

Re: [PATCH v7 06/43] drm/mediatek: mtk_dpi: Move the input_2p_en bit to platform data

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > In preparation for adding support for MT8195's HDMI reserved DPI > instance, move the input_2p_en bit for DP_INTF to platform data. > > While at it, remove the input_2pixel member from platform data as > having this bit implies

Re: [PATCH v7 04/43] drm/mediatek: mtk_dpi: Move pixel clock setting flow to function

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > In preparation for adding support for the DPI IP found in MT8195 > and in MT8188 used for HDMI, move the code flow for calculation > and setting of the DPI pixel clock to a separate function called > mtk_dpi_set_pixel_clk(). >

Re: [PATCH v7 05/43] drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > In preparation for adding support for newer DPI instances which > do support direct-pin but do not have any H_FRE_CON register, > like the one found in MT8195 and MT8188, add a branch to check > if the reg_h_fre_con variable wa

Re: [PATCH v7 03/43] drm/mediatek: mtk_dpi: Use an array for pixclk factor calculation

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Setting the TVD PLL clock requires to multiply the target pixel > clock by a specific constant factor to achieve the target PLL > frequency, and this is done to reduce jitter to acceptable levels. > > On all MediaTek SoCs, the

Re: [PATCH v7 03/43] drm/mediatek: mtk_dpi: Use an array for pixclk factor calculation

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Setting the TVD PLL clock requires to multiply the target pixel > clock by a specific constant factor to achieve the target PLL > frequency, and this is done to reduce jitter to acceptable levels. > > On all MediaTek SoCs, the

Re: [PATCH v7 02/43] drm/mediatek: mtk_dpi: Add support for Pattern Generator in debugfs

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > This IP includes a Pattern Generator which is useful for debugging > and testing purposes: add the relevant register and bits to the > mtk_dpi_regs.h header, and implement support for it in mtk_dpi. > > Adding this required to

Re: [PATCH v7 01/43] dt-bindings: display: mediatek: dpi: Add MT8195 and MT8188 compat

2025-03-02 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Add compatibles for the Digital Parallel Interface (DPI) block > found in the MT8195 and MT8188 SoCs: inside of the chip, this one > is directly connected to the HDMI block. Applied to mediatek-drm-next [1], thanks. [1] http

Re: [PATCH v7 27/43] drm/mediatek: mtk_hdmi: Remove unused members of struct mtk_hdmi

2025-02-20 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:50寫道: > > The hdmi_colorspace csp member of struct mtk_hdmi is initialized > once but then it's never used at all. > Remove said member and the only assignment to it as a cleanup. > > Also remove the ibias, ibias_up, min_clock, max_clock

Re: [PATCH v7 31/43] drm/mediatek: mtk_hdmi: Remove goto in mtk_hdmi_clk_enable_audio()

2025-02-20 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:50寫道: > > If the clk_prepare_enable() call for the SPDIF clock fails, just > disable and unprepare the clock in the error check branch and > return immediately instead of jumping to the end with a goto, > slightly reducing code size. > >

Re: [PATCH v7 33/43] drm/mediatek: mtk_hdmi: Cleanup function mtk_hdmi_resume()

2025-02-20 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:50寫道: > > Remove the error print in case of mtk_hdmi_clk_enable_audio() > failures: since the APIs will already print on their own, having > one in there is redundant. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.o

Re: [PATCH v7 32/43] drm/mediatek: mtk_hdmi: Remove driver bound to HDMI print

2025-02-20 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:50寫道: > > Remove the "driver bound to HDMI" print to avoid useless spam in > the kernel log, as registered and bound drivers can be debugged > through debugfs. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/s

Re: [PATCH v7 29/43] drm/mediatek: mtk_hdmi: Use devm managed version of drm_bridge_add

2025-02-20 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:50寫道: > > Simplify the probe/remove functions by using devm_drm_bridge_add() > as now there is no more need to manually remove the bridge. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/c

Re: [PATCH v7 30/43] drm/mediatek: mtk_hdmi: Remove ifdef for CONFIG_PM_SLEEP

2025-02-20 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:50寫道: > > Since the SIMPLE_DEV_PM_OPS macro and the pm pointer are anyway > defined when CONFIG_PM_SLEEP is not set, remove the ifdef for it > and indicate that the mtk_hdmi_{remove,suspend} functions may be > unused (as they are, in cas

Re: [PATCH v7 16/43] drm/mediatek: mtk_hdmi: Compress of_device_id array entries

2025-02-19 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Compress the entries found in the of_device_id array to improve > readability of this file and to make that consistent with other > kernel drivers. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm

Re: [PATCH v7 24/43] drm/mediatek: mtk_hdmi: Move vendor/product strings to drm_bridge

2025-02-19 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Move the vendor and product strings to the appropriate entries > of struct drm_bridge and use that in mtk_hdmi_setup_spd_infoframe > instead of having the same as function parameters. > > While at it, also beautify the strings,

Re: [PATCH v7 19/43] drm/mediatek: mtk_hdmi: Fix typo for aud_sampe_size member

2025-02-19 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > Rename member aud_sampe_size of struct hdmi_audio_param to > aud_sample_size to fix a typo and enhance readability. > > This commit brings no functional changes. Applied to mediatek-drm-next [1], thanks. [1] https://git.kern

Re: [PATCH v7 17/43] drm/mediatek: mtk_hdmi: Unregister audio platform device on failure

2025-02-19 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2025年2月17日 週一 下午11:49寫道: > > The probe function of this driver may fail after registering the > audio platform device: in that case, the state is not getting > cleaned up, leaving this device registered. > > Adding up to the mix, should the probe function

Re: [PATCH v1 1/3] dt-bindings: display: mediatek: Add compatibles for MT8188 MDP3

2025-02-19 Thread Chun-Kuang Hu
AngeloGioacchino Del Regno 於 2024年12月18日 週三 下午6:53寫道: > > Add compatible strings for the AAL, COLOR, MERGE and PADDING > hardware components found in MediaTek's MT8188 SoC. > > This hardware is compatible with MT8195. Acked-by: Chun-Kuang Hu > > Signed-off-by:

[GIT PULL] mediatek drm next for 6.14

2025-01-04 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. dp: Add sdp path reset 2. dp: Support flexible length of DP calibration data Regards, Chun-Kuang. The following changes since commit 40384c840ea1944d7c5a392e8975ed088ecf0b37: Linux 6.13-rc1 (2024-12-01 14:28:56 -0800) are available in the Git repository

[GIT PULL] mediatek drm fixes 20250104

2025-01-04 Thread Chun-Kuang Hu
14. Initialize pointer in mtk_drm_of_ddp_path_build_one() AngeloGioacchino Del Regno (2): drm/mediatek: mtk_dsi: Add registers to pdata to fix MT8186/MT8188 drm/mediatek: Initialize pointer in mtk_drm_of_ddp_path_build_one() Arnd Bergmann (1): drm/mediatek: stop se

Re: [PATCH v3 1/1] drm/mediatek: Add return value check when reading DPCD

2025-01-02 Thread Chun-Kuang Hu
Hi, Liankun: Liankun Yang 於 2024年12月18日 週三 下午7:35寫道: > > Returns the number of bytes transferred (1) on success. > Check the return value to confirm that AUX communication is successful. > > Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") > > Signed-off-by: Liankun Ya

Re: [PATCH v2] drm/mediatek: dp: Support flexible length of DP calibration data

2025-01-02 Thread Chun-Kuang Hu
Hi, Fei: Fei Shao 於 2024年12月4日 週三 下午10:26寫道: > > The DP calibration data is stored in nvmem cells, and the data layout is > described in the `mtk_dp_efuse_fmt` arrays for each platform. > > There is no guarantee that the data is always a 4-length u32 cell array. > For example, MT8188 has a data l

Re: [PATCH] drm/mediatek: mtk_dsi: Add registers to pdata to fix MT8186/MT8188

2024-12-30 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2024年12月19日 週四 下午7:27寫道: > > Registers DSI_VM_CMD and DSI_SHADOW_DEBUG start at different > addresses in both MT8186 and MT8188 compared to the older IPs. > > Add two members in struct mtk_dsi_driver_data to specify the > offsets for these two registers on

Re: [PATCH v2] dt-bindings: display: mediatek: dp: Reference common DAI properties

2024-12-30 Thread Chun-Kuang Hu
Hi, Fei: Fei Shao 於 2024年11月5日 週二 下午5:02寫道: > > The MediaTek DP hardware supports audio and exposes a DAI, so the > '#sound-dai-cells' property is needed for describing the DAI links. > > Reference the dai-common.yaml schema to allow '#sound-dai-cells' to be > used, and filter out non-DP compatib

Re: [PATCH v2 2/3] drm/mediatek: Fix mode valid issue for dp

2024-12-30 Thread Chun-Kuang Hu
Hi, Liankun: Liankun Yang 於 2024年10月25日 週五 下午4:31寫道: > > Fix dp mode valid issue to avoid abnormal display of limit state. > > After DP passes link training, it can express the lane count of the > current link status is good. Calculate the maximum bandwidth supported > by DP using the current lan

Re: [PATCH v2 1/3] drm/mediatek: Fix YCbCr422 color format issue for DP

2024-12-30 Thread Chun-Kuang Hu
Hi, Liankun: Liankun Yang 於 2024年10月25日 週五 下午4:32寫道: > > Setting up misc0 for Pixel Encoding Format. > > According to the definition of YCbCr in spec 1.2a Table 2-96, > 0x1 << 1 should be written to the register. > > Use switch case to distinguish RGB, YCbCr422, > and unsupported color formats.

[PATCH] drm/mediatek: Remove unneeded semicolon

2024-12-30 Thread Chun-Kuang Hu
build-all/202412022048.ky2zhxz4-...@intel.com/ Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 9a8ef8558da9..9d8286424e98 10

Re: [PATCH] drm/mediatek: stop selecting foreign drivers

2024-12-25 Thread Chun-Kuang Hu
Hi, Arnd: Arnd Bergmann 於 2024年12月18日 週三 下午4:58寫道: > > From: Arnd Bergmann > > The PHY portion of the mediatek hdmi driver was originally part of > the driver it self and later split out into drivers/phy, which a > 'select' to keep the prior behavior. > > However, this leads to build failures wh

Re: [PATCH v4] drm/mediatek: Move mtk_crtc_finish_page_flip() to ddp_cmdq_cb()

2024-12-25 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin 於 2024年12月11日 週三 上午11:47寫道: > > mtk_crtc_finish_page_flip() is used to notify userspace that a > page flip has been completed, allowing userspace to free the frame > buffer of the last frame and commit the next frame. > > In MediaTek's hardware design for configuring displ

Re: [PATCH V2] drm/mediatek: Set private->all_drm_private[i]->drm to NULL if mtk_drm_bind returns err

2024-12-25 Thread Chun-Kuang Hu
Hi, Guoqing: Guoqing Jiang 於 2024年12月23日 週一 上午10:32寫道: > > The pointer need to be set to NULL, otherwise KASAN complains about > use-after-free. Because in mtk_drm_bind, all private's drm are set > as follows. > > private->all_drm_private[i]->drm = drm; > > And drm will be released by drm_dev_put

Re: [PATCH v4 1/1] drm/mediatek: dp: Add sdp path reset

2024-12-25 Thread Chun-Kuang Hu
Hi, Liankun: Liankun Yang 於 2024年11月28日 週四 上午10:37寫道: > > When using type-c to type-c to connect to the monitor, > the sound plays normally. If you unplug the type-c and > connect the type-c to hdmi dongle to the monitor, there will be noise. > > By capturing the audio data, it is found that > th

Re: [PATCH] drm/mediatek: Add support for 180-degree rotation in the display driver

2024-12-25 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin 於 2024年11月18日 週一 上午10:51寫道: > > mediatek-drm driver reported the capability of 180-degree rotation by > adding `DRM_MODE_ROTATE_180` to the plane property, as flip-x combined > with flip-y equals a 180-degree rotation. However, we did not handle > the rotation property in

Re: [PATCH] drm/mediatek: Initialize pointer in mtk_drm_of_ddp_path_build_one()

2024-12-25 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2024年11月12日 週二 下午6:50寫道: > > The struct device_node *next pointer is not initialized, and it is > used in an error path in which it may have never been modified by > function mtk_drm_of_get_ddp_ep_cid(). > > Since the error path is relying on that pointer

Re: [PATCH v3 2/4] dt-bindings: display: mediatek: ovl: Modify rules for MT8195/MT8188

2024-12-24 Thread Chun-Kuang Hu
Jason-JH.Lin 於 2024年12月20日 週五 上午2:15寫道: > > From: Hsiao Chien Sung > > Modify rules for both MT8195 and MT8188. > Hardware capabilities include color formats and AFBC are > changed since MT8195, stop using the settings of MT8183. Acked-by: Chun-Kuang Hu > > Acked-by:

Re: [PATCH v3 1/4] dt-bindings: display: mediatek: ovl: Add compatible strings for MT8188 MDP3

2024-12-24 Thread Chun-Kuang Hu
> > > > Signed-off-by: Jason-JH.Lin > > Suggested-by: AngeloGioacchino Del Regno > > > > Reviewed-by: AngeloGioacchino Del Regno > > > Waiting for an ack to take everything through the mediatek tree :-) Acked-by: Chun-Kuang Hu > > Cheers, > Angelo >

[PATCH] Revert "drm/mediatek: Switch to for_each_child_of_node_scoped()"

2024-12-23 Thread Chun-Kuang Hu
-by: Sasha Levin Closes: https://lore.kernel.org/lkml/Z0lNHdwQ3rODHQ2c@sashalap/T/#mfaa6343cfd4d59aae5912b095c0693c0553e746c Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/dr

[PATCH] Revert "drm/mediatek: dsi: Correct calculation formula of PHY Timing"

2024-12-11 Thread Chun-Kuang Hu
Ziller Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_dsi.c | 31 +++--- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 33ceeb8d6925..3907863579b9 100644 --- a

[GIT PULL] mediatek drm next for 6.13

2024-11-04 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Add support for OF graphs 2. Fix child node refcount handling and use scoped Regards, Chun-Kuang. The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc: Linux 6.12-rc1 (2024-09-29 15:06:19 -0700) are available in the Git repository

Re: [PATCH 0/2] drm/mediatek: Fix child node refcount handling and use scoped macro

2024-11-04 Thread Chun-Kuang Hu
Hi, Javier: Javier Carrasco 於 2024年10月12日 週六 上午3:22寫道: > > This series fixes a wrong handling of the child node within the > for_each_child_of_node() by adding the missing call to of_node_put() to > make it compatible with stable kernels that don't provide the scoped > variant of the macro, which

[GIT PULL] mediatek drm fixes 20241028

2024-10-28 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Fix degradation problem of alpha blending 2. Fix color format MACROs in OVL 3. Fix get efuse issue for MT8188 DPTX 4. Fix potential NULL dereference in mtk_crtc_destroy() 5. Correct dpi power-domains property 6. Add split subschema property constraints Regard

Re: [PATCH v5] dt-bindings: display: mediatek: split: add subschema property constraints

2024-10-23 Thread Chun-Kuang Hu
Hi, Moudy: Moudy Ho 於 2024年10月7日 週一 上午10:28寫道: > > The display node in mt8195.dtsi was triggering a CHECK_DTBS error due > to an excessively long 'clocks' property: > display@14f06000: clocks: [[31, 14], [31, 43], [31, 44]] is too long > > To resolve this issue, the constraints for 'clocks' and

Re: [PATCH] dt-bindings: display: mediatek: dpi: Update device list with power-domains

2024-10-23 Thread Chun-Kuang Hu
Hi, Fei: Fei Shao 於 2024年10月19日 週六 下午1:30寫道: > > There are two kinds of MediaTek DPI devices in the tree: the ones with a > power domain and those without (or missing). The former are the majority > and are more common in newer DTs. Only three older DTs fall into the > latter category: MT2701, MT

Re: [PATCH v6 4/4] dt-bindings: display: mediatek: dpi: correct power-domains property

2024-10-23 Thread Chun-Kuang Hu
Hi, Macpaul: Macpaul Lin 於 2024年10月3日 週四 上午11:09寫道: > > The MediaTek DPI module is typically associated with one of the > following multimedia power domains: > - POWER_DOMAIN_DISPLAY > - POWER_DOMAIN_VDOSYS > - POWER_DOMAIN_MM > The specific power domain used varies depending on the SoC design

Re: [PATCH] drm/mediatek: Fix potential NULL dereference in mtk_crtc_destroy()

2024-10-23 Thread Chun-Kuang Hu
Hi, Dan: Dan Carpenter 於 2024年9月12日 週四 下午4:45寫道: > > In mtk_crtc_create(), if the call to mbox_request_channel() fails then we > set the "mtk_crtc->cmdq_client.chan" pointer to NULL. In that situation, > we do not call cmdq_pkt_create(). > > During the cleanup, we need to check if the "mtk_crtc-

Re: [PATCH v5 1/1] drm/mediatek: Fix get efuse issue for MT8188 DPTX

2024-10-23 Thread Chun-Kuang Hu
Hi, Liankun: Liankun Yang 於 2024年9月23日 週一 下午9:25寫道: > > Update efuse data for MT8188 displayport. > > The DP monitor can not display when DUT connected to USB-c to DP dongle. > Analysis view is invalid DP efuse data. Applied to mediatek-drm-fixes [1], thanks. [1] https://git.kernel.org/pub/scm

Re: [PATCH v3] drm/mediatek: Fix color format MACROs in OVL

2024-10-22 Thread Chun-Kuang Hu
Hi, Hsin-te: Hsin-Te Yuan 於 2024年10月16日 週三 下午10:17寫道: > > In commit 9f428b95ac89 ("drm/mediatek: Add new color format MACROs in > OVL"), some new color formats are defined in the MACROs to make the > switch statement more concise. That commit was intended to be a no-op > cleanup. However, there a

Re: [PATCH v11 0/5] Fix degradation problem of alpha blending series

2024-10-22 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin 於 2024年10月9日 週三 上午11:46寫道: > > Some SoCs do not support the ignore_pixl_alpha flag, which breaks the > XRGB format. Some SoCs do not support pre-multiplied pixel formats > and extending configuration of OVL pre-multiplied color formats, > such as MT8173. > > Fix the So

Re: [PATCH v13 0/3] drm/mediatek: Add support for OF graphs

2024-10-21 Thread Chun-Kuang Hu
Hi, Angelo: For patch [1/3] and patch [3/3], applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. AngeloGioacchino Del Regno 於 2024年10月17日 週四 下午6:38寫道: > > Changes in v13: > - Added

Re: [PATCH v8 0/3] Fix degradation problem of alpha blending series

2024-10-03 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin 於 2024年9月29日 週日 上午12:16寫道: > > From: Jason-jh Lin > > Some SoCs not support pre-multiplied pixel formats and extending > configuration of OVL pre-multiplied color formats, such as MT8173. > > Fix the SoC degradation problem by this sreies. Applied to mediatek-drm-fixes [

[PATCH v4 3/3] soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function

2024-09-01 Thread Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 22 -- include/linux/soc/mediatek/mtk-cmdq.h | 13 - 2 files changed, 35

[PATCH v4 1/3] media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()

2024-09-01 Thread Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu --- drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 3 ++- drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 ++ drivers/media/platform

[PATCH v4 2/3] media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-09-01 Thread Chun-Kuang Hu
Use cmdq_pkt_create() and cmdq_pkt_destroy() common function instead of implementing mdp3 version. Signed-off-by: Chun-Kuang Hu --- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 46 ++- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.h| 1 + 2 files changed, 6 insertions(+), 41

[PATCH v4 0/3] Remove cl in struct cmdq_pkt

2024-09-01 Thread Chun-Kuang Hu
b/scm/linux/kernel/git/chunkuang.hu/linux.git/commit/?h=mediatek-cmdq8&id=a1b2f7a7488285975c1f439086f1c4cc51a13bb9 Chun-Kuang Hu (3): media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize() media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy() soc:

[GIT PULL] mediatek drm next for 6.12

2024-09-01 Thread Chun-Kuang Hu
tion flags in mtk_crtc_ddp_config() 8. Use spin_lock_irqsave() for CRTC event lock 9. Add power domain binding to the mediatek DPI controller AngeloGioacchino Del Regno (1): drm/mediatek: Declare Z Position for all planes Chun-K

Re: [PATCH v4 1/3] dt-bindings: display: mediatek: dpi: Add power domains

2024-08-30 Thread Chun-Kuang Hu
Hi, Rohit: Rohit Agarwal 於 2024年8月30日 週五 下午4:46寫道: > > Add power domain binding to the mediatek DPI controller > for MT8186. > Also, add power domain binding for other SoCs like > MT6795 and MT8173 that already had power domain property. For this patch, applied to mediatek-drm-next [1], thanks.

Re: [PATCH] drm/mediatek: Use spin_lock_irqsave() for CRTC event lock

2024-08-29 Thread Chun-Kuang Hu
Hi, Fei: Fei Shao 於 2024年8月28日 週三 下午6:16寫道: > > Use the state-aware spin_lock_irqsave() and spin_unlock_irqrestore() > to avoid unconditionally re-enabling the local interrupts. Applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git

Re: [PATCH v3 0/2] Fix missing configuration flags in mtk_crtc_ddp_config

2024-08-29 Thread Chun-Kuang Hu
Hi, Jason: I squash this series into one patch and apply to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. Jason-JH.Lin via B4 Relay 於 2024年8月27日 週二 下午10:56寫道: > > Signed-off-by: Jason-JH.

Re: [PATCH v8] drm/mediatek: dsi: Add dsi per-frame lp code for mt8188

2024-08-29 Thread Chun-Kuang Hu
Hi, Shuijing: Shuijing Li 於 2024年8月26日 週一 下午2:07寫道: > > Adding the per-frame lp function of mt8188, which can keep HFP in HS and > reduce the time required for each line to enter and exit low power. > Per Frame LP: > |<--One Active Frame>| > --___

Re: [PATCH] drm: mediatek: Drop unnecessary check for property presence

2024-08-22 Thread Chun-Kuang Hu
Hi, Rob: Rob Herring (Arm) 於 2024年8月1日 週四 上午4:14寫道: > > of_property_read_u32() returns -EINVAL if a property is not present, so > the preceeding check for presence with of_find_property() can be > dropped. Really, what the errno is shouldn't matter. Either the property > can be read and used or i

Re: [PATCH] drm/mediatek: Declare Z Position for all planes

2024-08-22 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2024年7月18日 週四 下午4:25寫道: > > MediaTek SoCs support multiple planes, one of which is the primary > and all the others are overlays (and CURSOR is the last overlay). > > In all currently supported SoCs, the Z order of the overlays can't > be changed with any

Re: [PATCH v2] drm/mediatek: Fix missing configuration flags in mtk_crtc_ddp_config()

2024-08-22 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin via B4 Relay 於 2024年8月19日 週一 下午11:26寫道: > > From: "Jason-JH.Lin" > > In mtk_crtc_ddp_config(), mtk_crtc will use some configuration flags to > generate instructions to cmdq_handle, such as: > state->pending_config > mtk_crtc->pending_planes > plane_state->pending.co

Re: [PATCH] drm/mediatek: Fix missing configuration flags in mtk_crtc_ddp_config()

2024-08-15 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin 於 2024年7月3日 週三 下午6:33寫道: > > In mtk_crtc_ddp_config(), mtk_crtc will use some configuration flags to > generate instructions to cmdq_handle, such as: > state->pending_config > mtk_crtc->pending_planes > plane_state->pending.config > mtk_crtc->pending_async_planes >

Re: [PATCH 0/3] drm/mediatek: fixes for ovl_adaptor

2024-08-15 Thread Chun-Kuang Hu
Hi, Javier: Javier Carrasco 於 2024年6月25日 週二 上午12:44寫道: > > The main fix is a possible memory leak on an early exit in the > for_each_child_of_node() loop. That fix has been divided into a patch > that can be backported (a simple of_node_put()), and another one that > uses the scoped variant of th

[PATCH v3 5/5] soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function

2024-08-10 Thread Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 22 -- include/linux/soc/mediatek/mtk-cmdq.h | 13 - 2 files changed, 35

[PATCH v3 4/5] media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-08-10 Thread Chun-Kuang Hu
Use cmdq_pkt_create() and cmdq_pkt_destroy() common function instead of implementing mdp3 version. Signed-off-by: Chun-Kuang Hu --- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c| 45 ++- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/drivers/media/platform

[PATCH v3 3/5] media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()

2024-08-10 Thread Chun-Kuang Hu
In order to have fine-grained control, use cmdq_pkt_eoc() and cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize(). Signed-off-by: Chun-Kuang Hu --- drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 3 ++- drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 ++ drivers/media/platform

[PATCH v3 2/5] drm/mediatek: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-08-10 Thread Chun-Kuang Hu
Use cmdq_pkt_create() and cmdq_pkt_destroy() common function instead of implementing drm version. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_crtc.c | 46 +++-- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH v3 1/5] drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize()

2024-08-10 Thread Chun-Kuang Hu
cmdq_pkt_finalize() to cmdq_pkt_eoc() to prevent append redundant nop command. Signed-off-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_crtc.c b/drivers/gpu/drm/mediatek/mtk_crtc.c index

[PATCH v3 0/5] Remove cl in struct cmdq_pkt

2024-08-10 Thread Chun-Kuang Hu
q8&id=a1b2f7a7488285975c1f439086f1c4cc51a13bb9 Chun-Kuang Hu (5): drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize() drm/mediatek: Use cmdq_pkt_create() and cmdq_pkt_destroy() media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize() media: platform: mtk-mdp3: Use cmdq_pkt_cre

[GIT PULL] mediatek drm fixes 20240805

2024-08-10 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Set sensible cursor width/height values to fix crash Regards, Chun-Kuang. The following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b: Linux 6.11-rc1 (2024-07-28 14:19:55 -0700) are available in the Git repository at: https://git.kerne

Re: [PATCH v4 0/5] Support alpha blending in MTK display driver

2024-07-31 Thread Chun-Kuang Hu
Hi, Shawn: Hsiao Chien Sung via B4 Relay 於 2024年7月17日 週三 下午1:24寫道: > > Support "Pre-multiplied" and "None" blend mode on MediaTek's chips by > adding correct blend mode property when the planes init. > Before this patch, only the "Coverage" mode (default) is supported. For the whole series, appl

[GIT PULL] mediatek drm next for 6.11

2024-06-28 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Convert to platform remove callback returning void 2. Drop chain_mode_fixup call in mode_valid() 3. Fixes the errors of MediaTek display driver found by IGT. 4. Add display support for the MT8365-EVK board 5. Fix bit depth overwritten for mtk_ovl_set bit_depth

Re: [PATCH RESEND v5] drm/mediatek: dpi/dsi: fix possible_crtcs calculation

2024-06-28 Thread Chun-Kuang Hu
Hi, Michael: Michael Walle 於 2024年6月6日 週四 下午5:22寫道: > > mtk_find_possible_crtcs() assumes that the main path will always have > the CRTC with id 0, the ext id 1 and the third id 2. This is only true > if the paths are all available. But paths are optional (see also > comment in mtk_drm_kms_init()

Re: [PATCH v4 11/15] drm/mediatek: dsi: Improves the DSI lane setup robustness

2024-06-27 Thread Chun-Kuang Hu
Hi, Shuijing: Please help to review this patch. Regards, Chun-Kuang. Alexandre Mergnat 於 2024年5月23日 週四 下午8:49寫道: > > Currently, mtk_dsi_lane_ready (which setup the DSI lane) is triggered > before mtk_dsi_poweron. lanes_ready flag toggle to true during > mtk_dsi_lane_ready function, and the DSI

Re: [PATCH v2] drm/mediatek: Log errors in probe with dev_err_probe()

2024-06-27 Thread Chun-Kuang Hu
Hi, Nicolas: Nícolas F. R. A. Prado 於 2024年6月7日 週五 上午7:52寫道: > > Use dev_err_probe() to log errors in the probe function of all drm > mediatek drivers. This avoids -EPROBE_DEFER return values from being > logged as errors, like the following: > > mediatek-disp-rdma 1c002000.rdma: Failed to add

Re: [PATCH v2] drm/mediatek: Call drm_atomic_helper_shutdown() at shutdown time

2024-06-27 Thread Chun-Kuang Hu
Hi, Douglas Douglas Anderson 於 2024年6月12日 週三 上午1:28寫道: > > Based on grepping through the source code this driver appears to be > missing a call to drm_atomic_helper_shutdown() at system shutdown > time. Among other things, this means that if a panel is in use that it > won't be cleanly powered of

Re: [PATCH] drm/mediatek: Fix bit depth overwritten for mtk_ovl_set bit_depth()

2024-06-26 Thread Chun-Kuang Hu
Hi, Jason: Jason-JH.Lin 於 2024年6月24日 週一 下午5:57寫道: > > Refine the value and mask define of bit depth for mtk_ovl_set bit_depth(). > Use cmdq_pkt_write_mask() instead of cmdq_pkt_write() to avoid bit depth > settings being overwritten. Applied to mediatek-drm-next [1], thanks. [1] https://git.ke

Re: [PATCH v4 12/15] drm/mediatek: add MT8365 SoC support

2024-06-21 Thread Chun-Kuang Hu
Hi, Alexandre: 於 2024年5月23日 週四 下午8:49寫道: > > From: Fabien Parent > > Add DRM support for MT8365 SoC. > > Signed-off-by: Fabien Parent > Reviewed-by: AngeloGioacchino Del Regno > > Signed-off-by: Alexandre Mergnat > --- > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 8 > 1 file changed,

Re: [PATCH v4 06/15] dt-bindings: display: mediatek: dpi: add power-domains property

2024-06-21 Thread Chun-Kuang Hu
Hi, Alexandre: 於 2024年5月23日 週四 下午8:49寫道: > > From: Fabien Parent > > DPI is part of the display / multimedia block in MediaTek SoCs, and > always have a power-domain (at least in the upstream device-trees). > Add the power-domains property to the binding documentation. I've tired to apply this

Re: [PATCH] drm/mediatek: select DRM_GEM_DMA_HELPER if DRM_FBDEV_EMULATION=y

2024-06-20 Thread Chun-Kuang Hu
endency. Acked-by: Chun-Kuang Hu > > Fixes: 0992284b4fe4 ("drm/mediatek: Use fbdev-dma") > Signed-off-by: Chen-Yu Tsai > --- > The commit this patch fixes is in drm-misc-next. Ideally this patch > should be applied on top of it directly. > > CK, could you give yo

Re: [PATCH v3 00/14] This series fixes the errors of MediaTek display driver found by IGT.

2024-06-20 Thread Chun-Kuang Hu
Hi Shawn: Hsiao Chien Sung via B4 Relay 於 2024年6月20日 週四 上午12:38寫道: > > Signed-off-by: Hsiao Chien Sung For the series, applied to mediatek-drm-next [1], thanks. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-next Regards, Chun-Kuang. > --- > C

[GIT PULL] mediatek drm next for 6.10

2024-04-25 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Use devm_platform_get_and_ioremap_resource() in mtk_hdmi_ddc_probe() 2. Add GAMMA 12-bit LUT support for MT8188 3. Add 0 size check to mtk_drm_gem_obj 4. Init `ddp_comp` with devm_kcalloc() 5. Rename mtk_drm_* to mtk_* 6. Drop driver owner initialization 7. Fi

  1   2   3   4   5   6   7   8   9   >