All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 9/5] drm/i915: Draw a picture about video timings
Date: Thu, 20 Feb 2014 15:42:55 +0200	[thread overview]
Message-ID: <1392903775.2650.5.camel@intelbox> (raw)
In-Reply-To: <1392894851-1961-1-git-send-email-ville.syrjala@linux.intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 3462 bytes --]

On Thu, 2014-02-20 at 13:14 +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The docs are a bit lacking when it comes to describing when certain
> timing related events occur in the hardware. Draw a picture which
> tries to capture the most important ones.
> 
> v2: Clarify a few details (Imre)
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_irq.c | 49 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 49 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> index 40adce0..ed0df3e 100644
> --- a/drivers/gpu/drm/i915/i915_irq.c
> +++ b/drivers/gpu/drm/i915/i915_irq.c
> @@ -625,6 +625,55 @@ i915_pipe_enabled(struct drm_device *dev, int pipe)
>  	}
>  }
>  
> +/*
> + * This timing diagram depicts the video signal in and
> + * around the vertical blanking period.
> + *
> + * Assumptions about the fictitious mode used in this example:
> + *  vblank_start >= 3
> + *  vsync_start = vblank_start + 1
> + *  vsync_end = vblank_start + 2
> + *  vtotal = vblank_start + 3
> + *
> + *           start of vblank:
> + *           latch double buffered registers
> + *           increment frame counter (ctg+)
> + *           generate start of vblank interrupt (gen4+)
> + *           |
> + *           |          frame start:
> + *           |          generate frame start interrupt (aka. vblank interrupt) (gmch)
> + *           |          may be shifted forward 1-3 extra lines via PIPECONF
> + *           |          |
> + *           |          |  start of vsync:
> + *           |          |  generate vsync interrupt
> + *           |          |  |
> + * ___xxxx___    ___xxxx___    ___xxxx___    ___xxxx___    ___xxxx___    ___
> + *       .   \hs/   .      \hs/          \hs/          \hs/   .      \hs/
> + * ----va---> <-----------------vb--------------------> <--------va---------
> + *       |          |       <----vs----->                     |
> + * -vbs-----> <---vbs+1---> <---vbs+2---> <-----0-----> <-----1-----> <---2- (scanline counter gen2)
> + * -vbs-2---> <---vbs-1---> <---vbs-----> <---vbs+1---> <---vbs+2---> <---0- (scanline counter gen3+)
> + *       |          |                                         |
> + *       last visible pixel                                   first visible pixel
> + *                  |                                         increment frame counter (gen3/4)
> + *                  pixel counter = vblank_start * htotal     pixel counter = 0 (gen3/4)
> + *
> + * x  = horizontal active
> + * _  = horizontal blanking
> + * hs = horizontal sync
> + * va = vertical active
> + * vb = vertical blanking
> + * vs = vertical sync
> + * vbs = vblank_start (number)
> + *
> + * Summary:
> + * - most events happen at the start of horizontal sync
> + * - frame start happens at the start of horizontal blank, 1-4 lines
> + *   (depending on PIPECONF settings) after the start of vblank
> + * - gen3/4 pixel and frame counter are synchronized with the start
> + *   of horizontal active on the first line of vertical active

A nice description that I haven't found in any docs, so:
Acked-by: Imre Deak <imre.deak@intel.com>

> + */
> +
>  static u32 i8xx_get_vblank_counter(struct drm_device *dev, int pipe)
>  {
>  	/* Gen2 doesn't have a hardware frame counter */


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2014-02-20 13:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-13 15:42 [PATCH v3 0/5] drm/i915: Atomic sprites v3 ville.syrjala
2014-02-13 15:42 ` [PATCH 1/5] drm/i915: Fix scanout position for real ville.syrjala
2014-03-14  6:16   ` akash goel
2014-04-01 10:36     ` Ville Syrjälä
2014-02-13 15:42 ` [PATCH v3 2/5] drm/i915: Add intel_get_crtc_scanline() ville.syrjala
2014-02-14 12:05   ` [PATCH v4 " ville.syrjala
2014-02-13 15:42 ` [PATCH v4 3/5] drm/i915: Make sprite updates atomic ville.syrjala
2014-02-13 16:01   ` Chris Wilson
2014-02-13 16:43     ` Ville Syrjälä
2014-02-13 19:42     ` [PATCH v5 " ville.syrjala
2014-02-14 12:06       ` [PATCH v6 " ville.syrjala
2014-02-14 12:50         ` [PATCH v7 " ville.syrjala
2014-03-07 13:42           ` [PATCH v8 " ville.syrjala
2014-03-07 15:57             ` Jesse Barnes
2014-02-13 15:42 ` [PATCH v2 4/5] drm/i915: Perform primary enable/disable atomically with sprite updates ville.syrjala
2014-02-13 15:42 ` [PATCH v3 5/5] drm/i915: Add pipe update trace points ville.syrjala
2014-02-13 19:43   ` [PATCH v4 " ville.syrjala
2014-02-14 12:07 ` [PATCH 6/5] drm/i915: Add a small adjustment to the pixel counter on interlaced modes ville.syrjala
2014-02-18 12:04 ` [PATCH 7/5] drm/i915: Improve gen3/4 frame counter ville.syrjala
2014-02-18 12:04   ` [PATCH 8/5] drm/i915: Fix gen2 scanline counter ville.syrjala
2014-02-20 11:12     ` [PATCH v2 " ville.syrjala
2014-02-18 12:04   ` [PATCH 9/5] drm/i915: Draw a picture about video timings ville.syrjala
2014-02-20 11:14     ` [PATCH v2 " ville.syrjala
2014-02-20 13:42       ` Imre Deak [this message]
2014-02-18 14:16   ` [PATCH 7/5] drm/i915: Improve gen3/4 frame counter Imre Deak
2014-02-18 14:41     ` Ville Syrjälä
2014-02-18 15:11       ` Imre Deak
2014-04-09 15:03 ` [PATCH v3 0/5] drm/i915: Atomic sprites v3 sourab gupta
2014-04-09 15:08 ` akash goel

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=1392903775.2650.5.camel@intelbox \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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 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.