drm: Remove use of drm_mode_object
Subsystems (2)
PATCH 2/7 drm: Remove use of drm_mode_object
This patch removes the drm_mode_object prints, evaluation and use from drm_display_mode objects used in drm files. It removes dependency from drm_mode_object.
Signed-off-by Shayenne Moura <[email protected]>
--- drivers/gpu/drm/drm_crtc_helper.c | 5 ++--- drivers/gpu/drm/drm_modes.c | 9 --------- 2 files changed, 2 insertions(+), 12 deletions(-)
drivers/gpu/drm/drm_crtc_helper.c +2 -3
@@ -386,9 +386,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,if (!encoder_funcs)continue ; -DRM_DEBUG_KMS ("[ENCODER:%d:%s] set [MODE:%d:%s]\n" , - encoder->base.id, encoder->name, - mode->base.id, mode->name); +DRM_DEBUG_KMS ("[ENCODER:%d:%s] set [MODE:%s]\n" , + encoder->base.id, encoder->name, mode->name);if (encoder_funcs->mode_set) encoder_funcs->mode_set (encoder, mode, adjusted_mode);
drivers/gpu/drm/drm_modes.c +0 -9
@@ -71,11 +71,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device *dev)if (!nmode)return NULL ; -if (drm_mode_object_add (dev, &nmode->base,DRM_MODE_OBJECT_MODE )) { -kfree (nmode); -return NULL ; - } -return nmode; }EXPORT_SYMBOL (drm_mode_create);
@@ -92,8 +87,6 @@ void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode)if (!mode)return ; -drm_mode_object_unregister (dev, &mode->base); -kfree (mode); }EXPORT_SYMBOL (drm_mode_destroy);
@@ -911,11 +904,9 @@ EXPORT_SYMBOL(drm_mode_set_crtcinfo);*/ void drm_mode_copy (struct drm_display_mode *dst,const struct drm_display_mode *src) { -int id = dst->base.id;struct list_head head = dst->head; *dst = *src; - dst->base.id = id; dst->head = head; }EXPORT_SYMBOL (drm_mode_copy);
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Shayenne Moura
This patch removes the
drm_mode_objectprints, evaluation and use fromdrm_display_modeobjects used in drm files. It removes dependency fromdrm_mode_object.Signed-off-by Shayenne Moura <[email protected]>
Reviewed-by Daniel Vetter <[email protected]>
Quoted 26 lines
--- drivers/gpu/drm/drm_crtc_helper.c | 5 ++--- drivers/gpu/drm/drm_modes.c | 9 --------- 2 files changed, 2 insertions(+), 12 deletions(-)drivers/gpu/drm/drm_crtc_helper.c +2
-3@@ -386,9 +386,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc,if (!encoder_funcs)continue ; -DRM_DEBUG_KMS ("[ENCODER:%d:%s] set [MODE:%d:%s]\n" , - encoder->base.id, encoder->name, - mode->base.id, mode->name); +DRM_DEBUG_KMS ("[ENCODER:%d:%s] set [MODE:%s]\n" , + encoder->base.id, encoder->name, mode->name);if (encoder_funcs->mode_set) encoder_funcs->mode_set (encoder, mode, adjusted_mode);drivers/gpu/drm/drm_modes.c +0
-0
drivers/gpu/drm/drm_modes.c struct drm_display_mode *drm_mode_create(struct drm_device *dev) · line 77
Quoted 7 lines
drivers/gpu/drm/drm_modes.c +0
-4@@ -71,11 +71,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device *dev)if (!nmode)return NULL ; -if (drm_mode_object_add (dev, &nmode->base,DRM_MODE_OBJECT_MODE )) { -kfree (nmode); -return NULL ; - }
With this we stop filing out base.id and base.type, so this patch should be reordered in the series to be after all users of these fields are gone from drivers. But before the last patch that removes these fields.
Thanks, Daniel
Quoted 32 lines
drivers/gpu/drm/drm_modes.c +0
-5-return nmode; }EXPORT_SYMBOL (drm_mode_create);@@ -92,8 +87,6 @@ void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode)if (!mode)return ; -drm_mode_object_unregister (dev, &mode->base); -kfree (mode); }EXPORT_SYMBOL (drm_mode_destroy);@@ -911,11 +904,9 @@ EXPORT_SYMBOL(drm_mode_set_crtcinfo);*/ void drm_mode_copy (struct drm_display_mode *dst,const struct drm_display_mode *src) { -int id = dst->base.id;struct list_head head = dst->head; *dst = *src; - dst->base.id = id; dst->head = head; }EXPORT_SYMBOL (drm_mode_copy);Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch