All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: dri-devel@lists.freedesktop.org
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 05/12] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}
Date: Sun,  7 Apr 2019 18:52:36 +0200	[thread overview]
Message-ID: <20190407165243.54043-6-noralf@tronnes.org> (raw)
In-Reply-To: <20190407165243.54043-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>
---
 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 2f71160cc904..69dddc4a9231 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 d954f48c9636..0d6d23a15b42 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -48,8 +48,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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-04-07 16:52 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07 16:52 [PATCH v2 00/12] drm/fb-helper: Move modesetting code to drm_client Noralf Trønnes
2019-04-07 16:52 ` [PATCH v2 01/12] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() Noralf Trønnes
2019-04-16  9:12   ` Maxime Ripard
2019-04-07 16:52 ` [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace Noralf Trønnes
2019-04-16  7:59   ` Daniel Vetter
2019-04-16 18:46     ` Noralf Trønnes
2019-04-17 13:24       ` Daniel Vetter
2019-04-17 13:26         ` Daniel Vetter
2019-04-17 14:48           ` Noralf Trønnes
2019-04-16  9:26   ` Maxime Ripard
2019-04-07 16:52 ` [PATCH v2 03/12] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper Noralf Trønnes
2019-04-11 14:25   ` Noralf Trønnes
2019-04-23 14:17   ` Thomas Zimmermann
2019-04-23 14:58     ` Noralf Trønnes
2019-04-07 16:52 ` [PATCH v2 04/12] drm/fb-helper: No need to cache rotation and sw_rotations Noralf Trønnes
2019-04-16  9:28   ` Maxime Ripard
2019-04-07 16:52 ` Noralf Trønnes [this message]
2019-04-16  9:29   ` [PATCH v2 05/12] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode} Maxime Ripard
2019-04-07 16:52 ` [PATCH v2 06/12] drm/fb-helper: Remove drm_fb_helper_crtc Noralf Trønnes
2019-04-16  8:34   ` Daniel Vetter
2019-04-07 16:52 ` [PATCH v2 07/12] drm/fb-helper: Prepare to move out commit code Noralf Trønnes
2019-04-07 16:52 ` [PATCH v2 08/12] drm/fb-helper: Move " Noralf Trønnes
2019-04-16  8:38   ` Daniel Vetter
2019-04-17 17:56     ` Noralf Trønnes
2019-04-18  8:30       ` Daniel Vetter
2019-04-07 16:52 ` [PATCH v2 09/12] drm/fb-helper: Remove drm_fb_helper_connector Noralf Trønnes
2019-04-16  9:42   ` Maxime Ripard
2019-04-16 14:57     ` Noralf Trønnes
2019-04-17 16:48       ` Maxime Ripard
2019-04-07 16:52 ` [PATCH v2 10/12] drm/fb-helper: Prepare to move out modeset config code Noralf Trønnes
2019-04-16  9:43   ` Maxime Ripard
2019-04-07 16:52 ` [PATCH v2 11/12] drm/fb-helper: Move " Noralf Trønnes
2019-04-16  9:43   ` Maxime Ripard
2019-04-07 16:52 ` [PATCH v2 12/12] drm/client: Hack: Add bootsplash example Noralf Trønnes
2019-04-07 17:02 ` ✗ Fi.CI.CHECKPATCH: warning for drm/fb-helper: Move modesetting code to drm_client (rev2) Patchwork
2019-04-07 17:10 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-04-07 17:21 ` ✓ Fi.CI.BAT: success " Patchwork
2019-04-07 18:29 ` ✓ Fi.CI.IGT: " Patchwork
2019-04-16  8:41 ` [PATCH v2 00/12] drm/fb-helper: Move modesetting code to drm_client Daniel Vetter
2019-04-16  8:46   ` Daniel Vetter
2019-04-17 18:06   ` Noralf Trønnes

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=20190407165243.54043-6-noralf@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.