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

Maxime Ripard mripard at kernel.org
Wed Apr 9 15:24:58 UTC 2025


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.
> 
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea at collabora.com>
> ---
>  drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> index 7b2aaee5009ce58e6edf2649e2182c43ba834523..1e32694041277a541f0f8941d9c35e8ca9264599 100644
> --- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> +++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
> @@ -207,9 +207,6 @@ connector_hdmi_init_with_edid_funcs(struct kunit *test,
>  	return priv;
>  }
>  
> -#define drm_kunit_helper_connector_hdmi_init_funcs(test, formats, max_bpc, funcs)		\
> -	connector_hdmi_init_with_edid_funcs(test, formats, max_bpc, funcs, NULL, 0)
> -

Oh, so there's still one we don't need.

I really don't like that back and forth. I think we can avoid it by doing something like:

- Create a common __connector_hdmi_init function out of drm_kunit_helper_connector_hdmi_init.

- Add an EDID parameter to that common function. The API of drm_kunit_helper_connector_hdmi_init and
  drm_kunit_helper_connector_hdmi_init_funcs doesn't need to change at that point.

- Create a _with_edid_funcs macro. Note that only that one needs to be a macro.

- Convert the users to _with_edid_funcs, and drop drm_kunit_helper_connector_hdmi_init_funcs.

Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20250409/1fdd8c90/attachment-0001.sig>


More information about the dri-devel mailing list