From: Imre Deak <imre.deak@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] drm/i915: Flatten DRIVER_MODESET checks in i915_irq.c
Date: Fri, 13 Feb 2015 00:38:50 +0200 [thread overview]
Message-ID: <1423780730.3277.19.camel@ideak-mobl> (raw)
In-Reply-To: <1422959414-18968-3-git-send-email-daniel.vetter@ffwll.ch>
On Tue, 2015-02-03 at 11:30 +0100, Daniel Vetter wrote:
> UMS is no more!
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
> ---
> drivers/gpu/drm/i915/i915_irq.c | 36 +++++++++++-------------------------
> 1 file changed, 11 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 80f35dcffea4..37189a25ca82 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -557,28 +557,16 @@ static u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
> unsigned long high_frame;
> unsigned long low_frame;
> u32 high1, high2, low, pixel, vbl_start, hsync_start, htotal;
> + struct intel_crtc *intel_crtc =
> + to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
> + const struct drm_display_mode *mode =
> + &intel_crtc->config->base.adjusted_mode;
>
> - if (drm_core_check_feature(dev, DRIVER_MODESET)) {
> - struct intel_crtc *intel_crtc =
> - to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
> - const struct drm_display_mode *mode =
> - &intel_crtc->config->base.adjusted_mode;
> -
> - htotal = mode->crtc_htotal;
> - hsync_start = mode->crtc_hsync_start;
> - vbl_start = mode->crtc_vblank_start;
> - if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> - vbl_start = DIV_ROUND_UP(vbl_start, 2);
> - } else {
> - enum transcoder cpu_transcoder = (enum transcoder) pipe;
> -
> - htotal = ((I915_READ(HTOTAL(cpu_transcoder)) >> 16) & 0x1fff) + 1;
> - hsync_start = (I915_READ(HSYNC(cpu_transcoder)) & 0x1fff) + 1;
> - vbl_start = (I915_READ(VBLANK(cpu_transcoder)) & 0x1fff) + 1;
> - if ((I915_READ(PIPECONF(cpu_transcoder)) &
> - PIPECONF_INTERLACE_MASK) != PIPECONF_PROGRESSIVE)
> - vbl_start = DIV_ROUND_UP(vbl_start, 2);
> - }
> + htotal = mode->crtc_htotal;
> + hsync_start = mode->crtc_hsync_start;
> + vbl_start = mode->crtc_vblank_start;
> + if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> + vbl_start = DIV_ROUND_UP(vbl_start, 2);
>
> /* Convert to pixel count */
> vbl_start *= htotal;
> @@ -4330,10 +4318,8 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
> if (!IS_GEN2(dev_priv))
> dev->vblank_disable_immediate = true;
>
> - if (drm_core_check_feature(dev, DRIVER_MODESET)) {
> - dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp;
> - dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;
> - }
> + dev->driver->get_vblank_timestamp = i915_get_vblank_timestamp;
> + dev->driver->get_scanout_position = i915_get_crtc_scanoutpos;
>
> if (IS_CHERRYVIEW(dev_priv)) {
> dev->driver->irq_handler = cherryview_irq_handler;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-02-12 22:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 10:30 [PATCH 1/4] drm/irq: Add drm_crtc_vblank_reset Daniel Vetter
2015-02-03 10:30 ` [PATCH 2/4] drm/i915: Drop pipe_enable checks in vblank funcs Daniel Vetter
2015-02-12 22:37 ` Imre Deak
2015-02-13 7:39 ` Daniel Vetter
2015-02-03 10:30 ` [PATCH 3/4] drm/i915: Flatten DRIVER_MODESET checks in i915_irq.c Daniel Vetter
2015-02-12 22:38 ` Imre Deak [this message]
2015-02-19 12:25 ` Dave Gordon
2015-02-19 13:39 ` Imre Deak
2015-02-19 13:42 ` Imre Deak
2015-02-23 11:32 ` [Intel-gfx] " Imre Deak
2015-02-03 10:30 ` [PATCH 4/4] drm/i915: Switch to drm_crtc variants of vblank functions Daniel Vetter
2015-02-12 22:57 ` Imre Deak
2015-02-13 7:46 ` [Intel-gfx] " Daniel Vetter
2015-02-03 11:31 ` [PATCH 1/4] drm/irq: Add drm_crtc_vblank_reset Laurent Pinchart
2015-02-03 11:53 ` Daniel Vetter
2015-02-04 9:31 ` [Intel-gfx] " Ville Syrjälä
2015-02-12 21:56 ` Imre Deak
2015-02-13 7:44 ` Daniel Vetter
2015-02-13 11:35 ` Imre Deak
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=1423780730.3277.19.camel@ideak-mobl \
--to=imre.deak@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel.vetter@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 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.