All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Dave Airlie <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 06/12] drm/legacy: move map_hash create/destroy into inlines
Date: Tue, 23 Apr 2019 20:58:22 +0200	[thread overview]
Message-ID: <20190423185822.GI9857@phenom.ffwll.local> (raw)
In-Reply-To: <20190423184511.GB9857@phenom.ffwll.local>

On Tue, Apr 23, 2019 at 08:45:11PM +0200, Daniel Vetter wrote:
> On Tue, Apr 23, 2019 at 12:00:35PM +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> > 
> > This allows them to be removed later.
> > 
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> 
> vmwgfx still uses these? Is the plan to burn that down :-)
> 
> Probably easier to add a todo.rst item to clean that up than do it
> yourself.

With the insight of later patches telling me what you plan to do:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> -Daniel
> 
> > ---
> >  drivers/gpu/drm/drm_drv.c    |  7 +++----
> >  drivers/gpu/drm/drm_legacy.h | 10 ++++++++++
> >  2 files changed, 13 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 15b0fd5adaaf..18f45f9a955c 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -692,10 +692,9 @@ int drm_dev_init(struct drm_device *dev,
> >  	if (ret)
> >  		goto err_minors;
> >  
> > -	ret = drm_ht_create(&dev->map_hash, 12);
> > +	ret = drm_legacy_create_map_hash(dev);
> >  	if (ret)
> >  		goto err_minors;
> > -
> >  	drm_legacy_ctxbitmap_init(dev);
> >  
> >  	if (drm_core_check_feature(dev, DRIVER_GEM)) {
> > @@ -717,7 +716,7 @@ int drm_dev_init(struct drm_device *dev,
> >  		drm_gem_destroy(dev);
> >  err_ctxbitmap:
> >  	drm_legacy_ctxbitmap_cleanup(dev);
> > -	drm_ht_remove(&dev->map_hash);
> > +	drm_legacy_remove_map_hash(dev);
> >  err_minors:
> >  	drm_minor_free(dev, DRM_MINOR_PRIMARY);
> >  	drm_minor_free(dev, DRM_MINOR_RENDER);
> > @@ -792,7 +791,7 @@ void drm_dev_fini(struct drm_device *dev)
> >  		drm_gem_destroy(dev);
> >  
> >  	drm_legacy_ctxbitmap_cleanup(dev);
> > -	drm_ht_remove(&dev->map_hash);
> > +	drm_legacy_remove_map_hash(dev);
> >  	drm_fs_inode_free(dev->anon_inode);
> >  
> >  	drm_minor_free(dev, DRM_MINOR_PRIMARY);
> > diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h
> > index 974c2be6bcd5..ef419d500e51 100644
> > --- a/drivers/gpu/drm/drm_legacy.h
> > +++ b/drivers/gpu/drm/drm_legacy.h
> > @@ -63,6 +63,16 @@ int drm_legacy_getsareactx(struct drm_device *d, void *v, struct drm_file *f);
> >  
> >  #define DRM_MAP_HASH_OFFSET 0x10000000
> >  
> > +static inline int drm_legacy_create_map_hash(struct drm_device *dev)
> > +{
> > +	return drm_ht_create(&dev->map_hash, 12);
> > +}
> > +
> > +static inline void drm_legacy_remove_map_hash(struct drm_device *dev)
> > +{
> > +	drm_ht_remove(&dev->map_hash);
> > +}
> > +
> >  int drm_legacy_getmap_ioctl(struct drm_device *dev, void *data,
> >  			    struct drm_file *file_priv);
> >  int drm_legacy_addmap_ioctl(struct drm_device *d, void *v, struct drm_file *f);
> > -- 
> > 2.20.1
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch

-- 
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

  reply	other threads:[~2019-04-23 18:58 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23  2:00 drm: make legacy support code optional Dave Airlie
2019-04-23  2:00 ` [PATCH 01/12] drm/nouveau: add kconfig option to turn off nouveau legacy contexts. (v2) Dave Airlie
2019-04-23  2:00 ` [PATCH 02/12] drm/legacy: move drm_legacy_master_rmmaps to non-driver legacy header Dave Airlie
2019-04-23  2:00 ` [PATCH 03/12] drm/legacy: move map cleanups into drm_bufs.c Dave Airlie
2019-04-23  2:00 ` [PATCH 04/12] drm/radeon: drop unused ati pcigart include Dave Airlie
2019-04-23 13:07   ` Christian König
2019-04-23  2:00 ` [PATCH 05/12] drm/legacy: move lock cleanup for master into lock file Dave Airlie
2019-04-23 18:44   ` Daniel Vetter
2019-04-23  2:00 ` [PATCH 06/12] drm/legacy: move map_hash create/destroy into inlines Dave Airlie
2019-04-23 18:45   ` Daniel Vetter
2019-04-23 18:58     ` Daniel Vetter [this message]
2019-04-23 19:48   ` Sam Ravnborg
2019-04-23  2:00 ` [PATCH 07/12] drm/legacy: move init/destroy of struct members " Dave Airlie
2019-04-23 18:46   ` Daniel Vetter
2019-04-23 19:52   ` Sam Ravnborg
2019-04-23  2:00 ` [PATCH 08/12] drm/legacy: move legacy dev reinit into an inline Dave Airlie
2019-04-23 18:47   ` Daniel Vetter
2019-04-23 19:55   ` Sam Ravnborg
2019-04-23  2:00 ` [PATCH 09/12] drm/legacy: don't include any of ati_pcigart in legacy Dave Airlie
2019-04-23 18:50   ` Daniel Vetter
2019-04-23 19:58     ` Sam Ravnborg
2019-04-23  2:00 ` [PATCH 10/12] drm: allow removal of legacy codepaths (v4) Dave Airlie
2019-04-23 18:53   ` Daniel Vetter
2019-04-23  2:00 ` [PATCH 11/12] drm/legacy: place all drm legacy members under DRM_LEGACY Dave Airlie
2019-04-23 18:55   ` Daniel Vetter
2019-04-23  2:00 ` [PATCH 12/12] drm/legacy: remove some legacy lock struct members Dave Airlie
2019-04-23 18:57   ` Daniel Vetter

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=20190423185822.GI9857@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.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.