lkml.org 
[lkml]   [2021]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 02/11] drm: Rename plane atomic_check state names
From
Date


Am 19.02.21 um 16:12 schrieb Maxime Ripard:
> Hi Thomas,
>
> Thanks for your review!
>
> On Fri, Feb 19, 2021 at 03:49:22PM +0100, Thomas Zimmermann wrote:
>>> diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
>>> index 075508051b5f..1873a155bb26 100644
>>> --- a/drivers/gpu/drm/imx/ipuv3-plane.c
>>> +++ b/drivers/gpu/drm/imx/ipuv3-plane.c
>>> @@ -337,12 +337,12 @@ static const struct drm_plane_funcs ipu_plane_funcs = {
>>> };
>>> static int ipu_plane_atomic_check(struct drm_plane *plane,
>>> - struct drm_plane_state *state)
>>> + struct drm_plane_state *new_state)
>>
>> This function uses a different naming convention then the others?
>>
>>> {
>>> struct drm_plane_state *old_state = plane->state;
>
> So, the function already had a variable named old_state, so I was
> actually trying to make the drivers consistent here: having one variable
> with old_state and new_plane_state felt weird.
>
> The heuristic is thus to use the convention of the driver if one exists
> already, and if there's none pick new_plane_state.
>
> It makes it indeed inconsistent across drivers, but it felt more natural
> to be consistent within a single driver.

Makes sense.

>
> Maxime
>

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-02-22 10:05    [W:0.047 / U:3.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site