dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 03/14] drm/i915: Kill hwmode save/restore
Date: Tue, 29 Oct 2013 20:06:07 +0200	[thread overview]
Message-ID: <1383069978-12476-4-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1383069978-12476-1-git-send-email-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm core no longer uses crtc->hwmode, and neither does i915, so we can totally ignore it
in i915.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 7ea20b2..2b35b29 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9283,21 +9283,19 @@ static int __intel_set_mode(struct drm_crtc *crtc,
 {
 	struct drm_device *dev = crtc->dev;
 	drm_i915_private_t *dev_priv = dev->dev_private;
-	struct drm_display_mode *saved_mode, *saved_hwmode;
+	struct drm_display_mode *saved_mode;
 	struct intel_crtc_config *pipe_config = NULL;
 	struct intel_crtc *intel_crtc;
 	unsigned disable_pipes, prepare_pipes, modeset_pipes;
 	int ret = 0;
 
-	saved_mode = kcalloc(2, sizeof(*saved_mode), GFP_KERNEL);
+	saved_mode = kmalloc(sizeof(*saved_mode), GFP_KERNEL);
 	if (!saved_mode)
 		return -ENOMEM;
-	saved_hwmode = saved_mode + 1;
 
 	intel_modeset_affected_pipes(crtc, &modeset_pipes,
 				     &prepare_pipes, &disable_pipes);
 
-	*saved_hwmode = crtc->hwmode;
 	*saved_mode = crtc->mode;
 
 	/* Hack: Because we don't (yet) support global modeset on multiple
@@ -9357,9 +9355,6 @@ static int __intel_set_mode(struct drm_crtc *crtc,
 		dev_priv->display.crtc_enable(&intel_crtc->base);
 
 	if (modeset_pipes) {
-		/* Store real post-adjustment hardware mode. */
-		crtc->hwmode = pipe_config->adjusted_mode;
-
 		/* Calculate and store various constants which
 		 * are later needed by vblank and swap-completion
 		 * timestamping. They are derived from true hwmode.
@@ -9370,10 +9365,8 @@ static int __intel_set_mode(struct drm_crtc *crtc,
 
 	/* FIXME: add subpixel order */
 done:
-	if (ret && crtc->enabled) {
-		crtc->hwmode = *saved_hwmode;
+	if (ret && crtc->enabled)
 		crtc->mode = *saved_mode;
-	}
 
 out:
 	kfree(pipe_config);
-- 
1.8.1.5

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

  parent reply	other threads:[~2013-10-29 18:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 18:06 [PATCH 00/14] drm: Some more vblank timestampi changes ville.syrjala
2013-10-29 18:06 ` [PATCH 01/14] drm: Pass the display mode to drm_calc_timestamping_constants() ville.syrjala
2013-10-29 18:06 ` [PATCH 02/14] drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos() ville.syrjala
2013-10-29 18:06 ` ville.syrjala [this message]
2013-10-29 18:06 ` [PATCH 04/14] drm/i915: Call drm_calc_timestamping_constants() earlier ville.syrjala
2013-10-29 18:06 ` [PATCH 05/14] drm: Improve drm_calc_timestamping_constants() documentation ville.syrjala
2013-10-29 18:06 ` [PATCH 06/14] drm: Simplify the math in drm_calc_timestamping_constants() ville.syrjala
2013-10-29 18:06 ` [PATCH 07/14] drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings() ville.syrjala
2013-10-29 18:06 ` [PATCH 08/14] drm: Use crtc_clock in drm_calc_timestamping_constants() ville.syrjala
2013-10-29 18:06 ` [PATCH 09/14] drm: Change {pixel,line,frame}dur_ns from s64 to int ville.syrjala
2013-10-29 18:06 ` [PATCH 10/14] drm/i915: Fix scanoutpos calculations for interlaced modes ville.syrjala
2013-10-29 18:06 ` [PATCH 11/14] drm: Fix vblank timestamping constants " ville.syrjala
2013-10-29 18:06 ` [PATCH 12/14] drm: Pass 'flags' from the caller to .get_scanout_position() ville.syrjala
2014-01-13  0:02   ` Mario Kleiner
2013-10-29 18:06 ` [PATCH 13/14] drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos() ville.syrjala
2014-01-13  0:22   ` Mario Kleiner
2013-10-29 18:06 ` [PATCH 14/14] drm/i915: Add a kludge for DSL incrementing too late and ISR not working ville.syrjala
2013-11-06  3:46 ` [PATCH 00/14] drm: Some more vblank timestampi changes Dave Airlie
2013-11-29 13:36   ` Ville Syrjälä
2013-11-30 12:51     ` Mario Kleiner
2014-01-12 23:58 ` Mario Kleiner

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=1383069978-12476-4-git-send-email-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox