[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ccc4b30-0f85-6870-0c60-9897fdb374b9@redhat.com>
Date: Fri, 23 Sep 2022 11:16:00 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Ville Syrjälä <ville.syrjala@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org,
Thomas Zimmermann <tzimmermann@...e.de>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drm/ssd130x: Use drm_atomic_get_new_plane_state()
Hello Ville,
On 9/23/22 11:05, Ville Syrjälä wrote:
> On Fri, Sep 23, 2022 at 10:34:47AM +0200, Javier Martinez Canillas wrote:
>> The struct drm_plane .state shouldn't be accessed directly but instead the
>> drm_atomic_get_new_plane_state() helper function should be used.
>>
>> This is based on a similar patch from Thomas Zimmermann for the simpledrm
>> driver. No functional changes.
>>
>> Suggested-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
>> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
>
Thanks.
> I wonder how many naked obj->state dereferences are still
> left in places where they should be using the get_{new,old}()
> stuff. Might have to write a bit of cocci to find out...
>
>
> Btw on a somewhat related note, I've been thinking about bringing
> for_each_crtc_in_state() & co. back (got removed in commit
> 77ac3b00b131 ("drm/atomic: Remove deprecated accessor macros"))
> but this time without any object state iterator variable. Now that
> we're more often just plumbing the full atomic state through I
> think there are bunch of places that don't need the object state(s)
> within the loop at all, so having to have those variables around
> makes the whole thing a bit noisy. Also IIRC we had to add some
> (void) casts into the current macros to hide some compiler warnings
> about unused variables. Could get rid of at least some of those extra
> casts again.
>
> I don't suppose there's anyone interested in doing that so I don't
> have to? ;)
>
Maybe you can add an entry in Documentation/gpu/todo.rst, explaining
this and putting yourself as a contact?
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
Powered by blists - more mailing lists