linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, khilman@baylibre.com,
	Benoit Parrot <bparrot@ti.com>
Subject: Re: [PATCH v5 5/8] drm/omap: Add global state as a private atomic object
Date: Tue, 12 Oct 2021 16:38:20 +0300	[thread overview]
Message-ID: <00ad704f-cd01-cfc2-0418-1cb0561c41a5@ideasonboard.com> (raw)
In-Reply-To: <ab06e379-1579-2352-3525-dbdca6a94f9b@baylibre.com>

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

  reply	other threads:[~2021-10-12 13:38 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23  7:06 [PATCH v5 0/8] drm/omap: Add virtual-planes support Neil Armstrong
2021-09-23  7:06 ` [PATCH v5 1/8] drm/omap: Add ability to check if requested plane modes can be supported Neil Armstrong
2021-10-12  7:21   ` Tomi Valkeinen
2021-10-12  8:32     ` Neil Armstrong
2021-09-23  7:06 ` [PATCH v5 2/8] drm/omap: Add ovl checking funcs to dispc_ops Neil Armstrong
2021-09-23  7:06 ` [PATCH v5 3/8] drm/omap: introduce omap_hw_overlay Neil Armstrong
2021-10-12  7:59   ` Tomi Valkeinen
2021-10-12  8:47     ` Neil Armstrong
2021-09-23  7:06 ` [PATCH v5 4/8] drm/omap: omap_plane: subclass drm_plane_state Neil Armstrong
2021-10-12  8:13   ` Tomi Valkeinen
2021-10-12  8:56     ` Neil Armstrong
2021-09-23  7:06 ` [PATCH v5 5/8] drm/omap: Add global state as a private atomic object Neil Armstrong
2021-10-12 10:44   ` Tomi Valkeinen
2021-10-12 13:23     ` Neil Armstrong
2021-10-12 13:38       ` Tomi Valkeinen [this message]
2021-10-12 15:41         ` Neil Armstrong
2021-09-23  7:06 ` [PATCH v5 6/8] drm/omap: dynamically assign hw overlays to planes Neil Armstrong
2021-10-12 13:34   ` Tomi Valkeinen
2021-10-12 14:45     ` Neil Armstrong
2021-09-23  7:07 ` [PATCH v5 7/8] drm/omap: add plane_atomic_print_state support Neil Armstrong
2021-09-23  7:07 ` [PATCH v5 8/8] drm/omap: Add a 'right overlay' to plane state Neil Armstrong
2021-10-06  8:17 ` [PATCH v5 0/8] drm/omap: Add virtual-planes support Neil Armstrong
2021-10-06 12:48   ` Tomi Valkeinen
2021-10-12  7:15 ` Tomi Valkeinen
2021-10-12  8:30   ` Neil Armstrong
2021-10-12 10:36     ` Tomi Valkeinen
2021-10-12 13:27       ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00ad704f-cd01-cfc2-0418-1cb0561c41a5@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --cc=bparrot@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=khilman@baylibre.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).