Re: [PATCH 1/5] drm/rockchip: vop2: Add high color depth support

2025-07-24 Thread Cristian Ciocaltea
Hi Andy, On 7/24/25 11:56 AM, Andy Yan wrote: > > > > Hello Cristian, > 在 2025-07-22 14:16:26,"Cristian Ciocaltea" > 写道: >> Hi Andy, >> >> On 7/22/25 5:24 AM, Andy Yan wrote: >>> >>> Hello Cristian, >>> >>>

Re: [PATCH 1/5] drm/rockchip: vop2: Add high color depth support

2025-07-22 Thread Cristian Ciocaltea
Hi Andy, On 7/22/25 9:55 AM, Andy Yan wrote: > > Hello Cristian, > > 在 2025-07-22 14:16:26,"Cristian Ciocaltea" > 写道: >> Hi Andy, >> >> On 7/22/25 5:24 AM, Andy Yan wrote: >>> >>> Hello Cristian, >>> >>> At 2025

Re: [PATCH 1/5] drm/rockchip: vop2: Add high color depth support

2025-07-21 Thread Cristian Ciocaltea
Hi Andy, On 7/22/25 5:24 AM, Andy Yan wrote: > > Hello Cristian, > > At 2025-07-22 01:39:04, "Cristian Ciocaltea" > wrote: >> Take the bits per color channel into consideration when computing DCLK >> rate. >> >> Signed-off-by: Crist

[PATCH 1/5] drm/rockchip: vop2: Add high color depth support

2025-07-21 Thread Cristian Ciocaltea
Take the bits per color channel into consideration when computing DCLK rate. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip

[PATCH 3/5] drm/rockchip: dw_hdmi_qp: Switch to phy_configure()

2025-07-21 Thread Cristian Ciocaltea
CCF and, instead, prefer the PHY configuration API for this purpose. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 37 +- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c

[PATCH 2/5] drm/bridge: dw-hdmi-qp: Handle platform supported formats and color depth

2025-07-21 Thread Cristian Ciocaltea
current HDMI output format and bpc. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 11 +-- include/drm/bridge/dw_hdmi_qp.h | 4 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi

[PATCH 5/5] drm/rockchip: dw_hdmi_qp: Add high color depth support

2025-07-21 Thread Cristian Ciocaltea
need to adjust it dynamically, i.e. per SoC variant, for now. While setting up .enc_init() callbacks of rockchip_hdmi_qp_ctrl_ops, also replace the unnecessary whitespace chars before .irq_callback() assignments. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_hdmi_qp

[PATCH 4/5] drm/rockchip: dw_hdmi_qp: Use bit macros for RK3576 regs

2025-07-21 Thread Cristian Ciocaltea
other defines which are unlikely to be ever required. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 21 - 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm

[PATCH 0/5] High color depth support for RK3576/RK3588 HDMI output

2025-07-21 Thread Cristian Ciocaltea
: Cristian Ciocaltea --- Cristian Ciocaltea (5): drm/rockchip: vop2: Add high color depth support drm/bridge: dw-hdmi-qp: Handle platform supported formats and color depth drm/rockchip: dw_hdmi_qp: Switch to phy_configure() drm/rockchip: dw_hdmi_qp: Use bit macros for RK3576 regs

Re: [PATCH 8/9] phy: rockchip: phy-rockchip-samsung-hdptx: convert from round_rate() to determine_rate()

2025-07-14 Thread Cristian Ciocaltea
Hi Brian, On 7/10/25 7:07 PM, Brian Masney wrote: > The round_rate() clk ops is deprecated, so migrate this driver from > round_rate() to determine_rate() using the Coccinelle semantic patch > on the cover letter of this series. > > Signed-off-by: Brian Masney > --- > drivers/phy/rockchip/phy-r

[PATCH v2 6/6] arm64: defconfig: Enable DW HDMI QP CEC support

2025-07-09 Thread Cristian Ciocaltea
Enable support for the CEC interface of the Synopsys DesignWare HDMI QP IP block. This is used by all boards based on RK3588 & RK3576 SoCs. Signed-off-by: Cristian Ciocaltea --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/

[PATCH v2 5/6] drm/rockchip: dw_hdmi_qp: Provide ref clock rate in dw_hdmi_qp_plat_data

2025-07-09 Thread Cristian Ciocaltea
In order to support correct initialization of the timer base in the HDMI QP IP block, setup platform data to include the required reference clock rate. While at it, ensure plat_data is zero-initialized in dw_hdmi_qp_rockchip_bind(). Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm

[PATCH v2 4/6] drm/rockchip: dw_hdmi_qp: Provide CEC IRQ in dw_hdmi_qp_plat_data

2025-07-09 Thread Cristian Ciocaltea
In order to support the CEC interface of the DesignWare HDMI QP IP block, setup platform data to include the required IRQ number. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip

[PATCH v2 3/6] drm/rockchip: dw_hdmi_qp: Improve error handling with dev_err_probe()

2025-07-09 Thread Cristian Ciocaltea
dev_err_probe(), which also reduces the code a bit. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 62 ++ 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c b/drivers/gpu/drm

[PATCH v2 1/6] drm/bridge: dw-hdmi-qp: Add CEC support

2025-07-09 Thread Cristian Ciocaltea
CEC IRQ number to be provided by the platform driver. Co-developed-by: Algea Cao Signed-off-by: Algea Cao Co-developed-by: Derek Foreman Signed-off-by: Derek Foreman Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/bridge/synopsys/Kconfig | 8

[PATCH v2 2/6] drm/bridge: dw-hdmi-qp: Fixup timer base setup

2025-07-09 Thread Cristian Ciocaltea
: Cristian Ciocaltea --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 11 --- include/drm/bridge/dw_hdmi_qp.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c index

[PATCH v2 0/6] Add HDMI CEC support to Rockchip RK3588/RK3576 SoCs

2025-07-09 Thread Cristian Ciocaltea
ec-helper-unreg-fix-v1-1-7e7b0eb57...@collabora.com/ Signed-off-by: Cristian Ciocaltea --- Changes in v2: - Collected R-b tag from Dmitry - Restructured the generic bridge patches to not depend on the platform-specific changes and updated cover letter accordingly (Heiko) - Replaced the loop sear

Re: [PATCH 3/5] drm/rockchip: dw_hdmi_qp: Provide ref clock rate in dw_hdmi_qp_plat_data

2025-07-04 Thread Cristian Ciocaltea
Hi Maxime, On 7/4/25 6:07 PM, Maxime Ripard wrote: > On Fri, Jul 04, 2025 at 05:23:24PM +0300, Cristian Ciocaltea wrote: >> In order to support correct initialization of the timer base in the HDMI >> QP IP block, extend the platform data to provide the necessary referenc

Re: [PATCH 1/5] drm/rockchip: dw_hdmi_qp: Provide CEC IRQ in dw_hdmi_qp_plat_data

2025-07-04 Thread Cristian Ciocaltea
Hi Heiko, On 7/4/25 5:37 PM, Heiko Stübner wrote: > Hi Cristian, > > Am Freitag, 4. Juli 2025, 16:23:22 Mitteleuropäische Sommerzeit schrieb > Cristian Ciocaltea: >> In preparation to support the CEC interface of the DesignWare HDMI QP IP >> block, extend the plat

[PATCH 3/5] drm/rockchip: dw_hdmi_qp: Provide ref clock rate in dw_hdmi_qp_plat_data

2025-07-04 Thread Cristian Ciocaltea
In order to support correct initialization of the timer base in the HDMI QP IP block, extend the platform data to provide the necessary reference clock rate. While at it, ensure plat_data is zero-initialized in dw_hdmi_qp_rockchip_bind(). Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm

[PATCH 5/5] arm64: defconfig: Enable DW HDMI QP CEC support

2025-07-04 Thread Cristian Ciocaltea
Enable support for the CEC interface of the Synopsys DesignWare HDMI QP IP block. This is used by all boards based on RK3588 & RK3576 SoCs. Signed-off-by: Cristian Ciocaltea --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/

[PATCH 4/5] drm/bridge: dw-hdmi-qp: Fixup timer base setup

2025-07-04 Thread Cristian Ciocaltea
lower, i.e. 396.00 MHz, and the incorrect register configuration breaks CEC functionality. Set the timer base according to the actual reference clock rate. While at it, also drop the unnecessary empty lines in dw_hdmi_qp_init_hw(). Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/bridge

[PATCH 2/5] drm/bridge: dw-hdmi-qp: Add CEC support

2025-07-04 Thread Cristian Ciocaltea
: Derek Foreman Signed-off-by: Derek Foreman Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/bridge/synopsys/Kconfig | 8 + drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c | 220 +++ drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.h | 14 ++ 3 files changed, 242

[PATCH 1/5] drm/rockchip: dw_hdmi_qp: Provide CEC IRQ in dw_hdmi_qp_plat_data

2025-07-04 Thread Cristian Ciocaltea
In preparation to support the CEC interface of the DesignWare HDMI QP IP block, extend the platform data to provide the required IRQ number. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c | 4 include/drm/bridge/dw_hdmi_qp.h| 1 + 2

[PATCH 0/5] Add HDMI CEC support to Rockchip RK3588/RK3576 SoCs

2025-07-04 Thread Cristian Ciocaltea
test conditions. I've already submitted a patch [1] that seems to correct the problem. [1] https://lore.kernel.org/all/20250703-hdmi-cec-helper-unreg-fix-v1-1-7e7b0eb57...@collabora.com/ Signed-off-by: Cristian Ciocaltea --- Cristian Ciocaltea (5): drm/rockchip: dw_hdmi_qp: Provide C

[PATCH] drm/bridge: Fix kdoc comment for DRM_BRIDGE_OP_HDMI_CEC_ADAPTER

2025-07-04 Thread Cristian Ciocaltea
Correct the kernel-doc comment for DRM_BRIDGE_OP_HDMI_CEC_ADAPTER member of enum drm_bridge_ops. This seems to be just a copy-paste artifact from DRM_BRIDGE_OP_HDMI_CEC_NOTIFIER above. Signed-off-by: Cristian Ciocaltea --- include/drm/drm_bridge.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] drm/bridge: adv7511: Fix DRM_BRIDGE_OP_HDMI_{AUDIO|CEC_ADAPTER} setup

2025-07-04 Thread Cristian Ciocaltea
DRM_BRIDGE_OP_HDMI_AUDIO and DRM_BRIDGE_OP_HDMI_CEC_ADAPTER bridge ops only when the aforementioned kernel config options have been enabled. Fixes: ae01d3183d27 ("drm/bridge: adv7511: switch to the HDMI connector helpers") Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/bridge/adv7511/adv7511

[PATCH] drm/display: hdmi-cec-helper: Fix adapter unregistration

2025-07-03 Thread Cristian Ciocaltea
cec_unregister_adapter() instead of cec_delete_adapter() in the managed release action handler. Fixes: 8b1a8f8b2002 ("drm/display: add CEC helpers code") Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_cec_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [PATCH 13/20] drm/rockchip: dw_hdmi: switch to HWORD_UPDATE* macros

2025-06-13 Thread Cristian Ciocaltea
ts the value to the mask > (like FIELD_PREP et al do), a lot of macro instantiations get easier to > read. > > This was tested on an RK3568 ODROID M1, as well as an RK3399 ROCKPro64. > > Signed-off-by: Nicolas Frattaroli This again LGTM and I could verify the RK3568 related bit

Re: [PATCH 10/20] drm/rockchip: dw_hdmi_qp: switch to HWORD_UPDATE macro

2025-06-13 Thread Cristian Ciocaltea
(RK3588). Will also verify on RK3576 as soon as I get a board (expected next week). Reviewed-by: Cristian Ciocaltea Tested-by: Cristian Ciocaltea

Re: [PATCH 08/20] drm/rockchip: vop2: switch to HWORD_UPDATE macro

2025-06-13 Thread Cristian Ciocaltea
B (RK3588). Hence, Reviewed-by: Cristian Ciocaltea Tested-by: Cristian Ciocaltea

Re: [PATCH 0/3] arm64: dts: rockchip: Fix HDMI output on RK3576

2025-06-12 Thread Cristian Ciocaltea
Hi Nicolas, On 6/12/25 3:13 PM, Nicolas Frattaroli wrote: > On Wednesday, 11 June 2025 23:47:46 Central European Summer Time Cristian > Ciocaltea wrote: >> Since commit c871a311edf0 ("phy: rockchip: samsung-hdptx: Setup TMDS >> char rate via phy_configure_opts_hdmi"

Re: [PATCH 3/3] arm64: dts: rockchip: Add HDMI PHY PLL clock source to VOP2 on rk3576

2025-06-12 Thread Cristian Ciocaltea
On 6/12/25 1:22 PM, Piotr Oniszczuk wrote: > > >> Wiadomość napisana przez Cristian Ciocaltea >> w dniu 11 cze 2025, o godz. 23:47: >> >> Since commit c871a311edf0 ("phy: rockchip: samsung-hdptx: Setup TMDS >> char rate via phy_configure_opts_hdmi"

Re: [PATCH 3/3] arm64: dts: rockchip: Add HDMI PHY PLL clock source to VOP2 on rk3576

2025-06-12 Thread Cristian Ciocaltea
Hi Detlev, On 6/12/25 3:00 AM, Detlev Casanova wrote: > Hi Cristian, > > On Wednesday, 11 June 2025 17:47:49 EDT Cristian Ciocaltea wrote: >> Since commit c871a311edf0 ("phy: rockchip: samsung-hdptx: Setup TMDS >> char rate via phy_configure_opts_hdmi"), the wo

[PATCH 3/3] arm64: dts: rockchip: Add HDMI PHY PLL clock source to VOP2 on rk3576

2025-06-11 Thread Cristian Ciocaltea
t been mainlined yet. Fixes: d74b842cab08 ("arm64: dts: rockchip: Add vop for rk3576") Cc: sta...@vger.kernel.org Signed-off-by: Cristian Ciocaltea --- arch/arm64/boot/dts/rockchip/rk3576.dtsi | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/rock

[PATCH 1/3] dt-bindings: display: vop2: Add optional PLL clock property for rk3576

2025-06-11 Thread Cristian Ciocaltea
tags to facilitate backporting. Fixes: c3b7c5a4d7c1 ("dt-bindings: display: vop2: Add rk3576 support") Cc: sta...@vger.kernel.org Signed-off-by: Cristian Ciocaltea --- .../bindings/display/rockchip/rockchip-vop2.yaml | 56 +- 1 file changed, 44 insertions(+), 12

[PATCH 2/3] arm64: dts: rockchip: Enable HDMI PHY clk provider on rk3576

2025-06-11 Thread Cristian Ciocaltea
: ad0ea230ab2a ("arm64: dts: rockchip: Add hdmi for rk3576") Cc: sta...@vger.kernel.org Signed-off-by: Cristian Ciocaltea --- arch/arm64/boot/dts/rockchip/rk3576.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockc

[PATCH 0/3] arm64: dts: rockchip: Fix HDMI output on RK3576

2025-06-11 Thread Cristian Ciocaltea
is to make use of the HDMI PHY PLL as a more accurate DCLK source in VOP2. It's worth noting a follow-up patch is going to drop the hack from the bridge driver altogether, while switching to HDMI PHY configuration API for setting up the TMDS character rate. Signed-off-by: Cristian Cio

Re: [PATCH v5 00/19] drm/connector: hdmi: Allow using the YUV420 output format

2025-06-02 Thread Cristian Ciocaltea
On 6/2/25 12:09 PM, Maxime Ripard wrote: > On Mon, Jun 02, 2025 at 11:05:16AM +0200, Maxime Ripard wrote: >> On Tue, 27 May 2025 15:11:08 +0300, Cristian Ciocaltea wrote: >>> Provide the basic support to enable using YUV420 as an RGB fallback when >>> computing the b

[PATCH v5 08/19] drm/tests: hdmi: Switch to 'void *' type for EDID data

2025-05-27 Thread Cristian Ciocaltea
Replace 'const char *' with 'const void *' type for current_edid member in struct drm_atomic_helper_connector_hdmi_priv, as well as for the edid parameter of set_connector_edid() function. Suggested-by: Jani Nikula Signed-off-by: Cristian Ciocaltea --- d

[PATCH v5 07/19] drm/tests: hdmi: Replace '[_]MHz' with 'mhz'

2025-05-27 Thread Cristian Ciocaltea
Improve consistency throughout drm_hdmi_state_helper_test.c by replacing the two occurrences of '[_]MHz' substring with 'mhz'. As a bonus, this also helps getting rid of checkpatch.pl complaint: CHECK: Avoid CamelCase: Reviewed-by: Dmitry Baryshkov Signed-off-by

[PATCH v5 16/19] drm/tests: hdmi: Rename max TMDS rate fallback tests

2025-05-27 Thread Cristian Ciocaltea
In preparation to extend the max TMDS rate fallback tests for covering YUV420 output, update the rather generic function names drm_test_check_max_tmds_rate_{bpc|format}_fallback() to properly indicate the intended test cases. Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea

[PATCH v5 18/19] drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode

2025-05-27 Thread Cristian Ciocaltea
Provide tests to verify drm_atomic_helper_connector_hdmi_check() helper fallback behavior when using YUV420 output format. Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 154 + 1 file changed, 154

[PATCH v5 12/19] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector

2025-05-27 Thread Cristian Ciocaltea
rly setup. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c in

[PATCH v5 13/19] drm/tests: hdmi: Switch to drm_atomic_get_new_connector_state() where possible

2025-05-27 Thread Cristian Ciocaltea
the potential EDEADLK error returned by the former helper, which would require restarting the entire atomic sequence. Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[PATCH v5 15/19] drm/tests: hdmi: Add limited range tests for YUV420 mode

2025-05-27 Thread Cristian Ciocaltea
Provide tests to verify that drm_atomic_helper_connector_hdmi_check() helper behaviour when using YUV420 output format is to always set the limited RGB quantization range to 'limited', no matter what the value of Broadcast RGB property is. Acked-by: Maxime Ripard Signed-off-by

[PATCH v5 17/19] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with RGB/YUV

2025-05-27 Thread Cristian Ciocaltea
Create a test EDID advertising the following capabilities: Max resolution: 3840x2160@30Hz with RGB, YUV444, YUV422, YUV420 Max BPC:16 for all modes Max TMDS clock: 340 MHz Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_kunit_edid.h | 114

[PATCH v5 06/19] drm/connector: hdmi: Use YUV420 output format as an RGB fallback

2025-05-27 Thread Cristian Ciocaltea
Try to make use of YUV420 when computing the best output format and RGB cannot be supported for any of the available color depths. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions

[PATCH v5 02/19] drm/connector: hdmi: Add support for YUV420 format verification

2025-05-27 Thread Cristian Ciocaltea
Provide the necessary constraints verification in sink_supports_format_bpc() in order to support handling of YUV420 output format. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 39 +++-- 1 file changed, 36

[PATCH v5 19/19] drm/tests: hdmi: Add test for unsuccessful fallback to YUV420

2025-05-27 Thread Cristian Ciocaltea
Provide test to verify a mandatory fallback to YUV420 output cannot succeed when driver doesn't advertise YUV420 support. Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 87 ++ 1 file changed, 87 inser

[PATCH v5 09/19] drm/tests: hdmi: Add macro to simplify EDID setup

2025-05-27 Thread Cristian Ciocaltea
dropping the open coded EDID setup from all test cases. The actual conversion will be handled separately; for now just apply it to drm_kunit_helper_connector_hdmi_init() helper. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 46

[PATCH v5 00/19] drm/connector: hdmi: Allow using the YUV420 output format

2025-05-27 Thread Cristian Ciocaltea
Provide the basic support to enable using YUV420 as an RGB fallback when computing the best output format and color depth. Signed-off-by: Cristian Ciocaltea --- Changes in v5: - Collected R-b/A-b tags from Maxime and Dmitry - Got rid of the condition inversion in "drm/connector: hdmi: Use Y

[PATCH v5 03/19] drm/connector: hdmi: Improve debug message for supported format

2025-05-27 Thread Cristian Ciocaltea
Add the missing 'bpc' string to the debug message indicating the supported format identified within hdmi_try_format_bpc() helper. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v5 01/19] drm/connector: hdmi: Evaluate limited range after computing format

2025-05-27 Thread Cristian Ciocaltea
hdmi_compute_config() to ensure the verification is done on the updated output format. Fixes: 027d43590649 ("drm/connector: hdmi: Add RGB Quantization Range to the connector state") Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_he

[PATCH v5 14/19] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with YUV420 only

2025-05-27 Thread Cristian Ciocaltea
Create a test EDID advertising the following capabilities: Max resolution: - 1920x1080@60Hz with RGB, YUV444, YUV422 - 3840x2160@30Hz with YUV420 only Max BPC: 16 for all modes Max TMDS clock: 200 MHz Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm

[PATCH v5 11/19] drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs()

2025-05-27 Thread Cristian Ciocaltea
After updating the code to make use of the new EDID setup helper, drm_kunit_helper_connector_hdmi_init_funcs() became unused, hence drop it. Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 10 -- 1 file changed, 10

[PATCH v5 10/19] drm/tests: hdmi: Replace open coded EDID setup

2025-05-27 Thread Cristian Ciocaltea
Make use of the recently introduced macros to reduce boilerplate code around EDID setup. This also helps dropping the redundant calls to set_connector_edid(). No functional changes intended. Acked-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests

[PATCH v5 05/19] drm/connector: hdmi: Factor out bpc and format computation logic

2025-05-27 Thread Cristian Ciocaltea
any functional changes. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 60 - 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu

[PATCH v5 04/19] drm/connector: hdmi: Add missing bpc debug info to hdmi_try_format_bpc()

2025-05-27 Thread Cristian Ciocaltea
The very first debug message in hdmi_try_format_bpc() is incomplete, as it doesn't provide the given bpc in addition to the tried format. Add the missing debug information and drop the now redundant message from hdmi_compute_config(). Reviewed-by: Dmitry Baryshkov Signed-off-by: Cri

Re: [PATCH v4 23/23] drm/tests: hdmi: Add test for unsupported RGB/YUV420 mode

2025-05-22 Thread Cristian Ciocaltea
Hi Maxime, On 5/22/25 7:16 PM, Maxime Ripard wrote: > Hi, > > On Mon, May 19, 2025 at 01:55:10PM +0300, Cristian Ciocaltea wrote: >> On 5/19/25 11:42 AM, Maxime Ripard wrote: >>> Hi, >>> >>> On Fri, Apr 25, 2025 at 01:27:14PM +0300, Cristian Ciocaltea wr

Re: [PATCH v4 14/23] drm/tests: hdmi: Add macro to support EDEADLK handling

2025-05-22 Thread Cristian Ciocaltea
On 5/22/25 7:06 PM, Maxime Ripard wrote: > On Mon, May 19, 2025 at 01:35:46PM +0300, Cristian Ciocaltea wrote: >> On 5/19/25 10:22 AM, Maxime Ripard wrote: >>> Hi, >>> >>> On Fri, Apr 25, 2025 at 01:27:05PM +0300, Cristian Ciocaltea wrote: >>>> In

Re: [PATCH v4 23/23] drm/tests: hdmi: Add test for unsupported RGB/YUV420 mode

2025-05-19 Thread Cristian Ciocaltea
On 5/19/25 11:42 AM, Maxime Ripard wrote: > Hi, > > On Fri, Apr 25, 2025 at 01:27:14PM +0300, Cristian Ciocaltea wrote: >> Provide a test to verify that if both driver and screen support RGB and >> YUV420 formats, drm_atomic_helper_connector_hdmi_check() cannot succeed &g

Re: [PATCH v4 14/23] drm/tests: hdmi: Add macro to support EDEADLK handling

2025-05-19 Thread Cristian Ciocaltea
On 5/19/25 10:22 AM, Maxime Ripard wrote: > Hi, > > On Fri, Apr 25, 2025 at 01:27:05PM +0300, Cristian Ciocaltea wrote: >> In preparation to improve error handling throughout all test cases, >> introduce a macro to check for EDEADLK and automate the restart of the >> at

Re: [PATCH v4 12/23] drm/tests: helpers: Add a (re)try helper variant to enable CRTC connector

2025-05-19 Thread Cristian Ciocaltea
Hi Maxime, On 5/16/25 4:15 PM, Maxime Ripard wrote: > Hi, > > On Fri, Apr 25, 2025 at 01:27:03PM +0300, Cristian Ciocaltea wrote: >> Provide a wrapper over drm_kunit_helper_enable_crtc_connector() to >> automatically handle EDEADLK. >> >> This is going to hel

Re: [PATCH v4 06/23] drm/connector: hdmi: Use YUV420 output format as an RGB fallback

2025-05-15 Thread Cristian Ciocaltea
Hi Maxime, On 5/13/25 4:35 PM, Maxime Ripard wrote: > Hi, > > On Fri, Apr 25, 2025 at 01:26:57PM +0300, Cristian Ciocaltea wrote: >> Try to make use of YUV420 when computing the best output format and >> RGB cannot be supported for any of the available color depths. >>

Re: [PATCH v4 08/23] drm/tests: hdmi: Add macro to simplify EDID setup

2025-04-29 Thread Cristian Ciocaltea
Hi Jani, On 4/28/25 12:52 PM, Jani Nikula wrote: > On Fri, 25 Apr 2025, Cristian Ciocaltea > wrote: >> Factor out the HDMI connector initialization from >> drm_kunit_helper_connector_hdmi_init_funcs() into a common >> __connector_hdmi_init() function, while extend

[PATCH v4 08/23] drm/tests: hdmi: Add macro to simplify EDID setup

2025-04-25 Thread Cristian Ciocaltea
dropping the open coded EDID setup from all test cases. The actual conversion will be handled separately; for now just apply it to drm_kunit_helper_connector_hdmi_init() helper. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 46 +- 1 file

[PATCH v4 12/23] drm/tests: helpers: Add a (re)try helper variant to enable CRTC connector

2025-04-25 Thread Cristian Ciocaltea
Provide a wrapper over drm_kunit_helper_enable_crtc_connector() to automatically handle EDEADLK. This is going to help improve the error handling in a bunch of test cases without open coding the restart of the atomic sequence. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests

[PATCH v4 16/23] drm/tests: hdmi: Switch to drm_atomic_get_new_connector_state() where possible

2025-04-25 Thread Cristian Ciocaltea
the potential EDEADLK error returned by the former helper, which would require restarting the entire atomic sequence. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu

[PATCH v4 14/23] drm/tests: hdmi: Add macro to support EDEADLK handling

2025-04-25 Thread Cristian Ciocaltea
In preparation to improve error handling throughout all test cases, introduce a macro to check for EDEADLK and automate the restart of the atomic sequence. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 10 ++ 1 file changed, 10 insertions

[PATCH v4 19/23] drm/tests: hdmi: Rename max TMDS rate fallback tests

2025-04-25 Thread Cristian Ciocaltea
In preparation to extend the max TMDS rate fallback tests for covering YUV420 output, update the rather generic function names drm_test_check_max_tmds_rate_{bpc|format}_fallback() to properly indicate the intended test cases. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests

[PATCH v4 23/23] drm/tests: hdmi: Add test for unsupported RGB/YUV420 mode

2025-04-25 Thread Cristian Ciocaltea
Provide a test to verify that if both driver and screen support RGB and YUV420 formats, drm_atomic_helper_connector_hdmi_check() cannot succeed when trying to set a mode unsupported by the display. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 66

[PATCH v4 07/23] drm/tests: hdmi: Replace '[_]MHz' with 'mhz'

2025-04-25 Thread Cristian Ciocaltea
Improve consistency throughout drm_hdmi_state_helper_test.c by replacing the two occurrences of '[_]MHz' substring with 'mhz'. As a bonus, this also helps getting rid of checkpatch.pl complaint: CHECK: Avoid CamelCase: Signed-off-by: Cristian Ciocaltea --- d

[PATCH v4 22/23] drm/tests: hdmi: Add test for unsuccessful fallback to YUV420

2025-04-25 Thread Cristian Ciocaltea
Provide test to verify a mandatory fallback to YUV420 output cannot succeed when driver doesn't advertise YUV420 support. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 72 ++ 1 file changed, 72 insertions(+) diff --git a/dr

[PATCH v4 05/23] drm/connector: hdmi: Factor out bpc and format computation logic

2025-04-25 Thread Cristian Ciocaltea
any functional changes. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 60 - 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu

[PATCH v4 09/23] drm/tests: hdmi: Replace open coded EDID setup

2025-04-25 Thread Cristian Ciocaltea
Make use of the recently introduced macros to reduce boilerplate code around EDID setup. This also helps dropping the redundant calls to set_connector_edid(). No functional changes intended. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 234

[PATCH v4 10/23] drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs()

2025-04-25 Thread Cristian Ciocaltea
After updating the code to make use of the new EDID setup helper, drm_kunit_helper_connector_hdmi_init_funcs() became unused, hence drop it. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 10 -- 1 file changed, 10 deletions(-) diff --git a

[PATCH v4 21/23] drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode

2025-04-25 Thread Cristian Ciocaltea
Provide tests to verify drm_atomic_helper_connector_hdmi_check() helper fallback behavior when using YUV420 output format. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 146 + 1 file changed, 146 insertions(+) diff --git a

[PATCH v4 20/23] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with RGB/YUV

2025-04-25 Thread Cristian Ciocaltea
Create a test EDID advertising the following capabilities: Max resolution: 3840x2160@30Hz with RGB, YUV444, YUV422, YUV420 Max BPC:16 for all modes Max TMDS clock: 340 MHz Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_kunit_edid.h | 114

[PATCH v4 18/23] drm/tests: hdmi: Add limited range tests for YUV420 mode

2025-04-25 Thread Cristian Ciocaltea
Provide tests to verify that drm_atomic_helper_connector_hdmi_check() helper behaviour when using YUV420 output format is to always set the limited RGB quantization range to 'limited', no matter what the value of Broadcast RGB property is. Signed-off-by: Cristian Ciocaltea --- drive

[PATCH v4 13/23] drm/tests: hdmi: Switch to drm_kunit_helper_try_enable_crtc_connector()

2025-04-25 Thread Cristian Ciocaltea
Enable automatic handling of EDEADLK by switching from drm_kunit_helper_enable_crtc_connector() to drm_kunit_helper_try_enable_crtc_connector(). Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 180 ++--- 1 file changed, 88 insertions

[PATCH v4 17/23] drm/tests: hdmi: Provide EDID supporting 4K@30Hz with YUV420 only

2025-04-25 Thread Cristian Ciocaltea
Create a test EDID advertising the following capabilities: Max resolution: - 1920x1080@60Hz with RGB, YUV444, YUV422 - 3840x2160@30Hz with YUV420 only Max BPC: 16 for all modes Max TMDS clock: 200 MHz Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_kunit_edid.h | 118

[PATCH v4 00/23] drm/connector: hdmi: Allow using the YUV420 output format

2025-04-25 Thread Cristian Ciocaltea
Provide the basic support to enable using YUV420 as an RGB fallback when computing the best output format and color depth. Signed-off-by: Cristian Ciocaltea --- Changes in v4: - Collected R-b tags from Maxime and Dmitry - Squashed "drm/connector: hdmi: Rename hdmi_compute_format() int

[PATCH v4 11/23] drm/tests: hdmi: Setup ycbcr_420_allowed before initializing connector

2025-04-25 Thread Cristian Ciocaltea
rly setup. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c in

[PATCH v4 15/23] drm/tests: hdmi: Restart atomic sequence on EDEADLK

2025-04-25 Thread Cristian Ciocaltea
Make use of the newly introduced drm_kunit_atomic_restart_on_deadlock() helper to handle EDEADLK errors throughout all test cases. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a

[PATCH v4 03/23] drm/connector: hdmi: Improve debug message for supported format

2025-04-25 Thread Cristian Ciocaltea
Add the missing 'bpc' string to the debug message indicating the supported format identified within hdmi_try_format_bpc() helper. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH v4 06/23] drm/connector: hdmi: Use YUV420 output format as an RGB fallback

2025-04-25 Thread Cristian Ciocaltea
Try to make use of YUV420 when computing the best output format and RGB cannot be supported for any of the available color depths. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions

[PATCH v4 04/23] drm/connector: hdmi: Add missing bpc debug info to hdmi_try_format_bpc()

2025-04-25 Thread Cristian Ciocaltea
The very first debug message in hdmi_try_format_bpc() is incomplete, as it doesn't provide the given bpc in addition to the tried format. Add the missing debug information and drop the now redundant message from hdmi_compute_config(). Reviewed-by: Dmitry Baryshkov Signed-off-by: Cri

[PATCH v4 02/23] drm/connector: hdmi: Add support for YUV420 format verification

2025-04-25 Thread Cristian Ciocaltea
Provide the necessary constraints verification in sink_supports_format_bpc() in order to support handling of YUV420 output format. Reviewed-by: Maxime Ripard Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 39 +++-- 1 file changed, 36

[PATCH v4 01/23] drm/connector: hdmi: Evaluate limited range after computing format

2025-04-25 Thread Cristian Ciocaltea
hdmi_compute_config() to ensure the verification is done on the updated output format. Fixes: 027d43590649 ("drm/connector: hdmi: Add RGB Quantization Range to the connector state") Reviewed-by: Dmitry Baryshkov Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/display/drm_hdmi_state_he

Re: [PATCH v2 11/34] drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Cristian Ciocaltea
On 4/24/25 9:59 PM, Luca Ceresoli wrote: > This is the new API for allocating DRM bridges. > > Signed-off-by: Luca Ceresoli > > --- > > Cc: Cristian Ciocaltea > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +++ > 1 file changed, 3 insertions(+

Re: [PATCH v3 15/15] drm/tests: hdmi: Add test for unsuccessful forced fallback to YUV420

2025-04-10 Thread Cristian Ciocaltea
On 4/10/25 12:21 PM, Maxime Ripard wrote: > Hi, > > On Wed, Mar 26, 2025 at 12:20:04PM +0200, Cristian Ciocaltea wrote: >> Provide test to verify a forced fallback to YUV420 output cannot succeed >> when driver doesn't advertise YUV420 support. >> >

Re: [PATCH v3 07/15] drm/connector: hdmi: Use YUV420 output format as an RGB fallback

2025-04-10 Thread Cristian Ciocaltea
On 4/9/25 6:09 PM, Maxime Ripard wrote: > On Wed, Mar 26, 2025 at 12:19:56PM +0200, Cristian Ciocaltea wrote: >> Try to make use of YUV420 when computing the best output format and >> RGB cannot be supported for any of the available color depths. >> >> Signed

Re: [PATCH v3 06/15] drm/connector: hdmi: Factor out bpc and format computation logic

2025-04-10 Thread Cristian Ciocaltea
Hi Maxime, On 4/9/25 6:02 PM, Maxime Ripard wrote: > Hi, > > On Wed, Mar 26, 2025 at 12:19:55PM +0200, Cristian Ciocaltea wrote: >> In preparation to support fallback to an alternative output format, e.g. >> YUV420, when RGB cannot be used for any of the available color de

Re: [PATCH v3 13/15] drm/tests: hdmi: Add limited range tests for YUV420 mode

2025-04-10 Thread Cristian Ciocaltea
On 4/10/25 10:18 AM, Maxime Ripard wrote: > On Wed, Mar 26, 2025 at 12:20:02PM +0200, Cristian Ciocaltea wrote: >> Provide tests to verify that drm_atomic_helper_connector_hdmi_check() >> helper behaviour when using YUV420 output format is to always set the >> limited RGB

Re: [PATCH v3 09/15] drm/tests: hdmi: Fixup CamelCase warning

2025-04-10 Thread Cristian Ciocaltea
On 4/9/25 6:13 PM, Maxime Ripard wrote: > On Wed, Mar 26, 2025 at 12:19:58PM +0200, Cristian Ciocaltea wrote: >> Rename the reject_100_MHz_connector_hdmi_funcs variable to make >> checkpatch.pl happy: >> >> CHECK: Avoid CamelCase: >

Re: [PATCH v3 14/15] drm/tests: hdmi: Add max TMDS rate fallback tests for YUV420 mode

2025-04-10 Thread Cristian Ciocaltea
On 4/10/25 11:35 AM, Maxime Ripard wrote: > On Wed, Mar 26, 2025 at 12:20:03PM +0200, Cristian Ciocaltea wrote: >> Provide tests to verify drm_atomic_helper_connector_hdmi_check() helper >> fallback behavior when using YUV420 output. >> >> Also rename drm_test_chec

Re: [PATCH v3 11/15] drm/tests: hdmi: Drop unused drm_kunit_helper_connector_hdmi_init_funcs()

2025-04-10 Thread Cristian Ciocaltea
On 4/9/25 6:24 PM, Maxime Ripard wrote: > On Wed, Mar 26, 2025 at 12:20:00PM +0200, Cristian Ciocaltea wrote: >> After updating the code to make use of the new EDID setup helpers, >> drm_kunit_helper_connector_hdmi_init_funcs() became unused, hence drop >> it. >>

Re: [PATCH v3 10/15] drm/tests: hdmi: Replace open coded EDID setup

2025-04-10 Thread Cristian Ciocaltea
On 4/9/25 6:15 PM, Maxime Ripard wrote: > On Wed, Mar 26, 2025 at 12:19:59PM +0200, Cristian Ciocaltea wrote: >> Make use of the recently introduced macros to reduce boilerplate code >> around EDID setup. This also helps dropping the redundant calls to >> set_connector_edid()

[PATCH v3 08/15] drm/tests: hdmi: Add macros to simplify EDID setup

2025-03-26 Thread Cristian Ciocaltea
Introduce a few macros to facilitate setting custom (i.e. non-default) EDID data during connector initialization. The actual conversion to use the new helpers is handled separately. Signed-off-by: Cristian Ciocaltea --- drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 43

  1   2   3   4   >