[PATCH] drm/simpledrm: Drop superfluous primary plane .atomic_check return logic

Javier Martinez Canillas javierm at redhat.com
Mon Sep 5 11:45:01 UTC 2022


On 9/5/22 13:37, Thomas Zimmermann wrote:
> Hi
> 

[...]

>>>> -	return 0;
>>>> +	return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state,
>>>> +						   DRM_PLANE_NO_SCALING,
>>>> +						   DRM_PLANE_NO_SCALING,
>>>> +						   false, false);
>>>
>>> I'm undecided on this change. I know it's correct and more to the point.
>>> But the call's logic is non-intuitive: the call either returns an error
>>> or we have to test ->visible afterwards. So I wrote it explicitly.
>>>
>>
>> Yes, but the check has no effect so I found it even less intuitive. Maybe
>> add a comment then if you wan to keep the current code?
>>   
>>> I saw that your change to ssd130x also uses the pattern. If we find more
>>> such drivers, we could implement the atomic check as a helper. I suggest
>>> drm_plane_helper_atomic_check_fixed() in drm_plane_helper.c
>>>
>>
>> Sure. I can add a preparatory change in v2 that adds that helper and then
>> use it in the follow-up patch.
>>
> 
> Maybe wait for your ssd130x changes to land and then you can convert 
> both drivers to the new helper.
> 

Makes sense. I'll do that.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



More information about the dri-devel mailing list