mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Paul <seanpaul@chromium.org>
To: Keith Packard <keithp@keithp.com>
Cc: Sean Paul <seanpaul@chromium.org>,
	linux-kernel@vger.kernel.org, Dave Airlie <airlied@redhat.com>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm: Add drm_object lease infrastructure [v4]
Date: Mon, 16 Oct 2017 17:05:21 -0400	[thread overview]
Message-ID: <20171016210521.6w2xtnfk2h2lq45b@art_vandelay> (raw)
In-Reply-To: <87mv4qx1rt.fsf@keithp.com>

On Mon, Oct 16, 2017 at 01:42:46PM -0700, Keith Packard wrote:
> Sean Paul <seanpaul@chromium.org> writes:
> 
> 
> > With these nits fixed,
> > Reviewed-by: Sean Paul <seanpaul@chromium.org>
> 
> Like this?
> 

Perfect, thanks!

Sean

> From 0aa52dd5a0873831c79c14942075354c041e5bed Mon Sep 17 00:00:00 2001
> From: Keith Packard <keithp@keithp.com>
> Date: Mon, 16 Oct 2017 13:41:20 -0700
> Subject: [PATCH] drm: Mark functions requiring idr_mutex. Add lockdep to
>  _drm_lease_revoke
> 
> Reasonable suggestions by Sean Paul.
> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
>  drivers/gpu/drm/drm_lease.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_lease.c
> index 88c213f9c4ab..20694c77a2de 100644
> --- a/drivers/gpu/drm/drm_lease.c
> +++ b/drivers/gpu/drm/drm_lease.c
> @@ -58,7 +58,9 @@ _drm_find_lessee(struct drm_master *master, int lessee_id)
>  }
>  
>  /**
> - * _drm_lease_held_master - check to see if an object is leased (or owned) by master
> + * _drm_lease_held_master - check to see if an object is leased (or
> + *                          owned) by master (idr_mutex held)
> + *
>   * @master: the master to check the lease status of
>   * @id: the id to check
>   *
> @@ -77,7 +79,7 @@ static int _drm_lease_held_master(struct drm_master *master, int id)
>  }
>  
>  /**
> - * _drm_has_leased - check to see if an object has been leased
> + * _drm_has_leased - check to see if an object has been leased (idr mutex held)
>   * @master: the master to check the lease status of
>   * @id: the id to check
>   *
> @@ -300,8 +302,8 @@ void drm_lease_destroy(struct drm_master *master)
>  }
>  
>  /**
> - * _drm_lease_revoke - revoke access to all leased objects
> - * @master: the master losing its lease
> + * _drm_lease_revoke - revoke access to all leased objects (idr_mutex held)
> + * @top: the master losing its lease
>   */
>  
>  void _drm_lease_revoke(struct drm_master *top)
> @@ -310,6 +312,7 @@ void _drm_lease_revoke(struct drm_master *top)
>  	void *entry;
>  	struct drm_master *master = top;
>  
> +	lockdep_assert_held(&top->dev->mode_config.idr_mutex);
>  	/*
>  	 * Walk the tree starting at 'top' emptying all leases. Because
>  	 * the tree is fully connected, we can do this without recursing
> -- 
> 2.15.0.rc0
> 

> 
> 
> -- 
> -keith




-- 
Sean Paul, Software Engineer, Google / Chromium OS

  reply	other threads:[~2017-10-16 21:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13  1:56 [PATCH 0/5]: drm: Add drm mode object leases Keith Packard
2017-10-13  1:56 ` [PATCH 1/5] drm/plane: drop num_overlay_planes (v2) Keith Packard
2017-10-16 19:23   ` Sean Paul
2017-10-13  1:56 ` [PATCH 2/5] drm: Add new LEASE debug level Keith Packard
2017-10-16 19:24   ` Sean Paul
2017-10-13  1:56 ` [PATCH 3/5] drm: Add drm_object lease infrastructure [v4] Keith Packard
2017-10-16 19:44   ` Sean Paul
2017-10-16 20:42     ` Keith Packard
2017-10-16 21:05       ` Sean Paul [this message]
2017-10-13  1:56 ` [PATCH 4/5] drm: Check mode object lease status in all master ioctl paths [v3] Keith Packard
2017-10-16 20:34   ` Sean Paul
2017-10-13  1:56 ` [PATCH 5/5] drm: Add four ioctls for managing drm mode object leases [v6] Keith Packard
2017-10-16 21:03   ` Sean Paul
2017-10-16 21:31     ` Keith Packard
2017-10-16  9:13 ` [PATCH 0/5]: drm: Add drm mode object leases Daniel Vetter
2017-10-16 17:52   ` Keith Packard

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=20171016210521.6w2xtnfk2h2lq45b@art_vandelay \
    --to=seanpaul@chromium.org \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®