[PATCH v2] dt-bindings: display: mediatek: Fix the duplicated fallback

2023-03-06 Thread Alexandre Mergnat
The item which have the mediatek,mt8192-disp-ccorr const compatible already exist above. Remove duplicated fallback. Fixes: 137272ef1b0f ("dt-bindings: display: mediatek: Fix the fallback for mediatek,mt8186-disp-ccorr") Signed-off-by: Alexandre Mergnat --- Fix MTK color correction bi

[PATCH] Fixes dt-bindings: display: mediatek: Fix the fallback for mediatek,mt8186-disp-ccorr

2023-03-06 Thread Alexandre Mergnat
The item which have the mediatek,mt8192-disp-ccorr const compatible already exist above. Remove duplicated fallback. Fixes: 137272ef1b0f ("dt-bindings: display: mediatek: Fix the fallback for mediatek,mt8186-disp-ccorr") Signed-off-by: Alexandre Mergnat --- Fix MTK color correcti

[PATCH v3] dt-bindings: display: mediatek: Fix the duplicated fallback

2023-03-06 Thread Alexandre Mergnat
The item which have the mediatek,mt8192-disp-ccorr const compatible already exist above. Remove duplicated fallback. Fixes: 137272ef1b0f ("dt-bindings: display: mediatek: Fix the fallback for mediatek,mt8186-disp-ccorr") Signed-off-by: Alexandre Mergnat --- Fix MTK color correction bi

[PATCH v4] dt-bindings: display: mediatek: clean unnecessary item

2023-03-07 Thread Alexandre Mergnat
The item which have the mediatek,mt8192-disp-ccorr as const compatible already exist above. Merge all compatibles which have the same fallback under the same item. Acked-by: Krzysztof Kozlowski Signed-off-by: Alexandre Mergnat --- Fix MTK color correction binding The fallback compatible has

Re: [PATCH v4] dt-bindings: display: mediatek: clean unnecessary item

2023-03-07 Thread Alexandre Mergnat
Hi Angelo Le mar. 7 mars 2023 à 11:17, AngeloGioacchino Del Regno a écrit : > > Il 07/03/23 11:07, Alexandre Mergnat ha scritto: > > The item which have the mediatek,mt8192-disp-ccorr as const compatible > > already exist above. Merge all compatibles which have the same fall

Re: [PATCH 1/2] drm/mediatek: Add ability to support dynamic connector selection

2023-04-12 Thread Alexandre Mergnat
Hi Jason, Can you give me the based git tree/branch for this series please ? I want to do a non-regression test for mt8365-evk board. Feedback below: On 05/04/2023 16:51, Jason-JH.Lin wrote: 1. Move output drm connector from each ddp_path array to connector array. 2. Add dynamic select availab

Re: [PATCH 02/27] dt-bindings: phy: mediatek, dsi-phy: Add compatible for MT6795 Helio X10

2023-04-12 Thread Alexandre Mergnat
- mediatek,mt8365-mipi-tx Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

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

2023-04-12 Thread Alexandre Mergnat
On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote: Add a compatible string for MediaTek Helio X10 MT6795: similarly to MT8173, this SoC has the gamma LUT registers in DISP_AAL. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH 02/27] dt-bindings: phy: mediatek, dsi-phy: Add compatible for MT6795 Helio X10

2023-04-12 Thread Alexandre Mergnat
On 12/04/2023 15:03, AngeloGioacchino Del Regno wrote: Il 12/04/23 14:59, Alexandre Mergnat ha scritto: On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote: Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses the same DSI PHY as MT8173. Signed-off-by: AngeloGioacchino Del

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

2023-04-12 Thread Alexandre Mergnat
On 12/04/2023 13:27, AngeloGioacchino Del Regno wrote: Add a compatible string for the MediaTek Helio X10 MT6795 SoC, using the same parameters as MT8183. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

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

2023-04-12 Thread Alexandre Mergnat
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. Signed-off-by: Yang Li Reviewed-by: Alexandre Mergnat

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

2023-04-12 Thread Alexandre Mergnat
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. Signed-off-by: Yang Li Reviewed-by: Alexandre Mergnat

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

2023-04-12 Thread Alexandre Mergnat
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. Signed-off-by: Yang Li Reviewed-by: Alexandre Mergnat

[PATCH v5] dt-bindings: display: mediatek: clean unnecessary item

2023-03-09 Thread Alexandre Mergnat
The item which have the mediatek,mt8192-disp-ccorr as const compatible already exist above. Merge all compatibles which have the same fallback under the same item. Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Signed-off-by: Alexandre Mergnat

[PATCH 00/21] Add display support for the MT8365-EVK board.

2023-03-09 Thread Alexandre Mergnat
: linux-ker...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Cc: linux-...@vger.kernel.org Cc: Fabien Parent Cc: Guillaume La Roque Cc: Neil Armstrong Signed-off-by: Alexandre Mergnat --- Alexandre Mergnat (16): dt-bindings: display: mediatek: aal: add binding for MT8365 SoC

[PATCH 02/21] dt-bindings: display: mediatek: ccorr: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Color Correction for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,ccorr.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation

[PATCH 01/21] dt-bindings: display: mediatek: aal: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Adaptive Ambient Light for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,aal.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation

[PATCH 05/21] dt-bindings: display: mediatek: dsi: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Serial Interface for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- .../bindings/display/mediatek/mediatek,dsi.yaml | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git

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

2023-03-09 Thread Alexandre Mergnat
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. Signed-off-by: Fabien Parent Signed-off-by: Alexandre Mergnat

[PATCH 03/21] dt-bindings: display: mediatek: color: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Color for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,color.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 07/21] dt-bindings: display: mediatek: dpi: add binding for MT8365

2023-03-09 Thread Alexandre Mergnat
From: Fabien Parent DPI for MT8365 is compatible with MT8192 but requires an additional clock. Modify the documentation to requires this clock only on MT8365 SoCs. Signed-off-by: Fabien Parent Signed-off-by: Alexandre Mergnat --- .../bindings/display/mediatek/mediatek,dpi.yaml| 48

[PATCH 09/21] dt-bindings: display: mediatek: ovl: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Overlay for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8192 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,ovl.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 08/21] dt-bindings: display: mediatek: gamma: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display GAMMA for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,gamma.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 13/21] dt-bindings: pwm: add binding for mt8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display PWM for MT8365 is compatible with MT8183. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pwm/mediatek

[PATCH 04/21] dt-bindings: display: mediatek: dither: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Dither for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,dither.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree

[PATCH 12/21] dt-bindings: pwm: add power-domains property

2023-03-09 Thread Alexandre Mergnat
According to the Mediatek datasheet, the display PWM block has a power domain. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm

[PATCH 11/21] dt-bindings: display: pannel: add startek kd070fhfid015 binding documentation

2023-03-09 Thread Alexandre Mergnat
The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. Signed-off-by: Alexandre Mergnat --- .../display/panel/startek,kd070fhfid015.yaml | 55 ++ 1 file changed, 55 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH 10/21] dt-bindings: display: mediatek: rdma: add binding for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Display Data Path Read DMA for MT8365 is compatible with another SoC. Then, add MT8365 binding along with MT8183 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/display/mediatek/mediatek,rdma.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation

[PATCH 17/21] arm64: dts: mediatek: add display support for mt8365-evk

2023-03-09 Thread Alexandre Mergnat
;ite,it66121" HDMI bridge support, driven by I2C1. - Setup the Display Parallel Interface. Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365-evk.dts | 204 1 file changed, 204 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365-

[PATCH 18/21] drm/mediatek: dsi: Improves the DSI lane setup robustness

2023-03-09 Thread Alexandre Mergnat
. Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 3b7d13028fb6..35c36cc05c04 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm

[PATCH 14/21] dt-bindings: soc: mediatek: specify which compatible requires clocks property

2023-03-09 Thread Alexandre Mergnat
According to the mtk-mutex.c driver and the SoC DTS, the clock isn't required to work properly for some of MTK SoC. Improve the clock requirement by adding a condition which is function to the compatible. Signed-off-by: Alexandre Mergnat --- .../bindings/soc/mediatek/mediatek,mutex

[PATCH 20/21] drm/mediatek: add MT8365 SoC support

2023-03-09 Thread Alexandre Mergnat
From: Fabien Parent Add DRM support for MT8365 SoC. Signed-off-by: Fabien Parent Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 35 ++ 1 file changed, 35 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b

[PATCH 15/21] dt-bindings: soc: mediatek: add display mutex for MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
Add compatible for the MT8365 SoC. Signed-off-by: Alexandre Mergnat --- Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/soc/mediatek/mediatek,mutex.yaml b/Documentation/devicetree/bindings

[PATCH 19/21] drm/mediatek: dpi: add support for dpi clock

2023-03-09 Thread Alexandre Mergnat
From: Fabien Parent MT8365 requires an additional clock for DPI. Add support for that additional clock. Signed-off-by: Fabien Parent Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/mediatek/mtk_dpi.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a

[PATCH 16/21] arm64: dts: mediatek: add display blocks support for the MT8365 SoC

2023-03-09 Thread Alexandre Mergnat
) Signed-off-by: Alexandre Mergnat --- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 147 +++ 1 file changed, 147 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8365.dtsi b/arch/arm64/boot/dts/mediatek/mt8365.dtsi index 1034b652dd0f..49d8bf145933 100644 --- a/arch

[PATCH 21/21] panel: startek-kd070fhfid015: add support of this display

2023-03-09 Thread Alexandre Mergnat
From: Guillaume La Roque This driver support the Startek KD070FHFID015, which is a 7-inch TFT LCD display using MIPI DSI interface. Signed-off-by: Guillaume La Roque Signed-off-by: Alexandre Mergnat --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel

Re: [PATCH 15/21] dt-bindings: soc: mediatek: add display mutex for MT8365 SoC

2023-03-15 Thread Alexandre Mergnat
Le ven. 10 mars 2023 à 09:39, Krzysztof Kozlowski a écrit : > > On 09/03/2023 15:23, Alexandre Mergnat wrote: > > Add compatible for the MT8365 SoC. > > > > Signed-off-by: Alexandre Mergnat > > --- > > Documentation/devicetree/bindings/soc/mediatek/mediatek,

Re: [PATCH 15/21] dt-bindings: soc: mediatek: add display mutex for MT8365 SoC

2023-03-15 Thread Alexandre Mergnat
Maybe "oneOf" should be added at least ? compatible: oneOf: - enum: Regards, Alex Le mer. 15 mars 2023 à 09:01, Alexandre Mergnat a écrit : > > Le ven. 10 mars 2023 à 09:39, Krzysztof Kozlowski > a écrit : > > > > On 09/03/2023 15:23, Alexandre Merg

Re: [PATCH 07/21] dt-bindings: display: mediatek: dpi: add binding for MT8365

2023-03-15 Thread Alexandre Mergnat
Hi Chun-Kuang, Le lun. 13 mars 2023 à 16:17, Chun-Kuang Hu a écrit : > > Hi, Alexandre: > > Alexandre Mergnat 於 2023年3月9日 週四 下午10:23寫道: > > > > From: Fabien Parent > > > > DPI for MT8365 is compatible with MT8192 but requires an additional > > clock.

Re: [PATCH 19/21] drm/mediatek: dpi: add support for dpi clock

2023-03-15 Thread Alexandre Mergnat
Le lun. 13 mars 2023 à 16:21, Chun-Kuang Hu a écrit : > > > > > + dpi->dpi_clk = devm_clk_get_optional(dev, "dpi"); > > For MT8365, DPI clock is not optional, so make sure that MT8365 DPI > should have this clock. This should be check and notified at build time thanks to the device-tree bin

Re: [PATCH 21/21] panel: startek-kd070fhfid015: add support of this display

2023-03-15 Thread Alexandre Mergnat
Hi Neil, Le jeu. 9 mars 2023 à 15:51, Neil Armstrong a écrit : > > + > > +#include > > Is this include needed ? Seems not, I remove it. > > + struct gpio_desc *enable_gpio; > > + struct gpio_desc *reset_gpio; > > + struct gpio_desc *dcdc_en_gpio; > > Isn't this "DCDC" a regulator ?

Re: [PATCH v2] dt-bindings: display: mediatek: Fix the duplicated fallback

2023-03-17 Thread Alexandre Mergnat
Hi Matthias, This version is outdated. Here the last one: https://lore.kernel.org/all/20230306-ccorr-binding-fix-v5-0-6c56aaecc...@baylibre.com/ Regards, Alex Le ven. 17 mars 2023 à 12:25, Matthias Brugger a écrit : > > > > On 06/03/2023 17:15, Alexandre Mergnat wrote: > > T

Re: [PATCH 1/3] drm/mediatek: Use devm_platform_get_and_ioremap_resource()

2023-06-21 Thread Alexandre Mergnat
On 08/06/2023 12:12, AngeloGioacchino Del Regno wrote: Instead of open coding calls to platform_get_resource() followed by devm_ioremap_resource(), perform a single call to the helper devm_platform_get_and_ioremap_resource(). This commit brings no functional changes. Reviewed-by: Alexandre

Re: [PATCH 2/3] drm/mediatek: Use dev_err_probe() in probe functions

2023-06-21 Thread Alexandre Mergnat
On 08/06/2023 12:12, AngeloGioacchino Del Regno wrote: Convert all instances of dev_err() -> return to dev_err_probe() and where it makes sense to, change instances of `return ret` at the end of probe functions to `return 0`, as errors are returned earlier. Reviewed-by: Alexandre Merg

Re: [PATCH 3/3] drm/mediatek: Use devm variant for pm_runtime_enable() when possible

2023-06-21 Thread Alexandre Mergnat
On 08/06/2023 12:12, AngeloGioacchino Del Regno wrote: Simplify the error path of return functions and drop the call to pm_runtime_disable() in remove functions by switching to devm_pm_runtime_enable() where possible. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v3 1/4] drm/mediatek: Remove freeing not dynamic allocated memory

2023-06-21 Thread Alexandre Mergnat
On 21/06/2023 12:22, Jason-JH.Lin wrote: Fixing the coverity issue of: mtk_drm_cmdq_pkt_destroy frees address of mtk_crtc->cmdq_handle So remove the free function. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v3 2/4] drm/mediatek: Add cnt checking for coverity issue

2023-06-21 Thread Alexandre Mergnat
terminator. So change cnt to unsigned int and check its max value. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v3 3/4] drm/mediatek: Add casting before assign

2023-06-21 Thread Alexandre Mergnat
On 21/06/2023 12:22, Jason-JH.Lin wrote: 1. Add casting before assign to avoid the unintentional integer overflow or unintended sign extension. 2. Add a int varriable for multiplier calculation instead of calculating different types multiplier with dma_addr_t varriable directly. Fixes

Re: [PATCH v3 4/4] drm/mediatek: Fix dereference before null check

2023-06-21 Thread Alexandre Mergnat
. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

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

2023-06-23 Thread Alexandre Mergnat
PI_DSI_MODE_NO_EOT_PACKET ? 2 : 0; +    delta += dsi->mode_flags & MIPI_DSI_MODE_NO_EOT_PACKET ? 0 : 2;   horizontal_frontporch_byte = vm->hfront_porch * dsi_tmp_buf_bpp;   horizontal_front_back_byte = horizontal_frontporch_byte + horizontal_backporch_byte; Sounds logic Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs

2023-06-23 Thread Alexandre Mergnat
On 23/06/2023 11:49, AngeloGioacchino Del Regno wrote: This series changes MediaTek CMDQ support to use the mtk-cmdq-helper functions, removing duplicated cmdq setup code in mtk-drm and also removing all instances of `#if IS_REACHABLE(CONFIG_MTK_CMDQ)` while keeping compatibility with both CON

Re: [PATCH v3,2/3] drm/mediatek: dp: Add the audio packet flag to mtk_dp_data struct

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 20/07/2023 10:26, Shuijing Li wrote: The audio packet arrangement function is to only arrange audio. packets into the Hblanking area. In order to align with the HW default setting of mt8195, this function needs to be turned off. -- Regards, Alexandre

Re: [PATCH v3,3/3] drm/mediatek: dp: Add the audio divider to mtk_dp_data struct

2023-07-20 Thread Alexandre Mergnat
DIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_DIV_4(6 << 8) #define AUDIO_M_CODE_MULT_DIV_SEL_DP_ENC0_P0_DIV_8(7 << 8) Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v3,3/3] drm/mediatek: dp: Add the audio divider to mtk_dp_data struct

2023-07-20 Thread Alexandre Mergnat
On 20/07/2023 13:54, AngeloGioacchino Del Regno wrote: Il 20/07/23 12:14, Alexandre Mergnat ha scritto: On 20/07/2023 10:26, Shuijing Li wrote: Due to the difference of HW, different dividers need to be set. Signed-off-by: Shuijing Li Signed-off-by: Jitao Shi --- Changes in v3

Re: [PATCH v3,3/3] drm/mediatek: dp: Add the audio divider to mtk_dp_data struct

2023-07-20 Thread Alexandre Mergnat
On 20/07/2023 14:08, AngeloGioacchino Del Regno wrote: Il 20/07/23 14:07, Alexandre Mergnat ha scritto: On 20/07/2023 13:54, AngeloGioacchino Del Regno wrote: Il 20/07/23 12:14, Alexandre Mergnat ha scritto: On 20/07/2023 10:26, Shuijing Li wrote: Due to the difference of HW

Re: [PATCH v6 06/11] drm/mediatek: dp: Enable event interrupt only when bridge attached

2023-07-20 Thread Alexandre Mergnat
IRQ_NOAUTOEN flag before requesting it at probe time and manage the enablement of the ISR in the .attach() and .detach() handlers for the DP bridge. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v6 07/11] drm/mediatek: dp: Avoid mutex locks if audio is not supported/enabled

2023-07-20 Thread Alexandre Mergnat
ported` is true. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v6 08/11] drm/mediatek: dp: Move PHY registration to new function

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: In preparation for adding support for eDP, move the PHY registration code to a new mtk_dp_register_phy() function for better readability. This commit brings no functional changes. -- Regards, Alexandre

Re: [PATCH v6 09/11] drm/mediatek: dp: Add support for embedded DisplayPort aux-bus

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: For the eDP case we can support using aux-bus on MediaTek DP: this gives us the possibility to declare our panel as generic "panel-edp" which will automatically configure the timings and available

Re: [PATCH v6 10/11] drm/mediatek: dp: Add .wait_hpd_asserted() for AUX bus

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: In order to support usecases in which the panel regulator can be switched on and off to save power, and usecases in which the panel regulator is off at boot, add a .wait_hpd_asserted() callback for the AUX

Re: [PATCH v6 11/11] drm/mediatek: dp: Don't register HPD interrupt handler for eDP case

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: The interrupt handler for HPD is useful only if a display is actually supposed to be hotpluggable, as that manages the machinery to perform cable (un)plug detection, debouncing and setup for re-training

Re: [PATCH v6 01/11] drm/mediatek: dp: Add missing error checks in mtk_dp_parse_capabilities

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: If reading the RX capabilities fails the training pattern will be set wrongly: add error checking for drm_dp_read_dpcd_caps() and return if anything went wrong with it. While at it, also add a less critical

Re: [PATCH v6 02/11] drm/mediatek: dp: Move AUX and panel poweron/off sequence to function

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: Everytime we run bridge detection and/or EDID read we run a poweron and poweroff sequence for both the AUX and the panel; moreover, this is also done when enabling the bridge in the .atomic_enable() callback

Re: [PATCH v6 03/11] drm/mediatek: dp: Change logging to dev for mtk_dp_aux_transfer()

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: Change logging from drm_{err,info}() to dev_{err,info}() in functions mtk_dp_aux_transfer() and mtk_dp_aux_do_transfer(): this will be essential to avoid getting NULL pointer kernel panics if any kind of

Re: [PATCH v6 04/11] drm/mediatek: dp: Use devm variant of drm_bridge_add()

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: In preparation for adding support for aux-bus, which will add a code path that may fail after the drm_bridge_add() call, change that to devm_drm_bridge_add() to simplify failure paths later. -- Regards

Re: [PATCH v6 05/11] drm/mediatek: dp: Move AUX_P0 setting to mtk_dp_initialize_aux_settings()

2023-07-20 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 17/07/2023 16:14, AngeloGioacchino Del Regno wrote: Move the register write to MTK_DP_AUX_P0_3690 to set the AUX reply mode to function mtk_dp_initialize_aux_settings(), as this is effectively part of the DPTX AUX setup sequence. -- Regards, Alexandre

Re: [PATCH 0/3] MediaTek DRM: Clean up CMDQ support and ifdefs

2023-07-21 Thread Alexandre Mergnat
On 19/07/2023 09:41, AngeloGioacchino Del Regno wrote: Il 23/06/23 14:49, Alexandre Mergnat ha scritto: On 23/06/2023 11:49, AngeloGioacchino Del Regno wrote: This series changes MediaTek CMDQ support to use the mtk-cmdq-helper functions, removing duplicated cmdq setup code in mtk-drm and

Re: [PATCH RESEND v6 09/11] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195

2023-07-27 Thread Alexandre Mergnat
Hi Angelo ! On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Add support for 12-bit gamma lookup tables and introduce the first user for it: MT8195. While at it, also reorder the variables in mtk_gamma_set_common() and rename `lut_base` to `lut0_base` to improve readability. Signed-off-by

Re: [PATCH RESEND v6 09/11] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195

2023-07-28 Thread Alexandre Mergnat
Hi Angelo On 27/07/2023 15:06, AngeloGioacchino Del Regno wrote: +/* For 10 bit LUT layout, R/G/B are in the same register */   #define DISP_GAMMA_LUT_10BIT_R    GENMASK(29, 20)   #define DISP_GAMMA_LUT_10BIT_G    GENMASK(19, 10)   #define DISP_GAMMA_LUT_10BIT_B    GENMAS

Re: [PATCH RESEND v6 01/11] drm/mediatek: gamma: Adjust mtk_drm_gamma_set_common parameters

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: From: "Jason-JH.Lin" Adjust the parameters in mtk_drm_gamma_set_common() - add (struct device *dev) to get lut_diff from gamma's driver data - remove (bool lut_diff) and use false as d

Re: [PATCH RESEND v6 02/11] drm/mediatek: gamma: Reduce indentation in mtk_gamma_set_common()

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Invert the check for state->gamma_lut and move it at the beginning of the function to reduce indentation: this prepares the code for keeping readability on later additions. This commit brings no functio

Re: [PATCH RESEND v6 03/11] drm/mediatek: gamma: Support SoC specific LUT size

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Newer SoCs support a bigger Gamma LUT table: wire up a callback to retrieve the correct LUT size for each different Gamma IP. -- Regards, Alexandre

Re: [PATCH RESEND v6 04/11] drm/mediatek: gamma: Improve and simplify HW LUT calculation

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Use drm_color_lut_extract() to avoid open-coding the bits reduction calculations for each color channel and use a struct drm_color_lut to temporarily store the information instead of an array of u32. Also

Re: [PATCH RESEND v6 05/11] drm/mediatek: gamma: Enable the Gamma LUT table only after programming

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Move the write to DISP_GAMMA_CFG to enable the Gamma LUT to after programming the actual table to avoid potential visual glitches during table modification. Note: GAMMA should get enabled in between vblanks

Re: [PATCH RESEND v6 06/11] drm/mediatek: gamma: Use bitfield macros

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Make the code more robust and improve readability by using bitfield macros instead of open coding bit operations. While at it, also add a definition for LUT_BITS_DEFAULT. -- Regards, Alexandre

Re: [PATCH RESEND v6 07/11] drm/mediatek: gamma: Support specifying number of bits per LUT component

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: New SoCs, like MT8195, not only may support bigger lookup tables, but have got a different register layout to support bigger precision: support specifying the number of `lut_bits` for each SoC and use it in

Re: [PATCH RESEND v6 08/11] drm/mediatek: gamma: Support multi-bank gamma LUT

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Newer Gamma IP have got multiple LUT banks: support specifying the size of the LUT banks and handle bank-switching before programming the LUT in mtk_gamma_set_common() in preparation for adding support for

Re: [PATCH RESEND v6 10/11] drm/mediatek: gamma: Make sure relay mode is disabled

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: Disable relay mode at the end of LUT programming to make sure that the processed image goes through. -- Regards, Alexandre

Re: [PATCH RESEND v6 11/11] drm/mediatek: gamma: Program gamma LUT type for descending or rising

2023-07-28 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 27/07/2023 11:46, AngeloGioacchino Del Regno wrote: All of the SoCs that don't have dithering control in the gamma IP have got a GAMMA_LUT_TYPE bit that tells to the IP if the LUT is "descending" (bit set) or "rising" (bit clea

Re: [PATCH RESEND v6 09/11] drm/mediatek: gamma: Add support for 12-bit LUT and MT8195

2023-07-31 Thread Alexandre Mergnat
On 31/07/2023 12:27, AngeloGioacchino Del Regno wrote: Il 28/07/23 14:58, Alexandre Mergnat ha scritto: Hi Angelo On 27/07/2023 15:06, AngeloGioacchino Del Regno wrote: +/* For 10 bit LUT layout, R/G/B are in the same register */   #define DISP_GAMMA_LUT_10BIT_R    GENMASK(29, 20

[PATCH v3 0/3] Add startek-kd070fhfid015 display support

2023-07-31 Thread Alexandre Mergnat
https://lore.kernel.org/all/20230220-display-v1-0-45cbc68e1...@baylibre.com/ Signed-off-by: Alexandre Mergnat --- Changes in v3: - Remove spurious line. - Remove useless ops (enable and disable). - Remove brightness value init because it is set right after using mipi_dsi_dcs_get_display_brigh

[PATCH v3 3/3] arm64: defconfig: enable STARTEK KD070FHFID015 panel

2023-07-31 Thread Alexandre Mergnat
Build Startek KD070FHFID015 panel driver. This MIPI-DSI display can be used for the mt8365-evk board for example. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig

[PATCH v3 1/3] dt-bindings: display: panel: add startek kd070fhfid015 support

2023-07-31 Thread Alexandre Mergnat
The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. Reviewed-by: Conor Dooley Signed-off-by: Alexandre Mergnat --- .../display/panel/startek,kd070fhfid015.yaml | 69 ++ 1 file changed, 69 insertions(+) diff --git a

[PATCH v4 0/3] Add startek-kd070fhfid015 display support

2023-07-31 Thread Alexandre Mergnat
https://lore.kernel.org/all/20230220-display-v1-0-45cbc68e1...@baylibre.com/ Signed-off-by: Alexandre Mergnat --- Changes in v4: - Remove useless function: stk_panel_shutdown. - Align parenthesis for readability. - Link to v3: https://lore.kernel.org/r/20230711-startek_display-v3-0-dc84

[PATCH v4 3/3] arm64: defconfig: enable STARTEK KD070FHFID015 panel

2023-07-31 Thread Alexandre Mergnat
Build Startek KD070FHFID015 panel driver. This MIPI-DSI display can be used for the mt8365-evk board for example. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig

[PATCH v4 1/3] dt-bindings: display: panel: add startek kd070fhfid015 support

2023-07-31 Thread Alexandre Mergnat
The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. Reviewed-by: Conor Dooley Signed-off-by: Alexandre Mergnat --- .../display/panel/startek,kd070fhfid015.yaml | 69 ++ 1 file changed, 69 insertions(+) diff --git a

Re: [PATCH RESEND v4 2/2] drm/mediatek: Fix iommu fault during crtc enabling

2023-08-07 Thread Alexandre Mergnat
Hi Jason, You forgot to put the Reviewed-by got from the V3 in your commit message. On 07/08/2023 03:51, Jason-JH.Lin wrote: The plane_state of drm_atomic_state is not sync to the mtk_plane_state stored in mtk_crtc during crtc enabling. So we need to update the mtk_plane_state stored in mtk_c

Re: [PATCH] drm/mediatek: Fix potential memory leak if vmap() fail

2023-07-06 Thread Alexandre Mergnat
On 26/06/2023 20:58, Sui Jingfeng wrote: Also return -ENOMEM if such a failure happens, the implement should take responsibility for the error handling. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

[PATCH 0/3] Add startek-kd070fhfid015 display support

2023-07-11 Thread Alexandre Mergnat
y macro to increase the readability. - Link to parent serie: [1] [1]: https://lore.kernel.org/all/20230220-display-v1-0-45cbc68e1...@baylibre.com/ Signed-off-by: Alexandre Mergnat --- Alexandre Mergnat (2): dt-bindings: display: panel: add startek kd070fhfid015 support arm64: defconf

[PATCH 1/3] dt-bindings: display: panel: add startek kd070fhfid015 support

2023-07-11 Thread Alexandre Mergnat
The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. Signed-off-by: Alexandre Mergnat --- .../display/panel/startek,kd070fhfid015.yaml | 51 ++ 1 file changed, 51 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH 3/3] arm64: defconfig: enable STARTEK KD070FHFID015 panel

2023-07-11 Thread Alexandre Mergnat
Build Startek KD070FHFID015 panel driver. This MIPI-DSI display can be used for the mt8365-evk board for example. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig

Re: [PATCH 1/3] dt-bindings: display: panel: add startek kd070fhfid015 support

2023-07-12 Thread Alexandre Mergnat
Hi Krzysztof, Thanks for your review On 12/07/2023 07:32, Krzysztof Kozlowski wrote: On 11/07/2023 17:36, Alexandre Mergnat wrote: The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution snip + + dcdc-gpios: true From where does this come? Which schema defines it

Re: [PATCH v3 1/2] drm/mediatek: Fix iommu fault by swapping FBs after updating plane state

2023-07-12 Thread Alexandre Mergnat
avoid using the old FB which could be freed. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

Re: [PATCH v3 2/2] drm/mediatek: Fix iommu fault during crtc enabling

2023-07-12 Thread Alexandre Mergnat
On 10/07/2023 11:32, Jason-JH.Lin wrote: OVL layer should not be enabled before crtc is enabled. The plane_state of drm_atomic_state is not sync to the plane_state stored in mtk_crtc during crtc enabling, so just set all planes to disabled. Reviewed-by: Alexandre Mergnat -- Regards

Re: [PATCH v3 3/4] drm/mediatek: Add casting before assign

2023-07-12 Thread Alexandre Mergnat
d src.y1 are 'int'. That means 'unsigned int' offset will be very big when src.x1 or src.y1 is negative. So I just use 'int' for offset here. Ok Reviewed-by: Alexandre Mergnat -- Regards, Alexandre

[PATCH v2 1/3] dt-bindings: display: panel: add startek kd070fhfid015 support

2023-07-13 Thread Alexandre Mergnat
The Startek KD070FHFID015 is a 7-inch TFT LCD display with a resolution of 1024 x 600 pixels. Reviewed-by: Conor Dooley Signed-off-by: Alexandre Mergnat --- .../display/panel/startek,kd070fhfid015.yaml | 69 ++ 1 file changed, 69 insertions(+) diff --git a

[PATCH v2 0/3] Add startek-kd070fhfid015 display support

2023-07-13 Thread Alexandre Mergnat
c68e1...@baylibre.com/ Signed-off-by: Alexandre Mergnat --- Changes in v2: - Replace "dcdc-gpio" by "enable-gpio" because this pin enable the Power IC supply. Also, this property come from panel-common. - Remove height-mm and width-mm since they are useless here. - Re-order

[PATCH v2 3/3] arm64: defconfig: enable STARTEK KD070FHFID015 panel

2023-07-13 Thread Alexandre Mergnat
Build Startek KD070FHFID015 panel driver. This MIPI-DSI display can be used for the mt8365-evk board for example. Signed-off-by: Alexandre Mergnat --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig

Re: [PATCH v7 12/16] ASoC: codecs: add MT6357 support

2024-09-05 Thread Alexandre Mergnat
Sorry, I'm gonna send a V8 to fix this ASAP On 03/09/2024 19:14, Mark Brown wrote: On Mon, Jul 22, 2024 at 08:53:41AM +0200, amerg...@baylibre.com wrote: From: Nicolas Belin Add the support of MT6357 PMIC audio codec. This breaks the build: /build/stage/linux/sound/soc/codecs/mt6357.c: In

Re: [PATCH] drm/mediatek: Add spinlock for setting vblank event in atomic_begin

2023-09-04 Thread Alexandre Mergnat
Reviewed-by: Alexandre Mergnat On 22/08/2023 15:26, Jason-JH.Lin wrote: Add spinlock protection to avoid race condition on vblank event between mtk_drm_crtc_atomic_begin() and mtk_drm_finish_page_flip(). -- Regards, Alexandre

  1   2   3   4   >