[PATCH 1/5] drm: Unexport drm_connector_register_all()
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 > Cc: David Airlie > Cc: Daniel Vetter > Cc: dri-devel at 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
[PATCH 1/5] drm: Unexport drm_connector_register_all()
On Tue, 28 Jun 2016, Chris Wilson 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
[PATCH 1/5] drm: Unexport drm_connector_register_all()
On Mon, Jun 27, 2016 at 04:03:23PM +0300, Jani Nikula wrote: > On Fri, 24 Jun 2016, 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 > > Cc: David Airlie > > Cc: Daniel Vetter > > Cc: dri-devel at 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
[PATCH 1/5] drm: Unexport drm_connector_register_all()
On Fri, 24 Jun 2016, 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 > Cc: David Airlie > Cc: Daniel Vetter > Cc: dri-devel at 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
[PATCH 1/5] drm: Unexport drm_connector_register_all()
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 Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel at 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