From: Eric Anholt <eric@anholt.net>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/9] drm/i915: Move the vblank pre/post modeset to the common crtc_mode_set.
Date: Wed, 30 Mar 2011 13:01:03 -0700 [thread overview]
Message-ID: <1301515270-3768-3-git-send-email-eric@anholt.net> (raw)
In-Reply-To: <1301515270-3768-1-git-send-email-eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
---
drivers/gpu/drm/i915/intel_display.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 610363c..7b2cd8a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4540,8 +4540,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
u32 lvds_sync = 0;
int target_clock;
- drm_vblank_pre_modeset(dev, pipe);
-
list_for_each_entry(encoder, &mode_config->encoder_list, base.head) {
if (encoder->base.crtc != crtc)
continue;
@@ -4598,7 +4596,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
ok = limit->find_pll(limit, crtc, adjusted_mode->clock, refclk, &clock);
if (!ok) {
DRM_ERROR("Couldn't find PLL settings for mode!\n");
- drm_vblank_post_modeset(dev, pipe);
return -EINVAL;
}
@@ -5158,8 +5155,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,
intel_update_watermarks(dev);
- drm_vblank_post_modeset(dev, pipe);
-
return ret;
}
@@ -5190,8 +5185,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
u32 lvds_sync = 0;
int target_clock;
- drm_vblank_pre_modeset(dev, pipe);
-
list_for_each_entry(encoder, &mode_config->encoder_list, base.head) {
if (encoder->base.crtc != crtc)
continue;
@@ -5248,7 +5241,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
ok = limit->find_pll(limit, crtc, adjusted_mode->clock, refclk, &clock);
if (!ok) {
DRM_ERROR("Couldn't find PLL settings for mode!\n");
- drm_vblank_post_modeset(dev, pipe);
return -EINVAL;
}
@@ -5808,8 +5800,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,
intel_update_watermarks(dev);
- drm_vblank_post_modeset(dev, pipe);
-
return ret;
}
@@ -5821,11 +5811,17 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
{
struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ int pipe = intel_crtc->pipe;
int ret;
+ drm_vblank_pre_modeset(dev, pipe);
+
ret = dev_priv->display.crtc_mode_set(crtc, mode, adjusted_mode,
x, y, old_fb);
+ drm_vblank_post_modeset(dev, pipe);
+
return ret;
}
--
1.7.4.1
next prev parent reply other threads:[~2011-03-30 20:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-30 20:01 Splitting HAS_PCH_SPLIT code in intel_crtc_mode_set() Eric Anholt
2011-03-30 20:01 ` [PATCH 1/9] drm/i915: Split the crtc_mode_set function along HAS_PCH_SPLIT() lines Eric Anholt
2011-03-30 20:12 ` Jesse Barnes
2011-03-30 20:01 ` Eric Anholt [this message]
2011-03-30 20:13 ` [PATCH 2/9] drm/i915: Move the vblank pre/post modeset to the common crtc_mode_set Jesse Barnes
2011-03-30 20:01 ` [PATCH 3/9] drm/i915: Remove the PCH paths from the pre-Ironlake crtc_mode_set() Eric Anholt
2011-03-30 20:15 ` Jesse Barnes
2011-03-30 20:01 ` [PATCH 4/9] drm/i915: Drop the eDP paths from the pre-Ironlake crtc_mode_set Eric Anholt
2011-03-30 20:34 ` Jesse Barnes
2011-03-30 20:01 ` [PATCH 5/9] drm/i915: Drop the remaining bit of Ironlake code from i9xx_crtc_mode_set() Eric Anholt
2011-03-30 20:34 ` Jesse Barnes
2011-03-30 20:01 ` [PATCH 6/9] drm/i915: Drop non-HAS_PCH_SPLIT() code from ironlake_crtc_mode_set() Eric Anholt
2011-03-31 11:43 ` Chris Wilson
2011-03-31 16:09 ` Jesse Barnes
2011-03-30 20:01 ` [PATCH 7/9] drm/i915: Drop remaining pre-Ironlake " Eric Anholt
2011-03-31 16:09 ` Jesse Barnes
2011-03-30 20:01 ` [PATCH 8/9] drm/i915: Clean up leftover DPLL and LVDS register choice from pch split Eric Anholt
2011-03-31 16:12 ` Jesse Barnes
2011-03-30 20:01 ` [PATCH 9/9] drm/i915: Fold the DPLL limit defines into the structs that use them Eric Anholt
2011-03-31 16:12 ` Jesse Barnes
2011-03-31 7:34 ` Splitting HAS_PCH_SPLIT code in intel_crtc_mode_set() Chris Wilson
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=1301515270-3768-3-git-send-email-eric@anholt.net \
--to=eric@anholt.net \
--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;
as well as URLs for NNTP newsgroup(s).