[PATCH 15/15] drm/radeon/dp_mst: use connector ref counting

Dave Airlie airlied at gmail.com
Fri Apr 15 05:10:46 UTC 2016


From: Dave Airlie <airlied at redhat.com>

Use connector reference counting in radeon mst code.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 43cffb5..4f1792a 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -242,6 +242,7 @@ radeon_dp_mst_connector_destroy(struct drm_connector *connector)
 
 	drm_encoder_cleanup(&radeon_encoder->base);
 	kfree(radeon_encoder);
+
 	drm_connector_cleanup(connector);
 	kfree(radeon_connector);
 }
@@ -313,11 +314,9 @@ static void radeon_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	drm_modeset_lock_all(dev);
 	/* dpms off */
 	radeon_fb_remove_connector(rdev, connector);
-
-	drm_connector_cleanup(connector);
 	drm_modeset_unlock_all(dev);
 
-	kfree(connector);
+	drm_connector_unreference(connector);
 	DRM_DEBUG_KMS("\n");
 }
 
-- 
2.5.5



More information about the dri-devel mailing list