From: Daniel Vetter <daniel@ffwll.ch>
To: Frank Binns <frank.binns@imgtec.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/8] drm: rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY
Date: Thu, 4 Aug 2016 10:16:55 +0200 [thread overview]
Message-ID: <20160804081655.GU6232@phenom.ffwll.local> (raw)
In-Reply-To: <57A2F295.7070502@imgtec.com>
On Thu, Aug 04, 2016 at 08:45:25AM +0100, Frank Binns wrote:
> On 03/08/16 19:04, David Herrmann wrote:
> > The minor referred to by "DRM_MINOR_LEGACY" is called 'dev->primary' and
> > gets 'cardX' as name assigned. Lets reduce this magnificent number of
> > names for the same concept by one and rename DRM_MINOR_LEGACY to
> > DRM_MINOR_PRIMARY (to match the actual struct-member name).
> >
> > Furthermore, this is in no way a legacy node, so lets not call it that.
> >
> > Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
>
> Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Queued up for -misc, will push out once -rc1 hits.
-Daniel
>
> > ---
> > drivers/gpu/drm/drm_drv.c | 14 +++++++-------
> > include/drm/drmP.h | 4 ++--
> > 2 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index be27ed3..57ce973 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -112,7 +112,7 @@ static struct drm_minor **drm_minor_get_slot(struct drm_device *dev,
> > unsigned int type)
> > {
> > switch (type) {
> > - case DRM_MINOR_LEGACY:
> > + case DRM_MINOR_PRIMARY:
> > return &dev->primary;
> > case DRM_MINOR_RENDER:
> > return &dev->render;
> > @@ -512,7 +512,7 @@ int drm_dev_init(struct drm_device *dev,
> > goto err_minors;
> > }
> > - ret = drm_minor_alloc(dev, DRM_MINOR_LEGACY);
> > + ret = drm_minor_alloc(dev, DRM_MINOR_PRIMARY);
> > if (ret)
> > goto err_minors;
> > @@ -545,7 +545,7 @@ err_ctxbitmap:
> > drm_legacy_ctxbitmap_cleanup(dev);
> > drm_ht_remove(&dev->map_hash);
> > err_minors:
> > - drm_minor_free(dev, DRM_MINOR_LEGACY);
> > + drm_minor_free(dev, DRM_MINOR_PRIMARY);
> > drm_minor_free(dev, DRM_MINOR_RENDER);
> > drm_minor_free(dev, DRM_MINOR_CONTROL);
> > drm_fs_inode_free(dev->anon_inode);
> > @@ -608,7 +608,7 @@ static void drm_dev_release(struct kref *ref)
> > drm_ht_remove(&dev->map_hash);
> > drm_fs_inode_free(dev->anon_inode);
> > - drm_minor_free(dev, DRM_MINOR_LEGACY);
> > + drm_minor_free(dev, DRM_MINOR_PRIMARY);
> > drm_minor_free(dev, DRM_MINOR_RENDER);
> > drm_minor_free(dev, DRM_MINOR_CONTROL);
> > @@ -684,7 +684,7 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> > if (ret)
> > goto err_minors;
> > - ret = drm_minor_register(dev, DRM_MINOR_LEGACY);
> > + ret = drm_minor_register(dev, DRM_MINOR_PRIMARY);
> > if (ret)
> > goto err_minors;
> > @@ -701,7 +701,7 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> > goto out_unlock;
> > err_minors:
> > - drm_minor_unregister(dev, DRM_MINOR_LEGACY);
> > + drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
> > drm_minor_unregister(dev, DRM_MINOR_RENDER);
> > drm_minor_unregister(dev, DRM_MINOR_CONTROL);
> > out_unlock:
> > @@ -741,7 +741,7 @@ void drm_dev_unregister(struct drm_device *dev)
> > list_for_each_entry_safe(r_list, list_temp, &dev->maplist, head)
> > drm_legacy_rmmap(dev, r_list->map);
> > - drm_minor_unregister(dev, DRM_MINOR_LEGACY);
> > + drm_minor_unregister(dev, DRM_MINOR_PRIMARY);
> > drm_minor_unregister(dev, DRM_MINOR_RENDER);
> > drm_minor_unregister(dev, DRM_MINOR_CONTROL);
> > }
> > diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> > index d377865..d488a72 100644
> > --- a/include/drm/drmP.h
> > +++ b/include/drm/drmP.h
> > @@ -642,7 +642,7 @@ struct drm_driver {
> > };
> > enum drm_minor_type {
> > - DRM_MINOR_LEGACY,
> > + DRM_MINOR_PRIMARY,
> > DRM_MINOR_CONTROL,
> > DRM_MINOR_RENDER,
> > DRM_MINOR_CNT,
> > @@ -856,7 +856,7 @@ static inline bool drm_is_control_client(const struct drm_file *file_priv)
> > static inline bool drm_is_primary_client(const struct drm_file *file_priv)
> > {
> > - return file_priv->minor->type == DRM_MINOR_LEGACY;
> > + return file_priv->minor->type == DRM_MINOR_PRIMARY;
> > }
> > /******************************************************************/
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-08-04 8:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 18:04 [PATCH 0/8] DRM File Context Cleanups David Herrmann
2016-08-03 18:04 ` [PATCH 1/8] drm: rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY David Herrmann
2016-08-04 7:45 ` Frank Binns
2016-08-04 8:16 ` Daniel Vetter [this message]
2016-08-03 18:04 ` [PATCH 2/8] drm: remove redundant drm_file->uid David Herrmann
2016-08-03 18:57 ` Chris Wilson
2016-08-03 19:01 ` Chris Wilson
2016-08-04 8:29 ` David Herrmann
2016-08-03 18:04 ` [PATCH 3/8] drm: reduce GETCLIENT to a minimum David Herrmann
2016-08-03 18:04 ` [PATCH 4/8] drm: make vma-manager entries untyped David Herrmann
2016-08-03 18:51 ` Chris Wilson
2016-08-04 9:29 ` Emil Velikov
2016-08-03 18:04 ` [PATCH 5/8] drm: use drm_file to tag vm-bos David Herrmann
2016-08-03 19:08 ` Chris Wilson
2016-08-04 8:16 ` Daniel Vetter
2016-08-04 8:30 ` David Herrmann
2016-08-03 18:04 ` [PATCH 6/8] drm: use priv->pid to deduce task EUID David Herrmann
2016-08-03 18:58 ` Chris Wilson
2016-08-03 18:04 ` [PATCH 7/8] drm: rename drm_file.filp to drm_file.legacy_filp David Herrmann
2016-08-03 18:04 ` [PATCH 8/8] drm: provide management functions for drm_file David Herrmann
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=20160804081655.GU6232@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=frank.binns@imgtec.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