Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: dri-devel@lists.freedesktop.org
Cc: maxime.ripard@bootlin.com, daniel.vetter@ffwll.ch,
	intel-gfx@lists.freedesktop.org,
	"Noralf Trønnes" <noralf@tronnes.org>
Subject: [PATCH v3 04/11] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}
Date: Sat, 20 Apr 2019 12:45:49 +0200	[thread overview]
Message-ID: <20190420104556.31127-5-noralf@tronnes.org> (raw)
In-Reply-To: <20190420104556.31127-1-noralf@tronnes.org>

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>
---
 drivers/gpu/drm/drm_fb_helper.c | 12 ++++--------
 include/drm/drm_fb_helper.h     |  2 --
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 1c70ecb84738..61f0b01e394e 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2021,16 +2021,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);
@@ -2803,11 +2803,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;
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index b0a14aef2e39..2af1c6d3e147 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -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;
 };
 
 /**
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-04-20 10:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-20 10:45 [PATCH v3 00/11] drm/fb-helper: Move modesetting code to drm_client Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 01/11] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 02/11] drm/fb-helper: Avoid race with DRM userspace Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 03/11] drm/fb-helper: No need to cache rotation and sw_rotations Noralf Trønnes
2019-04-20 10:45 ` Noralf Trønnes [this message]
2019-04-20 10:45 ` [PATCH v3 05/11] drm/fb-helper: Remove drm_fb_helper_crtc Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 06/11] drm/fb-helper: Prepare to move out commit code Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 07/11] drm/fb-helper: Move " Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 08/11] drm/fb-helper: Remove drm_fb_helper_connector Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 09/11] drm/fb-helper: Prepare to move out modeset config code Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 10/11] drm/fb-helper: Move " Noralf Trønnes
2019-04-20 10:45 ` [PATCH v3 11/11] drm/client: Hack: Add bootsplash example Noralf Trønnes
2019-04-20 11:01 ` ✗ Fi.CI.CHECKPATCH: warning for drm/fb-helper: Move modesetting code to drm_client (rev3) Patchwork
2019-04-20 11:09 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-20 11:25 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-20 12:31 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-04-20 17:24 ` [PATCH v3 00/11] drm/fb-helper: Move modesetting code to drm_client Noralf Trønnes
2019-04-23 11:04   ` Martin Peres
2019-04-24 17:18     ` Noralf Trønnes
2019-04-23 15:32 ` ✗ Fi.CI.CHECKPATCH: warning for drm/fb-helper: Move modesetting code to drm_client (rev4) Patchwork
2019-04-23 15:40 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-23 16:01 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-23 20:48 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190420104556.31127-5-noralf@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maxime.ripard@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox