Re: [PATCH v30 0/7] Add MediaTek SoC DRM (vdosys1) support for mt8195

2023-04-02 Thread Chun-Kuang Hu
Hi, Chen-yu: Chen-Yu Tsai 於 2023年3月30日 週四 下午7:05寫道: > > On Mon, Mar 27, 2023 at 11:17 PM Chun-Kuang Hu > wrote: > > > > Hi, Angelo: > > > > AngeloGioacchino Del Regno 於 > > 2023年3月24日 週五 下午4:38寫道: > > > > > > Il 24/

Re: [PATCH] drm/mediatek: dp: change the aux retries times when receiving AUX_DEFER

2023-04-02 Thread Chun-Kuang Hu
Hi, Xinlei: 於 2023年3月29日 週三 下午2:43寫道: > > From: Xinlei Lee > > DP 1.4a Section 2.8.7.1.5.6.1: > A DP Source device shall retry at least seven times upon receiving > AUX_DEFER before giving up the AUX transaction. > > The drm_dp_i2c_do_msg() function in the drm_dp_helper.c file will > judge the

Re: [PATCH] dt-bindings: display: Drop unneeded quotes

2023-03-20 Thread Chun-Kuang Hu
Hi, Rob: Rob Herring 於 2023年3月18日 週六 上午7:36寫道: > > Cleanup bindings dropping unneeded quotes. Once all these are fixed, > checking for this can be enabled in yamllint. For MediaTek part, Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Rob Herring > --- > .../bindi

Re: [PATCH v5] drm/mediatek: Add support for AR30 and BA30

2023-02-01 Thread Chun-Kuang Hu
irst series. Regards, Chun-Kuang. > > Regards, > Justin > > On Mon, Jan 30, 2023 at 7:28 PM Chun-Kuang Hu wrote: > > > > Hi, Justin: > > > > Justin Green 於 2023年1月31日 週二 上午4:36寫道: > > > > > > Add support for AR30 and BA30 pixel formats to the Me

Re: [PATCH 1/2] drm/mediatek: Refactor pixel format logic

2023-02-01 Thread Chun-Kuang Hu
t; > edit1 After remove this word, Reviewed-by: Chun-Kuang Hu > --- > drivers/gpu/drm/mediatek/mtk_disp_drv.h | 4 ++ > drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 44 + > drivers/gpu/drm/mediatek/mtk_disp_rdma.c| 38 ++ > driver

Re: [PATCH 2/2] drm/mediatek: Add support for AR30 and BA30 overlays

2023-02-01 Thread Chun-Kuang Hu
Hi, Justin: Justin Green 於 2023年2月1日 週三 上午4:09寫道: > > Add support for overlays with pixel formats AR30 and BA30 on MT8195. I would like to break this patch into two patches. One is ovl support AR30 and BA30, and the other one is mt8195 ovl support AR30 and BA30. > > Tested using "modetest -P"

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.

[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:

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

Re: [PATCH v4 1/8] dt-bindings: display: mediatek: add MT8195 hdmi bindings

2023-06-09 Thread Chun-Kuang Hu
Hi, Guillaume: Guillaume Ranquet 於 2023年6月9日 週五 下午11:50寫道: > > On Thu, 08 Jun 2023 23:05, Rob Herring wrote: > >On Mon, May 29, 2023 at 04:30:58PM +0200, Guillaume Ranquet wrote: > >> Add mt8195 SoC bindings for hdmi and hdmi-ddc > >> > >> On mt8195 the ddc i2c controller is part of the hdmi IP

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. > >

[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

[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 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

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

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

[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

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 > >

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]

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. > > >

[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.

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

[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 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 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 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 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-helper.c

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

2024-02-22 Thread Chun-Kuang Hu
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-cmdq.h

[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 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 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 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 00/12] Remove cl in struct cmdq_pkt

2024-02-22 Thread Chun-Kuang Hu
-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=a1b2f7a7488285975c1f439086f1c4cc51a13bb9 Chun-Kuang Hu (12): soc: mediatek: cmdq: Fix

[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

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

2024-06-20 Thread Chun-Kuang Hu
dependency. 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. > --- >

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 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

<    3   4   5   6   7   8