dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/4] drm: drm_dev_set_unique private, again
Date: Wed, 28 Mar 2018 09:18:54 +0200	[thread overview]
Message-ID: <20180328071854.GC14155@phenom.ffwll.local> (raw)
In-Reply-To: <20180328012451.31479-4-emil.l.velikov@gmail.com>

On Wed, Mar 28, 2018 at 02:24:51AM +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
> 
> As of last commit we hide this from the drivers.
> 
> Effectively reverts commit a6b5fac59cb216ac906f02300d3630c24520d9ef.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>

Yay!

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

> ---
>  drivers/gpu/drm/drm_drv.c | 38 ++++++++++++++------------------------
>  include/drm/drm_drv.h     |  3 ---
>  2 files changed, 14 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 88da984ff9eb..26e360a0e50c 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -266,10 +266,9 @@ void drm_minor_release(struct drm_minor *minor)
>   * callbacks implemented by the driver. The driver then needs to initialize all
>   * the various subsystems for the drm device like memory management, vblank
>   * handling, modesetting support and intial output configuration plus obviously
> - * initialize all the corresponding hardware bits. An important part of this is
> - * also calling drm_dev_set_unique() to set the userspace-visible unique name of
> - * this device instance. Finally when everything is up and running and ready for
> - * userspace the device instance can be published using drm_dev_register().
> + * initialize all the corresponding hardware bits. Finally when everything is up
> + * and running and ready for userspace the device instance can be published
> + * using drm_dev_register().
>   *
>   * There is also deprecated support for initalizing device instances using
>   * bus-specific helpers and the &drm_driver.load callback. But due to
> @@ -290,6 +289,17 @@ void drm_minor_release(struct drm_minor *minor)
>   * structure, which is supported through drm_dev_init().
>   */
>  
> +static int drm_dev_set_unique(struct drm_device *dev, const char *name)
> +{
> +	if (!name)
> +		return -EINVAL;
> +
> +	kfree(dev->unique);
> +	dev->unique = kstrdup(name, GFP_KERNEL);
> +
> +	return dev->unique ? 0 : -ENOMEM;
> +}
> +
>  /**
>   * drm_put_dev - Unregister and release a DRM device
>   * @dev: DRM device
> @@ -840,26 +850,6 @@ void drm_dev_unregister(struct drm_device *dev)
>  }
>  EXPORT_SYMBOL(drm_dev_unregister);
>  
> -/**
> - * drm_dev_set_unique - Set the unique name of a DRM device
> - * @dev: device of which to set the unique name
> - * @name: unique name
> - *
> - * Sets the unique name of a DRM device using the specified string. Drivers
> - * can use this at driver probe time if the unique name of the devices they
> - * drive is static.
> - *
> - * Return: 0 on success or a negative error code on failure.
> - */
> -int drm_dev_set_unique(struct drm_device *dev, const char *name)
> -{
> -	kfree(dev->unique);
> -	dev->unique = kstrdup(name, GFP_KERNEL);
> -
> -	return dev->unique ? 0 : -ENOMEM;
> -}
> -EXPORT_SYMBOL(drm_dev_set_unique);
> -
>  /*
>   * DRM Core
>   * The DRM core module initializes all global DRM objects and makes them
> diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
> index d32b688eb346..3e6671fc9ced 100644
> --- a/include/drm/drm_drv.h
> +++ b/include/drm/drm_drv.h
> @@ -642,7 +642,4 @@ static inline int drm_dev_is_unplugged(struct drm_device *dev)
>  }
>  
>  
> -int drm_dev_set_unique(struct drm_device *dev, const char *name);
> -
> -
>  #endif
> -- 
> 2.16.0
> 

-- 
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:[~2018-03-28  7:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28  1:24 [PATCH 1/4] drm/vgem: Fix vgem_init to get drm device avaliable Emil Velikov
2018-03-28  1:24 ` [PATCH 2/4] drm: BUG_ON if passing NULL parent to drm_dev_init Emil Velikov
2018-03-28  7:17   ` Daniel Vetter
2018-03-28  1:24 ` [PATCH 3/4] drm/virtio: remove drm_dev_set_unique workaround Emil Velikov
2018-03-28  7:18   ` Daniel Vetter
2018-03-28 10:27   ` Laszlo Ersek
2018-03-28 14:35     ` Emil Velikov
2018-03-29 11:17       ` Laszlo Ersek
2018-04-03 17:13         ` Emil Velikov
2018-04-04 17:29           ` Laszlo Ersek
2018-04-06 12:15             ` Laszlo Ersek
2018-04-06 12:56               ` Emil Velikov
2018-04-09  8:26                 ` Daniel Vetter
2018-04-09 10:24                   ` Emil Velikov
2018-04-09 11:25                     ` Emil Velikov
2018-04-13 15:45                       ` Daniel Vetter
2018-04-06 13:06               ` Gerd Hoffmann
2018-03-28  1:24 ` [PATCH 4/4] drm: drm_dev_set_unique private, again Emil Velikov
2018-03-28  7:18   ` Daniel Vetter [this message]
2018-03-28  7:16 ` [PATCH 1/4] drm/vgem: Fix vgem_init to get drm device avaliable Daniel Vetter
2018-03-28 14:45   ` Emil Velikov
2018-03-28 14:49 ` Chris Wilson
2018-03-28 15:11   ` Emil Velikov
2018-03-29  7:17     ` Daniel Vetter
2018-04-04 10:46       ` Emil Velikov
2018-04-04 12:07         ` 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=20180328071854.GC14155@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.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;
as well as URLs for NNTP newsgroup(s).