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.
>>
>> Signed-off-by: Cristian Ciocaltea <cristian.ciocal...@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.

Ack, one question though:

The common function and the macro should be part of the same patch, or
you'd like to have it split?

Reply via email to