All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lyude Paul <lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: sunpeng.li-5C7GfCeVMHo@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: jerry.zuo-5C7GfCeVMHo@public.gmane.org,
	ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
Subject: Re: [PATCH 1/3] drm/dp: Use non-cyclic idr
Date: Wed, 24 Apr 2019 13:25:08 -0400	[thread overview]
Message-ID: <33ab15bf358f2ea9bb5a14de8418004eef3f275a.camel@redhat.com> (raw)
In-Reply-To: <1555977388-14203-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>

lgtm

Reviewed-by: Lyude Paul <lyude@redhat.com>

On Mon, 2019-04-22 at 19:56 -0400, sunpeng.li@amd.com wrote:
> From: Leo Li <sunpeng.li@amd.com>
> 
> In preparation for adding aux devices for DP MST, make the IDR
> non-cyclic. That way, hotplug cycling MST devices won't needlessly
> increment the minor version index.
> 
> Signed-off-by: Leo Li <sunpeng.li@amd.com>
> ---
>  drivers/gpu/drm/drm_dp_aux_dev.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_dp_aux_dev.c
> b/drivers/gpu/drm/drm_dp_aux_dev.c
> index 0e4f25d..6d84611 100644
> --- a/drivers/gpu/drm/drm_dp_aux_dev.c
> +++ b/drivers/gpu/drm/drm_dp_aux_dev.c
> @@ -80,8 +80,7 @@ static struct drm_dp_aux_dev *alloc_drm_dp_aux_dev(struct
> drm_dp_aux *aux)
>  	kref_init(&aux_dev->refcount);
>  
>  	mutex_lock(&aux_idr_mutex);
> -	index = idr_alloc_cyclic(&aux_idr, aux_dev, 0, DRM_AUX_MINORS,
> -				 GFP_KERNEL);
> +	index = idr_alloc(&aux_idr, aux_dev, 0, DRM_AUX_MINORS, GFP_KERNEL);
>  	mutex_unlock(&aux_idr_mutex);
>  	if (index < 0) {
>  		kfree(aux_dev);
-- 
Cheers,
	Lyude Paul

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2019-04-24 17:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 23:56 [PATCH 1/3] drm/dp: Use non-cyclic idr sunpeng.li
2019-04-22 23:56 ` [PATCH 2/3] drm/dp_mst: Expose build_mst_prop_path() sunpeng.li
2019-04-23 14:52   ` Ville Syrjälä
2019-04-24 17:26   ` Lyude Paul
     [not found]     ` <4575edc89d88122baf2cf8dd1e12ea34a69cbb7b.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2019-04-24 20:40       ` Li, Sun peng (Leo)
     [not found]         ` <d45af824-bda7-a0d4-0a6d-b51c199c3412-5C7GfCeVMHo@public.gmane.org>
2019-04-24 20:52           ` Ville Syrjälä
     [not found]             ` <20190424205221.GJ1747-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-04-24 20:55               ` Lyude Paul
2019-04-22 23:56 ` [PATCH 3/3] drm/dp_mst: Register AUX devices for MST ports sunpeng.li
2019-04-23 14:49 ` [PATCH 1/3] drm/dp: Use non-cyclic idr Ville Syrjälä
     [not found] ` <1555977388-14203-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2019-04-24 17:25   ` Lyude Paul [this message]

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=33ab15bf358f2ea9bb5a14de8418004eef3f275a.camel@redhat.com \
    --to=lyude-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=jerry.zuo-5C7GfCeVMHo@public.gmane.org \
    --cc=sunpeng.li-5C7GfCeVMHo@public.gmane.org \
    --cc=ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.