drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}
authorNoralf Trønnes <noralf@tronnes.org>
Mon, 6 May 2019 18:01:32 +0000 (20:01 +0200)
committerNoralf Trønnes <noralf@tronnes.org>
Tue, 14 May 2019 14:13:07 +0000 (16:13 +0200)
The values are already present in the modeset.

This is done in preparation for the removal of struct drm_fb_helper_crtc.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190506180139.6913-5-noralf@tronnes.org
drivers/gpu/drm/drm_fb_helper.c
include/drm/drm_fb_helper.h

index 1bfbd16c23de9c3c352e9060b691e3bbf63cbb98..c259a28522f8ec18f747c326937c1e7442d41c8a 100644 (file)
@@ -2031,16 +2031,16 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
                 */
                bool lastv = true, lasth = true;
 
-               desired_mode = fb_helper->crtc_info[i].desired_mode;
                mode_set = &fb_helper->crtc_info[i].mode_set;
+               desired_mode = mode_set->mode;
 
                if (!desired_mode)
                        continue;
 
                crtc_count++;
 
-               x = fb_helper->crtc_info[i].x;
-               y = fb_helper->crtc_info[i].y;
+               x = mode_set->x;
+               y = mode_set->y;
 
                sizes.surface_width  = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width);
                sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height);
@@ -2814,11 +2814,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper,
                        DRM_DEBUG_KMS("desired mode %s set on crtc %d (%d,%d)\n",
                                      mode->name, fb_crtc->mode_set.crtc->base.id, offset->x, offset->y);
 
-                       fb_crtc->desired_mode = mode;
-                       fb_crtc->x = offset->x;
-                       fb_crtc->y = offset->y;
-                       modeset->mode = drm_mode_duplicate(dev,
-                                                          fb_crtc->desired_mode);
+                       modeset->mode = drm_mode_duplicate(dev, mode);
                        drm_connector_get(connector);
                        modeset->connectors[modeset->num_connectors++] = connector;
                        modeset->x = offset->x;
index b0a14aef2e39feab05584d9f808355caf570243c..2af1c6d3e1476ea1b8003a7d693cd522b6f6f8d5 100644 (file)
@@ -49,8 +49,6 @@ struct drm_fb_offset {
 
 struct drm_fb_helper_crtc {
        struct drm_mode_set mode_set;
-       struct drm_display_mode *desired_mode;
-       int x, y;
 };
 
 /**