[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

Re: [PATCH 2/3] drm/mediatek: Perform iounmap on simple DDP component destruction

2024-04-01 Thread Chun-Kuang Hu
Hi, Angelo: CK Hu (胡俊光) 於 2024年3月22日 週五 下午4:49寫道: > > Hi, Angelo: > > On Thu, 2024-02-01 at 13:53 +0100, AngeloGioacchino Del Regno wrote: > > Add a new mtk_ddp_comp_destroy() function and call it in the teardown > > path of mtk_drm_drv to make sure that we unmap the iospace of the > > simple DDP

[GIT PULL] mediatek drm next for 6.9

2024-02-29 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Add display driver for MT8188 VDOSYS1 2. DSI driver cleanups 3. Filter modes according to hardware capability 4. Fix a null pointer crash in mtk_drm_crtc_finish_page_flip Regards, Chun-Kuang. The following changes since commit 6613476e225e090cc9aad49be7fa504

[PATCH v2 10/12] media: platform: mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize()

2024-02-22 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 v2 12/12] soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function

2024-02-22 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 v2 11/12] media: platform: mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-02-22 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 v2 07/12] soc: mediatek: cmdq: Refine cmdq_pkt_create() and cmdq_pkt_destroy()

2024-02-22 Thread Chun-Kuang Hu
ry to store this information in struct cmdq_pkt. After this refinement, client drivers could use these helper funciton instead of implementing its own version. Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 24 +++- include/linux/soc/mediatek/mtk-c

[PATCH v2 09/12] drm/mediatek: Use cmdq_pkt_create() and cmdq_pkt_destroy()

2024-02-22 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_drm_crtc.c | 46 +++-- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH v2 08/12] drm/mediatek: Use cmdq_pkt_eoc() instead of cmdq_pkt_finalize()

2024-02-22 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_drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c

[PATCH v2 05/12] soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function

2024-02-22 Thread Chun-Kuang Hu
cmdq_pkt_eoc() append eoc command to CMDQ packet. eoc command would ask GCE to generate IRQ. It's usually appended to the end of packet to notify all command in the packet is done. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-hel

[PATCH v2 06/12] soc: mediatek: cmdq: Remove cmdq_pkt_flush_async() helper function

2024-02-22 Thread Chun-Kuang Hu
cmdq_pkt_flush_async() is not used by all client drivers (MediaTek drm driver and MediaTek mdp3 driver), so remove it. Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 15 --- include/linux/soc/mediatek/mtk-cmdq.h | 18 -- 2 files changed

[PATCH v2 03/12] soc: mediatek: cmdq: Rename cmdq_pkt_jump() to cmdq_pkt_jump_abs()

2024-02-22 Thread Chun-Kuang Hu
In order to distinguish absolute jump and relative jump, cmdq_pkt_jump() append absolute jump command, so rename it to cmdq_pkt_jump_abs(). Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 4 ++-- include/linux/soc/mediatek/mtk-cmdq.h | 13 +++-- 2 files

[PATCH v2 04/12] soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function

2024-02-22 Thread Chun-Kuang Hu
cmdq_pkt_jump_rel() append relative jump command to the packet. Relative jump change PC to the target address with offset from current PC. Signed-off-by: Chun-Kuang Hu --- drivers/soc/mediatek/mtk-cmdq-helper.c | 10 ++ include/linux/soc/mediatek/mtk-cmdq.h | 19 +++ 2

[PATCH v2 01/12] soc: mediatek: cmdq: Fix typo of CMDQ_JUMP_RELATIVE

2024-02-22 Thread Chun-Kuang Hu
For cmdq jump command, offset 0 means relative jump and offset 1 means absolute jump. cmdq_pkt_jump() is absolute jump, so fix the typo of CMDQ_JUMP_RELATIVE in cmdq_pkt_jump(). Fixes: 946f1792d3d7 ("soc: mediatek: cmdq: add jump function") Signed-off-by: Chun-Kuang Hu --- drivers/so

[PATCH v2 02/12] soc: mediatek: cmdq: Add parameter shift_pa to cmdq_pkt_jump()

2024-02-22 Thread Chun-Kuang Hu
In original design, cmdq_pkt_jump() call cmdq_get_shift_pa() every time to get shift_pa. But the shift_pa is constant value for each SoC, so client driver just need to call cmdq_get_shift_pa() once and pass shift_pa to cmdq_pkt_jump() to prevent frequent function call. Signed-off-by: Chun-Kuang

[PATCH v2 00/12] Remove cl in struct cmdq_pkt

2024-02-22 Thread Chun-Kuang Hu
. mtk-mdp3: Get fine-grain control of cmdq_pkt_finalize() 7. mtk-mdp3: Use cmdq_pkt_create() and cmdq_pkt_destroy() [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/commit/?h=mediatek-cmdq8&id=a1b2f7a7488285975c1f439086f1c4cc51a13bb9 Chun-Kuang Hu (12): soc: media

Re: [PATCH v2] drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency

2023-12-18 Thread Chun-Kuang Hu
Hi, Nicolas: Nícolas F. R. A. Prado 於 2023年11月21日 週二 下午10:29寫道: > > The mtk_dp driver registers a phy device which is handled by the > phy_mtk_dp driver and assumes that the phy probe will complete > synchronously, proceeding to make use of functionality exposed by that > driver right away. This

[GIT PULL] mediatek drm next for 6.8

2023-12-18 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Use devm_platform_ioremap_resource() 2. Stop using iommu_present() 3. Add display driver for MT8188 VDOSYS1 4. Add phy_mtk_dp module as pre-dependency Regards, Chun-Kuang. The following changes since commit b85ea95d086471afb4ad062012a4d73cd328fa86: Linux

Re: [PATCH v11 14/23] drm/mediatek: Power on/off devices with function pointers

2023-12-13 Thread Chun-Kuang Hu
Hi, Hsiao-chien: Hsiao Chien Sung 於 2023年10月24日 週二 下午9:01寫道: > > Different from OVL, OVL adaptor is a pseudo device so we didn't > define it in the device tree, consequently, pm_runtime_resume_and_get() > called by .atomic_enable() powers on no device. For this reason, we > implement a function t

[GIT PULL] mediatek drm fixes 20231211

2023-12-11 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. mtk_disp_gamma: Fix breakage due to merge issue 2. fix kernel oops if no crtc is found 3. Add spinlock for setting vblank event in atomic_begin 4. Fix access violation in mtk_drm_crtc_dma_dev_get Regards, Chun-Kuang. The following changes since commit b85ea9

Re: [PATCH 1/1] drm/mediatek: Fix access violation in mtk_drm_crtc_dma_dev_get

2023-12-11 Thread Chun-Kuang Hu
Hi, Stuart: Stuart Lee 於 2023年11月10日 週五 上午9:29寫道: > > Add error handling to check NULL input in > mtk_drm_crtc_dma_dev_get function. > > While display path is not configured correctly, none of crtc is > established. So the caller of mtk_drm_crtc_dma_dev_get may pass > input parameter *crtc as NUL

Re: [PATCH v4 1/2] drm/mediatek: fix kernel oops if no crtc is found

2023-12-07 Thread Chun-Kuang Hu
Hi, Michael: Michael Walle 於 2023年9月5日 週二 下午4:49寫道: > > drm_crtc_from_index(0) might return NULL if there are no CRTCs > registered at all which will lead to a kernel oops in > mtk_drm_crtc_dma_dev_get(). Add the missing return value check. Applied to mediatek-drm-fixes [1], thanks. [1] https:

Re: [PATCH v3] drm/mediatek: Stop using iommu_present()

2023-12-07 Thread Chun-Kuang Hu
Hi, Robin: Robin Murphy 於 2023年11月23日 週四 下午9:41寫道: > > Remove the pointless check. If an IOMMU is providing transparent DMA API > ops for any device(s) we care about, the DT code will have enforced the > appropriate probe ordering already. And if the IOMMU *is* entirely > absent, then attempting

Re: [PATCH -next 3/3] drm/mediatek: Use devm_platform_ioremap_resource()

2023-12-07 Thread Chun-Kuang Hu
Hi, Yang: Alexandre Mergnat 於 2023年4月12日 週三 下午9:49寫道: > > On 12/04/2023 08:46, Yang Li wrote: > > Remove variable 'res' and convert platform_get_resource(), > > devm_ioremap_resource() to a single call to > > devm_platform_ioremap_resource(), as this is exactly what this function > > does. > > >

Re: [PATCH v4 2/2] drm/mediatek: dpi/dsi: fix possible_crtcs calculation

2023-11-23 Thread Chun-Kuang Hu
Hi, Michael: Michael Walle 於 2023年11月21日 週二 下午10:44寫道: > > Hi, > > > mtk_drm_find_possible_crtc_by_comp() assumed 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 > >

[GIT PULL] mediatek drm next for 6.7

2023-10-18 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Add support MT8188 dsi function 2. Fix coverity issue with unintentional integer overflow 3. Add support MT8188 dp/edp function 4. Fix memory leak on ->get_edid callback audio detection and error path. 5. Add connector dynamic selection capability 6. MediaT

Re: [PATCH] drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling

2023-10-18 Thread Chun-Kuang Hu
Hi, Angelo: AngeloGioacchino Del Regno 於 2023年10月18日 週三 下午6:21寫道: > > Il 15/09/23 12:11, Michael Walle ha scritto: > >> Due to the initial confusion about MIPI_DSI_MODE_EOT_PACKET, properly > >> renamed to MIPI_DSI_MODE_NO_EOT_PACKET, reflecting its actual meaning, > >> both the DSI_TXRX_CON regi

[GIT PULL] mediatek drm fixes 20231017

2023-10-16 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Correctly free sg_table in gem prime vmap Regards, Chun-Kuang. The following changes since commit 58720809f52779dc0f08e53e54b014209d13eebb: Linux 6.6-rc6 (2023-10-15 13:34:39 -0700) are available in the Git repository at: https://git.kernel.org/pub/sc

Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback error path

2023-09-24 Thread Chun-Kuang Hu
97a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver") > Cc: Markus Schneider-Pargmann > Cc: Guillaume Ranquet > Cc: Bo-Chen Chen > Cc: CK Hu > Cc: AngeloGioacchino Del Regno > Cc: Dmitry Osipenko > Cc: Chun-Kuang Hu > Cc: Philipp Zabel > Cc: Matthi

Re: [PATCH] drm/mediatek/dp: fix memory leak on ->get_edid callback audio detection

2023-09-24 Thread Chun-Kuang Hu
a > >> > wrote: > >> >> > >> >> The sads returned by drm_edid_to_sad() needs to be freed. > >> >> > >> >> Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195") > >> >> Cc: Guillaume Ra

Re: [PATCH v6,0/4] Add compatible to increase MT8188 audio control

2023-09-24 Thread Chun-Kuang Hu
Hi, Shuijing: Shuijing Li 於 2023年8月22日 週二 上午10:41寫道: > > Add dt-binding documentation of dp-tx for MediaTek MT8188 SoC. > Mainly add the following two flag: > > 1.The audio packet arrangement function is to only arrange audio > packets into the Hblanking area. In order to align with the HW > defa

[GIT PULL] mediatek drm next for 6.6

2023-08-13 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Small mtk-dpi cleanups 2. DisplayPort: support eDP and aux-bus 3. Fix uninitialized symbol 4. Do not check for 0 return after calling platform_get_irq() 5. Convert to platform remove callback returning void 6. Fix coverity issues 7. Fix potential memory leak i

Re: [PATCH] drm: mediatek: mtk_dsi: Fix NO_EOT_PACKET settings/handling

2023-07-19 Thread Chun-Kuang Hu
Hi, Jitao: Do you have any comment? If you have no comment, I would apply this patch. Regards, Chun-Kuang. AngeloGioacchino Del Regno 於 2023年5月23日 週二 下午6:42寫道: > > Due to the initial confusion about MIPI_DSI_MODE_EOT_PACKET, properly > renamed to MIPI_DSI_MODE_NO_EOT_PACKET, reflecting its actu

[GIT PULL] mediatek drm next for 6.5

2023-06-14 Thread Chun-Kuang Hu
Hi, Dave & Daniel: This includes: 1. Add display binding document for MT6795 Regards, Chun-Kuang. The following changes since commit ac9a78681b921877518763ba0e89202254349d1b: Linux 6.4-rc1 (2023-05-07 13:34:35 -0700) are available in the Git repository at: https://git.kernel.org/pub/scm/

Re: [PATCH 03/27] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT6795

2023-06-12 Thread Chun-Kuang Hu
Hi, Matthias: Matthias Brugger 於 2023年5月29日 週一 下午10:07寫道: > > Hi Chun-Kuang Hu, > > Can you help to merge the missing DT-binding patches in this series? Apply display binding of this series to mediatek-drm-next [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.

Re: [PATCH 1/3] dt-bindings: display: mediatek: dsi: Add compatible for MediaTek MT8188

2023-06-12 Thread Chun-Kuang Hu
於 2023年4月13日 週四 下午2:09寫道: > > From: Xinlei Lee > > Add dt-binding documentation of dsi for MediaTek MT8188 SoC. Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Xinlei Lee > Signed-off-by: Jitao Shi > --- > .../devicetree/bindings/display/mediatek/mediatek,dsi

Re: [PATCH 2/3] drm/mediatek: Add mt8188 dsi compatible to mtk_dsi.c

2023-06-12 Thread Chun-Kuang Hu
Hi, Xinlei: Reorder this patch after patch "[3/3] drm/mediatek: dsi: Add dsi cmdq_ctl to send panel initial code" Regards, Chun-Kuang. 於 2023年4月13日 週四 下午2:09寫道: > > From: Xinlei Lee > > Add the compatible because there are different definitions for cmdq > register bit control in mt8188. > > Si

  1   2   3   4   5   6   7   8   9   >