Skip to contentSkip to conversation

drm/vmwgfx: Add our connectors to sysfs

PATCH New Thomas Hellstrom 1 participant 1 message Dec 3, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: Add our connectors to sysfs

Some user-space apps expects to find them there.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c  |    1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |    2 ++
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |    2 ++
 3 files changed, 5 insertions(+)
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +1 -0
index ecb3d86..03f1c20 100644
@@ -75,6 +75,7 @@ void vmw_display_unit_cleanup(struct vmw_display_unit *du)
 		vmw_surface_unreference(&du->cursor_surface);
 	if (du->cursor_dmabuf)
 		vmw_dmabuf_unreference(&du->cursor_dmabuf);
+	drm_sysfs_connector_remove(&du->connector);
 	drm_crtc_cleanup(&du->crtc);
 	drm_encoder_cleanup(&du->encoder);
 	drm_connector_cleanup(&du->connector);
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +2 -0
index c11ddc5..a055a26 100644
@@ -371,6 +371,8 @@ static int vmw_ldu_init(struct vmw_private *dev_priv, unsigned unit)
 	encoder->possible_crtcs = (1 << unit);
 	encoder->possible_clones = 0;
 
+	(void) drm_sysfs_connector_add(connector);
+
 	drm_crtc_init(dev, crtc, &vmw_legacy_crtc_funcs);
 
 	drm_mode_crtc_set_gamma_size(crtc, 256);
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +2 -0
index 31c6ef3..22406c8 100644
@@ -467,6 +467,8 @@ static int vmw_sou_init(struct vmw_private *dev_priv, unsigned unit)
 	encoder->possible_crtcs = (1 << unit);
 	encoder->possible_clones = 0;
 
+	(void) drm_sysfs_connector_add(connector);
+
 	drm_crtc_init(dev, crtc, &vmw_screen_object_crtc_funcs);
 
 	drm_mode_crtc_set_gamma_size(crtc, 256);
Signature · 1 line
1.7.10.4