This is the opposite function of drm_mode_group_init. It will be needed to properly cleanup the render node after removing it. v2: - add planes Signed-off-by: Ilija Hadzic <ihadzic@xxxxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/drm_crtc.c | 11 +++++++++++ include/drm/drm_crtc.h | 1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 78f2b96..cce3d25 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -947,6 +947,17 @@ int drm_mode_group_init(struct drm_mode_group *group, int total_objects) } EXPORT_SYMBOL(drm_mode_group_init); +void drm_mode_group_fini(struct drm_mode_group *group) +{ + kfree(group->id_list); + group->id_list = NULL; + group->num_crtcs = 0; + group->num_connectors = 0; + group->num_encoders = 0; + group->num_planes = 0; +} +EXPORT_SYMBOL(drm_mode_group_fini); + int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group) { diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 939fed1..7c1227b 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -852,6 +852,7 @@ extern char *drm_get_tv_subconnector_name(int val); extern char *drm_get_tv_select_name(int val); extern void drm_fb_release(struct drm_file *file_priv); extern int drm_mode_group_init(struct drm_mode_group *group, int total_objects); +extern void drm_mode_group_fini(struct drm_mode_group *group); extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); extern struct edid *drm_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter); -- 1.7.8.5 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel