From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: jfalempe@redhat.com, Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 2/2] drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state()
Date: Fri, 7 Oct 2022 10:29:42 +0300 [thread overview]
Message-ID: <Yz/VZqQN33gvk1Ab@intel.com> (raw)
In-Reply-To: <890f79b7-4c6b-0f99-f9c7-ba16bb9367a9@redhat.com>
On Fri, Oct 07, 2022 at 09:17:50AM +0200, Javier Martinez Canillas wrote:
> On 10/7/22 09:07, Ville Syrjälä wrote:
> > On Thu, Oct 06, 2022 at 10:28:12PM +0200, Javier Martinez Canillas wrote:
> >> On 10/5/22 13:40, Thomas Zimmermann wrote:
> >>> Rename the atomic helper function drm_atomic_helper_check_crtc_state()
> >>> to drm_atomic_helper_check_crtc_primary_plane() and only check for an
> >>> attached primary plane. Adapt callers.
> >>>
> >>> Instead of having one big function to check for various CRTC state
> >>> conditions, we rather want smaller functions that drivers can pick
> >>> individually.
> >>>
> >>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> >>> ---
> >>
> >> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
> >>
> >> [...]
> >>
> >>> + drm_for_each_plane_mask(plane, dev, crtc_state->plane_mask) {
> >>> + if (plane->type == DRM_PLANE_TYPE_PRIMARY)
> >>> + return 0;
> >>> }
> >>
> >> I believe the code convention is to drop the curly braces when you
> >> have a single statement inside the a loop ?
> >
> > This has two.
> >
>
> No, it has only one that is the if statement. So according to the Linux
> kernel coding style AFAIU it should be written as:
>
> drm_for_each_plane_mask(plane, dev, crtc_state->plane_mask)
> if (plane->type == DRM_PLANE_TYPE_PRIMARY)
> return 0;
That is exactly what it says not to do.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-10-07 7:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 11:40 [PATCH v4 0/2] drm/atomic-helpers: Fix CRTC primary-plane test Thomas Zimmermann
2022-10-05 11:40 ` [PATCH v4 1/2] drm/atomic-helper: Don't allocated plane state in CRTC check Thomas Zimmermann
2022-10-06 20:18 ` Javier Martinez Canillas
2022-10-07 6:55 ` Thomas Zimmermann
2022-10-05 11:40 ` [PATCH v4 2/2] drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state() Thomas Zimmermann
2022-10-06 20:28 ` Javier Martinez Canillas
2022-10-07 7:07 ` Ville Syrjälä
2022-10-07 7:17 ` Javier Martinez Canillas
2022-10-07 7:29 ` Ville Syrjälä [this message]
2022-10-07 7:41 ` Javier Martinez Canillas
2022-10-07 8:06 ` Thomas Zimmermann
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=Yz/VZqQN33gvk1Ab@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=jfalempe@redhat.com \
--cc=tzimmermann@suse.de \
/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).