lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object
From
Date
On 12/10/2021 16:23, Neil Armstrong wrote:

>>> +    struct drm_private_obj glob_obj;
>>> +
>>>       struct drm_fb_helper *fbdev;
>>>         struct workqueue_struct *wq;
>>> @@ -88,5 +105,9 @@ struct omap_drm_private {
>>>       void omap_debugfs_init(struct drm_minor *minor);
>>> +struct omap_global_state *__must_check
>>> +omap_get_global_state(struct drm_atomic_state *s);
>>> +struct omap_global_state *
>>> +omap_get_existing_global_state(struct omap_drm_private *priv);
>>
>> These could also be separated by empty lines. At least to my eyes it gets confusing if those declarations are not separated.
>
> Atomic states can be extremely confusing, and hard to track.
> I checked and they do what they are documented for...
>
> The omap_get_existing_global_state() is the most confusing since the result depends if
> we are in an atomic transaction of not.

So here I was just talking about the cosmetics, how the lines above look
like. I have trouble seeing where the function declaration starts and
where it ends without looking closely, as both lines of the declaration
start at the first column, and there are no empty lines between the
declarations.

But now that you mention, yes, the states are confusing =). And this
series is somewhat difficult. I think it's important for future
maintainability to include explanations and comments in this series for
the confusing parts (plane-overlay mapping and state handling, mostly).

Tomi

\
 
 \ /
  Last update: 2021-10-12 15:38    [W:0.064 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site