]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
drm: Remove use of drm_mode_object
authorShayenne Moura <shayenneluzmoura@gmail.com>
Fri, 11 Jan 2019 14:45:48 +0000 (12:45 -0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Jan 2019 12:20:56 +0000 (13:20 +0100)
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 <shayenneluzmoura@gmail.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/785896b0a551464d0b780a55411707300802d6b6.1547214023.git.shayenneluzmoura@gmail.com
drivers/gpu/drm/drm_crtc_helper.c
drivers/gpu/drm/drm_modes.c

index 91dc9b6386e78d440e5f767ae01c35d51c66617f..747661f63fbb4f65d35a5f9d1521ff01c5e56ed9 100644 (file)
@@ -391,9 +391,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);
 
index 24a7504365596c32c60333ad04e25ba1c26306bf..adce9a26bac944bcbe9bec875bb95778b0ac7cc8 100644 (file)
@@ -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);