diff options
author | Dave Airlie <airlied@redhat.com> | 2012-02-20 09:16:40 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-03-15 09:35:32 -0400 |
commit | cbc7e22151d99ed1dd7649d268ad3d81b9e6255a (patch) | |
tree | 18ea223883722b1e7b6691f452df640d0775e4d2 /drivers/gpu/drm/drm_crtc.c | |
parent | 1828fe6c5f593b835197edd30a28d80635238ab3 (diff) |
drm/modeset: add helper to unplug all connectors from sysfs
In order to get correct ordering at hot-unplug for userspace,
we need to tear down all the sysfs bits at the correct time.
This adds a helper to allow drivers to remove the sysfs nodes
for all connectors.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index d2d9dc52ac8..79902835d05 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -540,10 +540,21 @@ void drm_connector_cleanup(struct drm_connector *connector) | |||
540 | } | 540 | } |
541 | EXPORT_SYMBOL(drm_connector_cleanup); | 541 | EXPORT_SYMBOL(drm_connector_cleanup); |
542 | 542 | ||
543 | void drm_connector_unplug_all(struct drm_device *dev) | ||
544 | { | ||
545 | struct drm_connector *connector; | ||
546 | |||
547 | /* taking the mode config mutex ends up in a clash with sysfs */ | ||
548 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) | ||
549 | drm_sysfs_connector_remove(connector); | ||
550 | |||
551 | } | ||
552 | EXPORT_SYMBOL(drm_connector_unplug_all); | ||
553 | |||
543 | int drm_encoder_init(struct drm_device *dev, | 554 | int drm_encoder_init(struct drm_device *dev, |
544 | struct drm_encoder *encoder, | 555 | struct drm_encoder *encoder, |
545 | const struct drm_encoder_funcs *funcs, | 556 | const struct drm_encoder_funcs *funcs, |
546 | int encoder_type) | 557 | int encoder_type) |
547 | { | 558 | { |
548 | int ret; | 559 | int ret; |
549 | 560 | ||