Skip to contentSkip to conversation

drm/cirrus: Add missing drm_connector_unregister()

PATCH In review Takashi Iwai 2 participants 3 messages Jul 18, 2017 – Jul 19, 2017

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

PATCH 1/1 drm/cirrus: Add missing drm_connector_unregister()

From: Egbert Eich <[email protected]>

When destroying connector unregister it.

---
 drivers/gpu/drm/cirrus/cirrus_mode.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/cirrus/cirrus_mode.c +1 -0
index 53f6f0f84206..e5531887646b 100644
@@ -502,6 +502,7 @@ static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector
 
 static void cirrus_connector_destroy(struct drm_connector *connector)
 {
+	drm_connector_unregister(connector);
 	drm_connector_cleanup(connector);
 	kfree(connector);
 }
Signature · 6 lines
2.13.2

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 6 lines · Takashi Iwai

From: Egbert Eich <[email protected]>

When destroying connector unregister it.

drm_dev_unregister unregisters all connectors too. Explicitly calling drm_connector_unregister should only be needed when you
a) screwed up your unload sequence. Get rid of ->unload and make sure you call drm_dev_unregister first to fix this properly
b) hot-unplug. Doesn't apply to cirrus.

I think this can/should be just dropped.
-Daniel

Quoted 19 lines
---
 drivers/gpu/drm/cirrus/cirrus_mode.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/cirrus/cirrus_mode.c +1 -0
index 53f6f0f84206..e5531887646b 100644
@@ -502,6 +502,7 @@ static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector
 
 static void cirrus_connector_destroy(struct drm_connector *connector)
 {
+	drm_connector_unregister(connector);
 	drm_connector_cleanup(connector);
 	kfree(connector);
 }
Signature · 1 line
2.13.2
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 9 lines · Daniel Vetter
Quoted 6 lines · Takashi Iwai

From: Egbert Eich <[email protected]>

When destroying connector unregister it.

Quoted 7 lines

drm_dev_unregister unregisters all connectors too. Explicitly calling drm_connector_unregister should only be needed when you
a) screwed up your unload sequence. Get rid of ->unload and make sure you call drm_dev_unregister first to fix this properly
b) hot-unplug. Doesn't apply to cirrus.

I think this can/should be just dropped.

OK, please drop this one.
Thanks for clarification!

Takashi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel