All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] drm: Unexport drm_connector_register_all()
@ 2016-06-24 14:36 Chris Wilson
  2016-06-24 14:36   ` Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Chris Wilson @ 2016-06-24 14:36 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

This has now been removed from all drivers as it is performed centrally
as a part of device registration for modesetting drivers. With the last
user gone, we can unexport it from the DRM module.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/drm_crtc.c | 19 +------------------
 include/drm/drm_crtc.h     |  1 -
 2 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 1190638a3d53..c660ea28cf26 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1109,23 +1109,7 @@ void drm_connector_unregister(struct drm_connector *connector)
 }
 EXPORT_SYMBOL(drm_connector_unregister);
 
-/**
- * drm_connector_register_all - register all connectors
- * @dev: drm device
- *
- * This function registers all connectors in sysfs and other places so that
- * userspace can start to access them. drm_connector_register_all() is called
- * automatically from drm_dev_register() to complete the device registration,
- * if they don't call drm_connector_register() on each connector individually.
- *
- * When a device is unplugged and should be removed from userspace access,
- * call drm_connector_unregister_all(), which is the inverse of this
- * function.
- *
- * Returns:
- * Zero on success, error code on failure.
- */
-int drm_connector_register_all(struct drm_device *dev)
+static int drm_connector_register_all(struct drm_device *dev)
 {
 	struct drm_connector *connector;
 	int ret;
@@ -1147,7 +1131,6 @@ err:
 	drm_connector_unregister_all(dev);
 	return ret;
 }
-EXPORT_SYMBOL(drm_connector_register_all);
 
 /**
  * drm_connector_unregister_all - unregister connector userspace interfaces
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index e6ed7018e290..ddaa7243af55 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -2589,7 +2589,6 @@ static inline unsigned drm_connector_index(struct drm_connector *connector)
 }
 
 /* helpers to {un}register all connectors from sysfs for device */
-extern int drm_connector_register_all(struct drm_device *dev);
 extern void drm_connector_unregister_all(struct drm_device *dev);
 
 extern __printf(5, 6)
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] drm/sun4i: Remove redundant call to drm_connector_unregister_all()
  2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
@ 2016-06-24 14:36   ` Chris Wilson
  2016-06-24 14:36 ` [PATCH 3/5] drm: Do a full device unregister when unplugging Chris Wilson
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2016-06-24 14:36 UTC (permalink / raw)
  To: linux-arm-kernel

drm_connector_unregister_all() is automatically called by
drm_dev_unregister() and so the manual call can be dropped.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: dri-devel at lists.freedesktop.org
Cc: linux-arm-kernel at lists.infradead.org
---
 drivers/gpu/drm/sun4i/sun4i_drv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 5b89940edcb1..b22acc68d3b2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -185,7 +185,6 @@ static void sun4i_drv_unbind(struct device *dev)
 {
 	struct drm_device *drm = dev_get_drvdata(dev);
 
-	drm_connector_unregister_all(drm);
 	drm_dev_unregister(drm);
 	drm_kms_helper_poll_fini(drm);
 	sun4i_framebuffer_free(drm);
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/5] drm/sun4i: Remove redundant call to drm_connector_unregister_all()
@ 2016-06-24 14:36   ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2016-06-24 14:36 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel

drm_connector_unregister_all() is automatically called by
drm_dev_unregister() and so the manual call can be dropped.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-arm-kernel@lists.infradead.org
---
 drivers/gpu/drm/sun4i/sun4i_drv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index 5b89940edcb1..b22acc68d3b2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -185,7 +185,6 @@ static void sun4i_drv_unbind(struct device *dev)
 {
 	struct drm_device *drm = dev_get_drvdata(dev);
 
-	drm_connector_unregister_all(drm);
 	drm_dev_unregister(drm);
 	drm_kms_helper_poll_fini(drm);
 	sun4i_framebuffer_free(drm);
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/5] drm: Do a full device unregister when unplugging
  2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
  2016-06-24 14:36   ` Chris Wilson
@ 2016-06-24 14:36 ` Chris Wilson
  2016-06-24 14:36 ` [PATCH 4/5] drm/udl: Unplugging a device now unregisters it Chris Wilson
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2016-06-24 14:36 UTC (permalink / raw)
  To: dri-devel
  Cc: Daniel Vetter, Alexey Brodkin, Amitoj Kaur Chawla, Laurent Pinchart

Rather than do a partial unregister of just the minors, unregister the
device (drm_dev_unregister(), and so remove all userspace interfaces,
when the device is unplugged (drm_unplug_dev()).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/drm_drv.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index aead9ffcbe29..be27ed36f56e 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -362,9 +362,7 @@ EXPORT_SYMBOL(drm_put_dev);
 void drm_unplug_dev(struct drm_device *dev)
 {
 	/* for a USB device */
-	drm_minor_unregister(dev, DRM_MINOR_LEGACY);
-	drm_minor_unregister(dev, DRM_MINOR_RENDER);
-	drm_minor_unregister(dev, DRM_MINOR_CONTROL);
+	drm_dev_unregister(dev);
 
 	mutex_lock(&drm_global_mutex);
 
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/5] drm/udl: Unplugging a device now unregisters it
  2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
  2016-06-24 14:36   ` Chris Wilson
  2016-06-24 14:36 ` [PATCH 3/5] drm: Do a full device unregister when unplugging Chris Wilson
@ 2016-06-24 14:36 ` Chris Wilson
  2016-06-24 14:36 ` [PATCH 5/5] drm: Unexport drm_connector_unregister_all() Chris Wilson
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2016-06-24 14:36 UTC (permalink / raw)
  To: dri-devel
  Cc: Daniel Vetter, Alexey Brodkin, Amitoj Kaur Chawla, Laurent Pinchart

Rather than manually perform our unregistration actions before shutting
down the device, move them to drm_unplug_dev().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Cc: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/udl/udl_drv.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c
index c20408940cd0..17d34e0edbdd 100644
--- a/drivers/gpu/drm/udl/udl_drv.c
+++ b/drivers/gpu/drm/udl/udl_drv.c
@@ -94,7 +94,6 @@ static void udl_usb_disconnect(struct usb_interface *interface)
 	struct drm_device *dev = usb_get_intfdata(interface);
 
 	drm_kms_helper_poll_disable(dev);
-	drm_connector_unregister_all(dev);
 	udl_fbdev_unplug(dev);
 	udl_drop_usb(dev);
 	drm_unplug_dev(dev);
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/5] drm: Unexport drm_connector_unregister_all()
  2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
                   ` (2 preceding siblings ...)
  2016-06-24 14:36 ` [PATCH 4/5] drm/udl: Unplugging a device now unregisters it Chris Wilson
@ 2016-06-24 14:36 ` Chris Wilson
  2016-06-27 13:03 ` [PATCH 1/5] drm: Unexport drm_connector_register_all() Jani Nikula
  2016-07-12 11:03 ` Daniel Vetter
  5 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2016-06-24 14:36 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter

This has now been removed from all drivers as it is performed centrally
as a part of device unregistration for modesetting drivers. With the last
user gone, we can unexport it from the DRM module. That requires us to
move the code slightly to avoid the need for a forward declaration.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/drm_crtc.c | 29 +++++++++--------------------
 include/drm/drm_crtc.h     |  3 ---
 2 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index c660ea28cf26..3ed866b02cbf 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1109,6 +1109,15 @@ void drm_connector_unregister(struct drm_connector *connector)
 }
 EXPORT_SYMBOL(drm_connector_unregister);
 
+static void drm_connector_unregister_all(struct drm_device *dev)
+{
+	struct drm_connector *connector;
+
+	/* FIXME: taking the mode config mutex ends up in a clash with sysfs */
+	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
+		drm_connector_unregister(connector);
+}
+
 static int drm_connector_register_all(struct drm_device *dev)
 {
 	struct drm_connector *connector;
@@ -1132,26 +1141,6 @@ err:
 	return ret;
 }
 
-/**
- * drm_connector_unregister_all - unregister connector userspace interfaces
- * @dev: drm device
- *
- * This functions unregisters all connectors from sysfs and other places so
- * that userspace can no longer access them. Drivers should call this as the
- * first step tearing down the device instace, or when the underlying
- * physical device disappeared (e.g. USB unplug), right before calling
- * drm_dev_unregister().
- */
-void drm_connector_unregister_all(struct drm_device *dev)
-{
-	struct drm_connector *connector;
-
-	/* FIXME: taking the mode config mutex ends up in a clash with sysfs */
-	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
-		drm_connector_unregister(connector);
-}
-EXPORT_SYMBOL(drm_connector_unregister_all);
-
 static int drm_encoder_register_all(struct drm_device *dev)
 {
 	struct drm_encoder *encoder;
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index ddaa7243af55..b1e72322ebd6 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -2588,9 +2588,6 @@ static inline unsigned drm_connector_index(struct drm_connector *connector)
 	return connector->connector_id;
 }
 
-/* helpers to {un}register all connectors from sysfs for device */
-extern void drm_connector_unregister_all(struct drm_device *dev);
-
 extern __printf(5, 6)
 int drm_encoder_init(struct drm_device *dev,
 		     struct drm_encoder *encoder,
-- 
2.8.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] drm: Unexport drm_connector_register_all()
  2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
                   ` (3 preceding siblings ...)
  2016-06-24 14:36 ` [PATCH 5/5] drm: Unexport drm_connector_unregister_all() Chris Wilson
@ 2016-06-27 13:03 ` Jani Nikula
  2016-06-28  7:25   ` Chris Wilson
  2016-07-12 11:03 ` Daniel Vetter
  5 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2016-06-27 13:03 UTC (permalink / raw)
  To: Chris Wilson, dri-devel; +Cc: Daniel Vetter

On Fri, 24 Jun 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> This has now been removed from all drivers as it is performed centrally
> as a part of device registration for modesetting drivers. With the last
> user gone, we can unexport it from the DRM module.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org
> ---
>  drivers/gpu/drm/drm_crtc.c | 19 +------------------
>  include/drm/drm_crtc.h     |  1 -
>  2 files changed, 1 insertion(+), 19 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 1190638a3d53..c660ea28cf26 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1109,23 +1109,7 @@ void drm_connector_unregister(struct drm_connector *connector)
>  }
>  EXPORT_SYMBOL(drm_connector_unregister);
>  
> -/**
> - * drm_connector_register_all - register all connectors
> - * @dev: drm device
> - *
> - * This function registers all connectors in sysfs and other places so that
> - * userspace can start to access them. drm_connector_register_all() is called
> - * automatically from drm_dev_register() to complete the device registration,

Bikeshed, why throw away the documentation when you could just tweak it
to reflect reality?

Just cut from here...

> - * if they don't call drm_connector_register() on each connector individually.
> - *
> - * When a device is unplugged and should be removed from userspace access,
> - * call drm_connector_unregister_all(), which is the inverse of this
> - * function.
> - *

...to here?

BR,
Jani.

> - * Returns:
> - * Zero on success, error code on failure.
> - */
> -int drm_connector_register_all(struct drm_device *dev)
> +static int drm_connector_register_all(struct drm_device *dev)
>  {
>  	struct drm_connector *connector;
>  	int ret;
> @@ -1147,7 +1131,6 @@ err:
>  	drm_connector_unregister_all(dev);
>  	return ret;
>  }
> -EXPORT_SYMBOL(drm_connector_register_all);
>  
>  /**
>   * drm_connector_unregister_all - unregister connector userspace interfaces
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index e6ed7018e290..ddaa7243af55 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -2589,7 +2589,6 @@ static inline unsigned drm_connector_index(struct drm_connector *connector)
>  }
>  
>  /* helpers to {un}register all connectors from sysfs for device */
> -extern int drm_connector_register_all(struct drm_device *dev);
>  extern void drm_connector_unregister_all(struct drm_device *dev);
>  
>  extern __printf(5, 6)

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] drm: Unexport drm_connector_register_all()
  2016-06-27 13:03 ` [PATCH 1/5] drm: Unexport drm_connector_register_all() Jani Nikula
@ 2016-06-28  7:25   ` Chris Wilson
  2016-06-28  8:14     ` Jani Nikula
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2016-06-28  7:25 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Daniel Vetter, dri-devel

On Mon, Jun 27, 2016 at 04:03:23PM +0300, Jani Nikula wrote:
> On Fri, 24 Jun 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > This has now been removed from all drivers as it is performed centrally
> > as a part of device registration for modesetting drivers. With the last
> > user gone, we can unexport it from the DRM module.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: David Airlie <airlied@linux.ie>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > Cc: dri-devel@lists.freedesktop.org
> > ---
> >  drivers/gpu/drm/drm_crtc.c | 19 +------------------
> >  include/drm/drm_crtc.h     |  1 -
> >  2 files changed, 1 insertion(+), 19 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index 1190638a3d53..c660ea28cf26 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -1109,23 +1109,7 @@ void drm_connector_unregister(struct drm_connector *connector)
> >  }
> >  EXPORT_SYMBOL(drm_connector_unregister);
> >  
> > -/**
> > - * drm_connector_register_all - register all connectors
> > - * @dev: drm device
> > - *
> > - * This function registers all connectors in sysfs and other places so that
> > - * userspace can start to access them. drm_connector_register_all() is called
> > - * automatically from drm_dev_register() to complete the device registration,
> 
> Bikeshed, why throw away the documentation when you could just tweak it
> to reflect reality?

Because Daniel only wanted the public interface in the DRM docs to avoid
confusion. Drivers should only be calling drm_connector_register to
handle dynamic configuration changes.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] drm: Unexport drm_connector_register_all()
  2016-06-28  7:25   ` Chris Wilson
@ 2016-06-28  8:14     ` Jani Nikula
  0 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2016-06-28  8:14 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, dri-devel

On Tue, 28 Jun 2016, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>> Bikeshed, why throw away the documentation when you could just tweak it
>> to reflect reality?
>
> Because Daniel only wanted the public interface in the DRM docs to avoid
> confusion. Drivers should only be calling drm_connector_register to
> handle dynamic configuration changes.

Fair enough.

Jani.

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/5] drm: Unexport drm_connector_register_all()
  2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
                   ` (4 preceding siblings ...)
  2016-06-27 13:03 ` [PATCH 1/5] drm: Unexport drm_connector_register_all() Jani Nikula
@ 2016-07-12 11:03 ` Daniel Vetter
  5 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2016-07-12 11:03 UTC (permalink / raw)
  To: Chris Wilson; +Cc: Daniel Vetter, dri-devel

On Fri, Jun 24, 2016 at 03:36:18PM +0100, Chris Wilson wrote:
> This has now been removed from all drivers as it is performed centrally
> as a part of device registration for modesetting drivers. With the last
> user gone, we can unexport it from the DRM module.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: dri-devel@lists.freedesktop.org

Merged patches 1,3&4 from this series. Need to backmerge drm-next first to
apply the sun4i one, and drm-intel-next for the last one. Please poke me
in a week again.
-Daniel

> ---
>  drivers/gpu/drm/drm_crtc.c | 19 +------------------
>  include/drm/drm_crtc.h     |  1 -
>  2 files changed, 1 insertion(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 1190638a3d53..c660ea28cf26 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1109,23 +1109,7 @@ void drm_connector_unregister(struct drm_connector *connector)
>  }
>  EXPORT_SYMBOL(drm_connector_unregister);
>  
> -/**
> - * drm_connector_register_all - register all connectors
> - * @dev: drm device
> - *
> - * This function registers all connectors in sysfs and other places so that
> - * userspace can start to access them. drm_connector_register_all() is called
> - * automatically from drm_dev_register() to complete the device registration,
> - * if they don't call drm_connector_register() on each connector individually.
> - *
> - * When a device is unplugged and should be removed from userspace access,
> - * call drm_connector_unregister_all(), which is the inverse of this
> - * function.
> - *
> - * Returns:
> - * Zero on success, error code on failure.
> - */
> -int drm_connector_register_all(struct drm_device *dev)
> +static int drm_connector_register_all(struct drm_device *dev)
>  {
>  	struct drm_connector *connector;
>  	int ret;
> @@ -1147,7 +1131,6 @@ err:
>  	drm_connector_unregister_all(dev);
>  	return ret;
>  }
> -EXPORT_SYMBOL(drm_connector_register_all);
>  
>  /**
>   * drm_connector_unregister_all - unregister connector userspace interfaces
> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> index e6ed7018e290..ddaa7243af55 100644
> --- a/include/drm/drm_crtc.h
> +++ b/include/drm/drm_crtc.h
> @@ -2589,7 +2589,6 @@ static inline unsigned drm_connector_index(struct drm_connector *connector)
>  }
>  
>  /* helpers to {un}register all connectors from sysfs for device */
> -extern int drm_connector_register_all(struct drm_device *dev);
>  extern void drm_connector_unregister_all(struct drm_device *dev);
>  
>  extern __printf(5, 6)
> -- 
> 2.8.1
> 

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-12 11:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-24 14:36 [PATCH 1/5] drm: Unexport drm_connector_register_all() Chris Wilson
2016-06-24 14:36 ` [PATCH 2/5] drm/sun4i: Remove redundant call to drm_connector_unregister_all() Chris Wilson
2016-06-24 14:36   ` Chris Wilson
2016-06-24 14:36 ` [PATCH 3/5] drm: Do a full device unregister when unplugging Chris Wilson
2016-06-24 14:36 ` [PATCH 4/5] drm/udl: Unplugging a device now unregisters it Chris Wilson
2016-06-24 14:36 ` [PATCH 5/5] drm: Unexport drm_connector_unregister_all() Chris Wilson
2016-06-27 13:03 ` [PATCH 1/5] drm: Unexport drm_connector_register_all() Jani Nikula
2016-06-28  7:25   ` Chris Wilson
2016-06-28  8:14     ` Jani Nikula
2016-07-12 11:03 ` Daniel Vetter

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.