dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	jfalempe@redhat.com, daniel@ffwll.ch, airlied@gmail.com,
	ville.syrjala@linux.intel.com, daniel@fooishbar.org,
	mripard@kernel.org, maarten.lankhorst@linux.intel.com
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v4 2/2] drm/atomic-helper: Replace drm_atomic_helper_check_crtc_state()
Date: Thu, 6 Oct 2022 22:28:12 +0200	[thread overview]
Message-ID: <7bea011f-f1d0-4375-ee1c-f97e12cd3f0a@redhat.com> (raw)
In-Reply-To: <20221005114002.3715-3-tzimmermann@suse.de>

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 ?

Feel free to ignore it though. I particularly don't agree with that
convention anyways, because I think that makes the code more error
prone. But still thought that was worth to point that out.

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


  reply	other threads:[~2022-10-06 20:28 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 [this message]
2022-10-07  7:07     ` Ville Syrjälä
2022-10-07  7:17       ` Javier Martinez Canillas
2022-10-07  7:29         ` Ville Syrjälä
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=7bea011f-f1d0-4375-ee1c-f97e12cd3f0a@redhat.com \
    --to=javierm@redhat.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jfalempe@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.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).