Re: [PATCH 11/11] drm/mediatek: Rename "pending_needs_vblank" to "needs_vblank"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename "pending_needs_vblank" to "needs_vblank" to reduce the code size. This decreases human readability though, so I would prefer that we omit this one. Regards, Angelo Signed-off-by: Hsiao Chien Sung ---

Re: [PATCH 04/11] drm/mediatek: Rename "mtk_drm_gem" to "mtk_gem"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename all "mtk_drm_gem" to "mtk_gem": - To align the naming rule - To reduce the code size Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 02/11] drm/mediatek: Rename "mtk_drm_ddp_comp" to "mtk_ddp_comp"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename all "mtk_drm_ddp_comp" to "mtk_ddp_comp": - To align the naming rule - To reduce the code size Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 03/11] drm/mediatek: Rename "mtk_drm_plane" to "mtk_plane"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename all "mtk_drm_plane" to "mtk_plane": - To align the naming rule - To reduce the code size Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 06/11] drm/mediatek: Rename files "mtk_drm_crtc.*" to "mtk_crtc.*"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename files mtk_drm_crtc.* to mtk_crtc.*. Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 09/11] drm/mediatek: Rename files "mtk_drm_gem.*" to "mtk_gem.*"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename files mtk_drm_gem.* to mtk_gem.*. Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 08/11] drm/mediatek: Rename files "mtk_drm_plane.*" to "mtk_plane.*"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename files mtk_drm_plane.* to mtk_plane.*. Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 07/11] drm/mediatek: Rename files "mtk_drm_ddp_comp.*" to "mtk_ddp_comp.*"

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename files mtk_drm_ddp_comp.* to mtk_ddp_comp.*. Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH 10/11] drm/mediatek: Rename mtk_ddp_comp functions

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:50, Shawn Sung ha scritto: From: Hsiao Chien Sung Rename functions of mtk_ddp_comp: - To align the naming rule - To reduce the code size Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGiaocchino Del Regno

Re: [PATCH] drm/mediatek: Add MT8188 Overlay Driver Data

2024-02-26 Thread AngeloGioacchino Del Regno
Il 26/02/24 09:21, Fei Shao ha scritto: On Thu, Feb 22, 2024 at 4:43 PM AngeloGioacchino Del Regno wrote: Il 21/02/24 17:56, Justin Green ha scritto: Add MT8188 overlay driver configuration data. This change consequently enables 10-bit overlay support on MT8188 devices. Tested by running

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

2024-02-23 Thread AngeloGioacchino Del Regno
Il 22/02/24 16:41, Chun-Kuang Hu ha scritto: 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 Reviewed-by: AngeloGioacchino Del Regno

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

2024-02-23 Thread AngeloGioacchino Del Regno
t;) Signed-off-by: Chun-Kuang Hu Reviewed-by: AngeloGioacchino Del Regno

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

2024-02-23 Thread AngeloGioacchino Del Regno
Il 22/02/24 16:41, Chun-Kuang Hu ha scritto: 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 Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH] drm/mediatek: Add MT8188 Overlay Driver Data

2024-02-22 Thread AngeloGioacchino Del Regno
Il 21/02/24 17:56, Justin Green ha scritto: Add MT8188 overlay driver configuration data. This change consequently enables 10-bit overlay support on MT8188 devices. Tested by running ChromeOS UI on MT8188 and using modetest -P. AR30 and BA30 overlays are confirmed to work from modetest.

Re: [PATCH v5 10/13] drm/mediatek: Support CRC in display driver

2024-02-15 Thread AngeloGioacchino Del Regno
Il 15/02/24 11:11, Hsiao Chien Sung ha scritto: Register CRC related function pointers to support CRC retrieval. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 239 drivers/gpu/drm/mediatek/mtk_drm_crtc.h | 39

Re: [PATCH v5 08/13] drm/mediatek: Support alpha blending in OVL

2024-02-15 Thread AngeloGioacchino Del Regno
Il 15/02/24 11:11, Hsiao Chien Sung ha scritto: Support "Pre-multiplied" and "None" blend mode on MediaTek's chips. Before this patch, only the "Coverage" mode is supported. Please refer to the description of the commit "drm/mediatek: Support alpha blending in display driver" for more

Re: [PATCH v5 07/13] drm/mediatek: Support alpha blending in display driver

2024-02-15 Thread AngeloGioacchino Del Regno
composited layer will take effects. Signed-off-by: Hsiao Chien Sung Reviewed-by: CK Hu Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v5 06/13] drm/mediatek: Turn off the layers with zero width or height

2024-02-15 Thread AngeloGioacchino Del Regno
. In any case, it's not mandatory as that depends on what the maintainer prefers, so it's CK's call anyway. Besides that, Reviewed-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 2 +- drivers/gpu/drm/mediatek/mtk_ethdr.c| 7 ++- 2 files c

[PATCH v6 6/9] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY

2024-02-15 Thread AngeloGioacchino Del Regno
ter the DSI host after getting clocks, iospace and PHY. This wil also allow to simplify the error paths in a later commit. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 28 ++-- 1 file changed, 14 inserti

[PATCH v6 9/9] drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function

2024-02-15 Thread AngeloGioacchino Del Regno
extra-spec format support and/or because the data rate (hence, the HS clock) will be wrong. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git

[PATCH v6 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel

2024-02-15 Thread AngeloGioacchino Del Regno
All entries fit in 82 columns, which is acceptable: compress all of the mtk_dsi_of_match[] entries to a single line for each. While at it, also add the usual sentinel comment to the last entry. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm

[PATCH v6 4/9] drm/mediatek: dsi: Use bitfield macros where useful

2024-02-15 Thread AngeloGioacchino Del Regno
Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 95 -- 1 file changed, 50 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 0a83875ec1ba

[PATCH v6 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ

2024-02-15 Thread AngeloGioacchino Del Regno
In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. Reviewed-by: Alexandre Mergnat Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno

[PATCH v6 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-15 Thread AngeloGioacchino Del Regno
Change magic numerical masks with usage of the GENMASK() macro to improve readability. This commit brings no functional changes. Reviewed-by: Alexandre Mergnat Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 45

[PATCH v6 3/9] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-02-15 Thread AngeloGioacchino Del Regno
Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 78 ++ 1 file changed, 25 insertions(+), 53 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 8af0afbe9e3d..0a83875ec1ba 100644

[PATCH v6 7/9] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos

2024-02-15 Thread AngeloGioacchino Del Regno
() function in the devm_request_irq() error path, allowing to also remove the same label. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 60 +- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git

[PATCH v6 2/9] drm/mediatek: dsi: Fix DSI RGB666 formats and definitions

2024-02-15 Thread AngeloGioacchino Del Regno
d, 18-bits for MIPI_DSI_FMT_RGB666_PACKED Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver") Reviewed-by: Alexandre Mergnat Reviewed-by: CK Hu Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +- 1 file changed, 5 insertions(+), 5 dele

[PATCH v6 0/9] MediaTek DRM - DSI driver cleanups

2024-02-15 Thread AngeloGioacchino Del Regno
panel). AngeloGioacchino Del Regno (9): drm/mediatek: dsi: Use GENMASK() for register mask definitions drm/mediatek: dsi: Fix DSI RGB666 formats and definitions drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}() drm/mediatek: dsi: Use bitfield macros where useful drm/mediate

[PATCH v5 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel

2024-02-07 Thread AngeloGioacchino Del Regno
All entries fit in 82 columns, which is acceptable: compress all of the mtk_dsi_of_match[] entries to a single line for each. While at it, also add the usual sentinel comment to the last entry. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm

[PATCH v5 6/9] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY

2024-02-07 Thread AngeloGioacchino Del Regno
ter the DSI host after getting clocks, iospace and PHY. This wil also allow to simplify the error paths in a later commit. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 28 ++-- 1 file changed, 14 inserti

[PATCH v5 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ

2024-02-07 Thread AngeloGioacchino Del Regno
In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm

[PATCH v5 9/9] drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function

2024-02-07 Thread AngeloGioacchino Del Regno
extra-spec format support and/or because the data rate (hence, the HS clock) will be wrong. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git

[PATCH v5 7/9] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos

2024-02-07 Thread AngeloGioacchino Del Regno
() function in the devm_request_irq() error path, allowing to also remove the same label. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 60 +- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git

[PATCH v5 4/9] drm/mediatek: dsi: Use bitfield macros where useful

2024-02-07 Thread AngeloGioacchino Del Regno
Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 97 -- 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 7d38e9500700..a330bb94c44a 100644

[PATCH v5 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-07 Thread AngeloGioacchino Del Regno
Change magic numerical masks with usage of the GENMASK() macro to improve readability. This commit brings no functional changes. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 45 +++--- 1 file changed

[PATCH v5 3/9] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-02-07 Thread AngeloGioacchino Del Regno
-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 76 +- 1 file changed, 23 insertions(+), 53 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 8af0afbe9e3d..7d38e9500700 100644 --- a/drivers/gpu/drm

[PATCH v5 2/9] drm/mediatek: dsi: Fix DSI RGB666 formats and definitions

2024-02-07 Thread AngeloGioacchino Del Regno
d, 18-bits for MIPI_DSI_FMT_RGB666_PACKED Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver") Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --g

[PATCH v5 0/9] MediaTek DRM - DSI driver cleanups

2024-02-07 Thread AngeloGioacchino Del Regno
, enhancing human readability, using kernel provided macros where possible and also reducing code size. Tested on MT8173 and MT8192 Chromebooks (using a DSI<->DP bridge) and on MT6795 Sony Xperia M5 (DSI video mode panel). AngeloGioacchino Del Regno (9): drm/mediatek: dsi: Use G

Re: [PATCH v4 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-06 Thread AngeloGioacchino Del Regno
Il 06/02/24 15:47, Alexandre Mergnat ha scritto: On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote: Change magic numerical masks with usage of the GENMASK() macro to improve readability. While at it, also fix the DSI_PS_SEL mask to include all bits instead of just a subset of them

Re: [PATCH v2 2/3] Subject: [PATCH] drm/mediatek/dp: Add HDCP2.x feature for DisplayPort

2024-02-06 Thread AngeloGioacchino Del Regno
Il 05/02/24 06:50, mac.shen ha scritto: Add HDCP2.x feature for DisplayPort. When userspace request the kernel protect future content communicated over the link with Content_Protection property, the feature will do HDCP2.x authentication if the sink support HDCP2.X. Changes in v2: - remove

Re: [PATCH v2 1/3] Subject: [PATCH] drm/mediatek/dp: Add tee client application for HDCP feature

2024-02-06 Thread AngeloGioacchino Del Regno
Il 05/02/24 06:50, mac.shen ha scritto: Add tee client application which will be used for HDCP 1.x and 2.x authentication in DisplayPort. Changes in v2: - remove ca folder, and change file name with lower case - refine the tci_t structure to make the data to tee can through this structure -

Re: [PATCH 1/3] drm/mediatek: Dynamically allocate CMDQ and use helper functions

2024-02-06 Thread AngeloGioacchino Del Regno
Il 03/08/23 10:37, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Thu, 2023-08-03 at 10:25 +0200, AngeloGioacchino Del Regno wrote: Il 03/08/23 08:28, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Wed, 2023-08-02 at 12:41 +0200, AngeloGioacchino Del Regno wrote: Il 02/08/23 08:24, CK Hu (胡俊光) ha scritto

Re: [PATCH v3 1/7] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-06 Thread AngeloGioacchino Del Regno
Il 06/02/24 09:57, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Wed, 2024-01-31 at 12:34 +0100, AngeloGioacchino Del Regno wrote: Change magic numerical masks with usage of the GENMASK() macro to improve readability. While at it, also fix the DSI_PS_SEL mask to include all bits instead of just

[PATCH v4 9/9] drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function

2024-02-06 Thread AngeloGioacchino Del Regno
extra-spec format support and/or because the data rate (hence, the HS clock) will be wrong. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH v4 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel

2024-02-06 Thread AngeloGioacchino Del Regno
All entries fit in 82 columns, which is acceptable: compress all of the mtk_dsi_of_match[] entries to a single line for each. While at it, also add the usual sentinel comment to the last entry. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 17

[PATCH v4 3/9] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-02-06 Thread AngeloGioacchino Del Regno
Function mtk_dsi_ps_control() is a subset of mtk_dsi_ps_control_vact(): merge the two in one mtk_dsi_ps_control() function by adding one function parameter `config_vact` which, when true, writes the VACT related registers. Reviewed-by: Fei Shao Signed-off-by: AngeloGioacchino Del Regno

[PATCH v4 0/9] MediaTek DRM - DSI driver cleanups

2024-02-06 Thread AngeloGioacchino Del Regno
and also reducing code size. Tested on MT8173 and MT8192 Chromebooks (using a DSI<->DP bridge) and on MT6795 Sony Xperia M5 (DSI video mode panel). AngeloGioacchino Del Regno (9): drm/mediatek: dsi: Use GENMASK() for register mask definitions drm/mediatek: dsi: Fix DSI RGB666 formats and defin

[PATCH v4 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-02-06 Thread AngeloGioacchino Del Regno
Change magic numerical masks with usage of the GENMASK() macro to improve readability. While at it, also fix the DSI_PS_SEL mask to include all bits instead of just a subset of them. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm

[PATCH v4 6/9] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY

2024-02-06 Thread AngeloGioacchino Del Regno
ter the DSI host after getting clocks, iospace and PHY. This wil also allow to simplify the error paths in a later commit. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --

[PATCH v4 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ

2024-02-06 Thread AngeloGioacchino Del Regno
In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- 1 file

[PATCH v4 2/9] drm/mediatek: dsi: Fix DSI RGB666 formats and definitions

2024-02-06 Thread AngeloGioacchino Del Regno
d, 18-bits for MIPI_DSI_FMT_RGB666_PACKED Fixes: 2e54c14e310f ("drm/mediatek: Add DSI sub driver") Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_

[PATCH v4 7/9] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos

2024-02-06 Thread AngeloGioacchino Del Regno
() function in the devm_request_irq() error path, allowing to also remove the same label. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 60 +- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH v4 4/9] drm/mediatek: dsi: Use bitfield macros where useful

2024-02-06 Thread AngeloGioacchino Del Regno
Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 97 -- 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index b025886be680..26c221737387 100644 --- a/drivers/gpu/drm/mediatek

Re: [PATCH v3 2/7] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-02-06 Thread AngeloGioacchino Del Regno
Il 06/02/24 10:50, CK Hu (胡俊光) ha scritto: Hi, Angelo: On Wed, 2024-01-31 at 12:34 +0100, AngeloGioacchino Del Regno wrote: Function mtk_dsi_ps_control() is a subset of mtk_dsi_ps_control_vact(): merge the two in one mtk_dsi_ps_control() function by adding one function parameter `config_vact

[PATCH 3/3] drm/mediatek: drm_ddp_comp: Add mtk_ddp_is_simple_comp() internal helper

2024-02-01 Thread AngeloGioacchino Del Regno
Move the simple component check to a new mtk_ddp_is_simple_comp() internal helper to reduce code duplication. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 57 +++-- 1 file changed, 31 insertions(+), 26 deletions(-) diff --git

[PATCH 1/3] drm/mediatek: drm_ddp_comp: Fix and cleanup DDP component CRTC search

2024-02-01 Thread AngeloGioacchino Del Regno
of the found possible CRTC; and - mtk_drm_find_possible_crtc_by_comp() always returns either a bitmask of the possible CRTC, or zero if none available. Fixes: 01389b324c97 ("drm/mediatek: Add connector dynamic selection capability") Signed-off-by: AngeloGioacchino Del Regno --- d

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

2024-02-01 Thread AngeloGioacchino Del Regno
from sub driver to DRM driver") Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 38 - drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 4 ++- 3 files changed, 41 insertions(+), 2

[PATCH 0/3] drm/mediatek: Fixes for DDP component search/destroy

2024-02-01 Thread AngeloGioacchino Del Regno
This series performs some cleanups for DDP component CRTC search and correctly iounmaps the previously of_iomap() calls from drm_ddp_comp. Tested on MT8195 Cherry Tomato AngeloGioacchino Del Regno (3): drm/mediatek: drm_ddp_comp: Fix and cleanup DDP component CRTC search drm/mediatek

Re: [PATCH v4 00/17] Support IGT in display driver

2024-02-01 Thread AngeloGioacchino Del Regno
Il 12/12/23 13:19, Hsiao Chien Sung ha scritto: This series is based on mediatek-drm-next. This series adds support for running IGT (Intel GPU Tool) tests with MediaTek display driver. The following changes will be applied: 1. Add a new API for creating GCE thread loop to retrieve CRCs

Re: [v3 2/3] ASoC: mediatek: mt8186: correct the HDMI widgets

2024-01-31 Thread AngeloGioacchino Del Regno
Il 31/01/24 13:25, Jiaxin Yu (俞家鑫) ha scritto: On Wed, 2024-01-31 at 12:42 +0100, AngeloGioacchino Del Regno wrote: Il 03/08/23 21:33, Mark Brown ha scritto: On Thu, Aug 03, 2023 at 07:20:15AM +, Jiaxin Yu (俞家鑫) wrote: I agree with you, in fact the speaker is indeed doing this way

Re: [v3 2/3] ASoC: mediatek: mt8186: correct the HDMI widgets

2024-01-31 Thread AngeloGioacchino Del Regno
Il 03/08/23 21:33, Mark Brown ha scritto: On Thu, Aug 03, 2023 at 07:20:15AM +, Jiaxin Yu (俞家鑫) wrote: I agree with you, in fact the speaker is indeed doing this way. But about the hdmi that on the board, I did not find a defination link snd_soc_dapm_hdmi, so I use snd_soc_dapm_line to

[PATCH v3 3/7] drm/mediatek: dsi: Use bitfield macros where useful

2024-01-31 Thread AngeloGioacchino Del Regno
Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 97 -- 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 8414ce73ce9f..cba63de5092d 100644 --- a/drivers/gpu/drm/mediatek

[PATCH v3 6/7] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos

2024-01-31 Thread AngeloGioacchino Del Regno
() function in the devm_request_irq() error path, allowing to also remove the same label. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 60 +- 1 file changed, 18 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH v3 4/7] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ

2024-01-31 Thread AngeloGioacchino Del Regno
In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- 1 file

[PATCH v3 2/7] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-01-31 Thread AngeloGioacchino Del Regno
Function mtk_dsi_ps_control() is a subset of mtk_dsi_ps_control_vact(): merge the two in one mtk_dsi_ps_control() function by adding one function parameter `config_vact` which, when true, writes the VACT related registers. Reviewed-by: Fei Shao Signed-off-by: AngeloGioacchino Del Regno

[PATCH v3 1/7] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-01-31 Thread AngeloGioacchino Del Regno
Change magic numerical masks with usage of the GENMASK() macro to improve readability. While at it, also fix the DSI_PS_SEL mask to include all bits instead of just a subset of them. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm

[PATCH v3 5/7] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY

2024-01-31 Thread AngeloGioacchino Del Regno
ter the DSI host after getting clocks, iospace and PHY. This wil also allow to simplify the error paths in a later commit. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --

[PATCH v3 7/7] drm/mediatek: dsi: Compress of_device_id entries and add sentinel

2024-01-31 Thread AngeloGioacchino Del Regno
All entries fit in 82 columns, which is acceptable: compress all of the mtk_dsi_of_match[] entries to a single line for each. While at it, also add the usual sentinel comment to the last entry. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 17

[PATCH v3 0/7] MediaTek DRM - DSI driver cleanups

2024-01-31 Thread AngeloGioacchino Del Regno
readability, using kernel provided macros where possible and also reducing code size. Tested on MT8173 and MT8192 Chromebooks (using a DSI<->DP bridge) and on MT6795 Sony Xperia M5 (DSI video mode panel). AngeloGioacchino Del Regno (7): drm/mediatek: dsi: Use GENMASK() for registe

Re: [PATCH v2 2/4] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2024-01-31 Thread AngeloGioacchino Del Regno
Il 26/12/23 11:48, Fei Shao ha scritto: Hi Angelo, On Wed, Dec 20, 2023 at 9:57 PM AngeloGioacchino Del Regno wrote: Function mtk_dsi_ps_control() is a subset of mtk_dsi_ps_control_vact(): merge the two in one mtk_dsi_ps_control() function by adding one function parameter `config_vact` which

Re: [PATCH v2 1/4] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2024-01-31 Thread AngeloGioacchino Del Regno
Il 26/12/23 11:46, Fei Shao ha scritto: Hi Angelo, On Wed, Dec 20, 2023 at 9:57 PM AngeloGioacchino Del Regno wrote: Change magic numerical masks with usage of the GENMASK() macro to improve readability. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno

Re: [PATCH v19 17/30] drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()

2024-01-26 Thread AngeloGioacchino Del Regno
y Osipenko Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v5 003/111] pwm: Provide a macro to get the parent device of a given chip

2024-01-25 Thread AngeloGioacchino Del Regno
now. This way struct pwm_chip and this macro can be changed without having to touch all drivers in the same change set. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno --- include/linux/pwm.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/pw

Re: [PATCH v5 039/111] pwm: Provide wrappers for storing and getting driver private data

2024-01-25 Thread AngeloGioacchino Del Regno
drivers to pwmchip_alloc() which must happen before changing pwm_chip::dev. Signed-off-by: Uwe Kleine-König Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v4 3/3] dt-bindings: soc: mediatek: Change mediatek,gce-events to refernece

2024-01-24 Thread AngeloGioacchino Del Regno
Il 24/01/24 02:14, Jason-JH.Lin ha scritto: Change mediatek,gce-events property to reference mediatek,gce-props.yaml instead of defining itself. Signed-off-by: Jason-JH.Lin Reviewed-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v4 2/3] dt-bindings: media: mediatek: mdp: Change mediatek,gce-events to reference

2024-01-24 Thread AngeloGioacchino Del Regno
Il 24/01/24 02:14, Jason-JH.Lin ha scritto: Change mediatek,gce-events property to reference mediatek,gce-props.yaml instead of defining itself. Signed-off-by: Jason-JH.Lin Reviewed-by: Conor Dooley Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v4 1/3] dt-bindings: mailbox: Add mediatek,gce-props.yaml

2024-01-24 Thread AngeloGioacchino Del Regno
sed for GCE event ID corresponding to a hardware event signal sent by the hardware or a software driver. If the mailbox providers or consumers want to manipulate the value of the event ID, they need to know the specific event ID. Signed-off-by: Jason-JH.Lin Reviewed-by: Conor Dooley Reviewed-by:

Re: [PATCH v3 1/3] dt-bindings: mailbox: Add mediatek,gce-props.yaml

2024-01-22 Thread AngeloGioacchino Del Regno
Il 19/01/24 17:44, Conor Dooley ha scritto: Rob, On Fri, Jan 19, 2024 at 02:32:22PM +0800, Jason-JH.Lin wrote: Add mediatek,gce-props.yaml for common GCE properties that is used for both mailbox providers and consumers. We place the common property "mediatek,gce-events" in this binding

Re: [PATCH v3 1/3] dt-bindings: mailbox: Add mediatek,gce-props.yaml

2024-01-19 Thread AngeloGioacchino Del Regno
Il 19/01/24 07:32, Jason-JH.Lin ha scritto: Add mediatek,gce-props.yaml for common GCE properties that is used for both mailbox providers and consumers. We place the common property "mediatek,gce-events" in this binding currently. The property "mediatek,gce-events" is used for GCE event ID

Re: [PATCH v4 0/8] Add MT8195 HDMI support

2024-01-15 Thread AngeloGioacchino Del Regno
Il 29/05/23 16:30, Guillaume Ranquet ha scritto: Add support for HDMI Tx on MT8195. This includes a split of the current "legacy" hdmi driver into a common library of functions and two dedicated compilation units with specific code for mt8167 and another for the "v2" mt8195 SoC. Support for

Re: [PATCH v5 2/2] phy: mtk-mipi-csi: add driver for CSI phy

2024-01-11 Thread AngeloGioacchino Del Regno
-by: AngeloGioacchino Del Regno

[PATCH v2 2/4] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}()

2023-12-20 Thread AngeloGioacchino Del Regno
Function mtk_dsi_ps_control() is a subset of mtk_dsi_ps_control_vact(): merge the two in one mtk_dsi_ps_control() function by adding one function parameter `config_vact` which, when true, writes the VACT related registers. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek

[PATCH v2 3/4] drm/mediatek: dsi: Use bitfield macros where useful

2023-12-20 Thread AngeloGioacchino Del Regno
(), where it was possible to change a switch to a short for loop and to also remove the need to check for maximum DSI lanes == 4 thanks to the FIELD_PREP macro masking the value. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 95 -- 1

[PATCH v2 1/4] drm/mediatek: dsi: Use GENMASK() for register mask definitions

2023-12-20 Thread AngeloGioacchino Del Regno
Change magic numerical masks with usage of the GENMASK() macro to improve readability. This commit brings no functional changes. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 46 -- 1 file changed, 24 insertions(+), 22 deletions

[PATCH v2 4/4] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ

2023-12-20 Thread AngeloGioacchino Del Regno
In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- 1 file

[PATCH v2 0/4] MediaTek DRM - DSI driver cleanups

2023-12-20 Thread AngeloGioacchino Del Regno
5 (DSI video mode panel). AngeloGioacchino Del Regno (4): drm/mediatek: dsi: Use GENMASK() for register mask definitions drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}() drm/mediatek: dsi: Use bitfield macros where useful drm/mediatek: dsi: Replace open-coded instance of HZ_P

Re: [PATCH v4 17/17] drm/mediatek: Add comments for the structures

2023-12-12 Thread AngeloGioacchino Del Regno
device *dev); void (*power_off)(struct device *dev); Please rebase over the latest upstream kernel, as it doesn't apply like this. After which: Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v4 04/17] drm/mediatek: Add OVL compatible name for MT8195

2023-12-12 Thread AngeloGioacchino Del Regno
Il 12/12/23 13:19, Hsiao Chien Sung ha scritto: Add OVL compatible name for MT8195. Without this commit, DRM won't work after modifying the device tree. Reviewed-by: CK Hu Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v4 03/17] dt-bindings: display: mediatek: ovl: Modify rules for MT8195/MT8188

2023-12-12 Thread AngeloGioacchino Del Regno
Il 12/12/23 13:19, Hsiao Chien Sung ha scritto: 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: Rob Herring Signed-off-by: Hsiao Chien Sung Reviewed-by: AngeloGioacchino Del

Re: [PATCH v4 11/17] drm/mediatek: Turn off the layers with zero width or height

2023-12-12 Thread AngeloGioacchino Del Regno
Il 12/12/23 13:19, Hsiao Chien Sung ha scritto: We found that IGT (Intel GPU Tool) will try to commit layers with zero width or height and lead to undefined behaviors in hardware. Disable the layers in such situations. Signed-off-by: Hsiao Chien Sung This commit needs a Fixes tag. Please add

Re: [PATCH v4 05/17] drm/mediatek: Set DRM mode configs accordingly

2023-12-12 Thread AngeloGioacchino Del Regno
Il 12/12/23 13:19, Hsiao Chien Sung ha scritto: Set DRM mode configs limitation accroding to the hardware capabilities. Signed-off-by: Hsiao Chien Sung --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 28 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + 2 files

[PATCH v4 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-12-04 Thread AngeloGioacchino Del Regno
resume, clear each is_suspended bit in the reset path of JOB/MMU to allow unmasking the interrupts. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/panfrost/panfrost_device.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_device.h | 8 +++ drivers/gpu/drm/panfrost/panfrost_gpu.c

[PATCH v4 2/3] drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device

2023-12-04 Thread AngeloGioacchino Del Regno
-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/panfrost/panfrost_device.h | 2 ++ drivers/gpu/drm/panfrost/panfrost_gpu.c| 10 +- drivers/gpu/drm/panfrost/panfrost_mmu.c| 10 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH v4 1/3] drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq

2023-12-04 Thread AngeloGioacchino Del Regno
Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index 09f5e1563ebd..bd41617c5e4b 100644 --- a/d

[PATCH v4 0/3] drm/panfrost: Fix poweroff and sync IRQs for suspend

2023-12-04 Thread AngeloGioacchino Del Regno
and the initial approaches taken to solve that. Cheers! [1]: https://lore.kernel.org/all/20231123095320.41433-1-angelogioacchino.delre...@collabora.com/ AngeloGioacchino Del Regno (3): drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq drm/panfrost: Add gpu_irq, mmu_irq

Re: [PATCH v3 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-12-04 Thread AngeloGioacchino Del Regno
Il 01/12/23 13:34, Steven Price ha scritto: On 01/12/2023 11:14, Boris Brezillon wrote: On Fri, 1 Dec 2023 11:40:27 +0100 AngeloGioacchino Del Regno wrote: To make sure that we don't unintentionally perform any unclocked and/or unpowered R/W operation on GPU registers, before turning off

Re: [PATCH v3 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-12-04 Thread AngeloGioacchino Del Regno
Il 01/12/23 12:14, Boris Brezillon ha scritto: On Fri, 1 Dec 2023 11:40:27 +0100 AngeloGioacchino Del Regno wrote: To make sure that we don't unintentionally perform any unclocked and/or unpowered R/W operation on GPU registers, before turning off clocks and regulators we must make sure

[PATCH v3 2/3] drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device

2023-12-01 Thread AngeloGioacchino Del Regno
In preparation for adding a IRQ synchronization mechanism for PM suspend add gpu_irq and mmu_irq variables to struct panfrost_device and change functions panfrost_gpu_init() and panfrost_mmu_init() to use those. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/panfrost

[PATCH v3 1/3] drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq

2023-12-01 Thread AngeloGioacchino Del Regno
this by: - Avoid to enable the power transition interrupt on reset; and - Ignoring the core_mask and ask the GPU to poweroff both core groups Fixes: 22aa1a209018 ("drm/panfrost: Really power off GPU cores in panfrost_gpu_power_off()") Signed-off-by: AngeloGioacchino Del Regno --- drive

[PATCH v3 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-12-01 Thread AngeloGioacchino Del Regno
resume, clear each is_suspended bit in the reset path of JOB/MMU to allow unmasking the interrupts. Signed-off-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/panfrost/panfrost_device.c | 3 +++ drivers/gpu/drm/panfrost/panfrost_device.h | 7 +++ drivers/gpu/drm/panfrost/panfrost

<    1   2   3   4   5   6   7   8   9   10   >