dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
	Melissa Wen <melissa.srw@gmail.com>,
	outreachy-kernel@googlegroups.com,
	dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: Re: [PATCH] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock
Date: Thu, 22 Apr 2021 17:50:34 +0100	[thread overview]
Message-ID: <20210422165034.GP3596236@casper.infradead.org> (raw)
In-Reply-To: <20210422155951.6314-1-fmdefrancesco@gmail.com>

On Thu, Apr 22, 2021 at 05:59:51PM +0200, Fabio M. De Francesco wrote:
> -		drm_modeset_lock_all(drm_dev);
> -
>  		drm_for_each_crtc(crtc, drm_dev) {
> +			drm_modeset_lock(&crtc->mutex, NULL);
>  			if (crtc->state->active) {
>  				ret = -EBUSY;
> -				break;
>  			}
> +			drm_modeset_unlock(&crtc->mutex);
> +			if (ret < 0)
> +				break;
>  		}
>  
> -		drm_modeset_unlock_all(drm_dev);
> -

I might remove the {} around ret = -EBUSY, but this is good.

Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-22 16:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 15:59 [PATCH] drm/amd/amdgpu/amdgpu_drv.c: Replace drm_modeset_lock_all with drm_modeset_lock Fabio M. De Francesco
2021-04-22 16:50 ` Matthew Wilcox [this message]
2021-04-26 16:11   ` [Outreachy kernel] " Daniel Vetter
2021-04-26 19:06     ` Fabio M. De Francesco

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=20210422165034.GP3596236@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fmdefrancesco@gmail.com \
    --cc=melissa.srw@gmail.com \
    --cc=outreachy-kernel@googlegroups.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).