From: "Murthy, Arun R" <arun.r.murthy@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
ville.syrjala@linux.intel.com
Subject: Re: [PATCH v8 3/9] drm/i915: Make sprite updates atomic
Date: Mon, 19 May 2014 16:19:51 +0530 [thread overview]
Message-ID: <5379E1CF.2090709@intel.com> (raw)
In-Reply-To: <CAHofq8MHrbki1XtXeMZGSDSABnu4LUkZDfbYWCvU5Nng0AjM5g@mail.gmail.com>
> Add a mechanism by which we can evade the leading edge of vblank. This
> guarantees that no two sprite register writes will straddle on either
> side of the vblank start, and that means all the writes will be latched
> together in one atomic operation.
Here only one sprite update followed by the primary enable/disable can be
achieved atomically. But I feel update of all planes are to be
considered, i.e
update of planes per pipe basis to achieve atomicity.
>
> We do the vblank evade by checking the scanline counter, and if it's too
> close to the start of vblank (too close has been hardcoded to 100usec
> for now), we will wait for the vblank start to pass. In order to
> eliminate random delayes from the rest of the system, we operate with
> interrupts disabled, except when waiting for the vblank obviously.
This can be achieved easily by checking the previous vblank time in
drm_get_last_vblanktimestamp(), using this the next vblank time cab be
predicted. Using these with the hardcoded value 100usec, a check can be
made to continue or to wait for a vblank. For waiting for a vblank instead
of adding new function just use the available intel_wait_for_vblank().
last_vblank = drm_get_last_vblanktimestamp();
curr_time = do_getttimeofday();
if (curr_time.tv_usec - (last_vblank + VBLANK_TIME_INTERVAL) > 100)
/* acquire lock and proceed*/
else
/* wait for one vblank, acquire lock and proceed */
Thanks and Regards,
Arun R Murthy
--------------------
next prev parent reply other threads:[~2014-05-19 10:50 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-29 10:35 [PATCH v4 0/9] drm/i915: Atomic sprites v4 ville.syrjala
2014-04-29 10:35 ` [PATCH 1/9] drm/i915: Fix scanout position for real ville.syrjala
2014-04-29 10:35 ` [PATCH v4 2/9] drm/i915: Add intel_get_crtc_scanline() ville.syrjala
2014-04-29 10:35 ` [PATCH v8 3/9] drm/i915: Make sprite updates atomic ville.syrjala
[not found] ` <CAHofq8MHrbki1XtXeMZGSDSABnu4LUkZDfbYWCvU5Nng0AjM5g@mail.gmail.com>
[not found] ` <E1F41119A09A1C4EACAB7A4603D2A6C918F9F47E@BGSMSX104.gar.corp.intel.com>
2014-05-19 10:38 ` FW: " Arun Murthy
2014-05-19 10:49 ` Ville Syrjälä
2014-05-19 11:08 ` Arun Murthy
2014-05-19 10:49 ` Murthy, Arun R [this message]
2014-05-19 10:57 ` G, Pallavi
2014-05-22 13:03 ` Daniel Vetter
2014-05-22 13:24 ` Ville Syrjälä
2014-04-29 10:35 ` [PATCH v2 4/9] drm/i915: Perform primary enable/disable atomically with sprite updates ville.syrjala
2014-05-19 10:13 ` G, Pallavi
2014-04-29 10:35 ` [PATCH v4 5/9] drm/i915: Add pipe update trace points ville.syrjala
2014-04-29 11:17 ` Daniel Vetter
2014-04-29 11:46 ` Ville Syrjälä
2014-04-29 10:35 ` [PATCH 6/9] drm/i915: Add a small adjustment to the pixel counter on interlaced modes ville.syrjala
2014-05-15 14:53 ` akash goel
2014-05-16 2:42 ` sourab gupta
2014-05-16 10:49 ` Ville Syrjälä
2014-04-29 10:35 ` [PATCH 7/9] drm/i915: Improve gen3/4 frame counter ville.syrjala
2014-05-15 14:46 ` akash goel
2014-05-16 2:37 ` sourab gupta
2014-04-29 10:35 ` [PATCH v2 8/9] drm/i915: Draw a picture about video timings ville.syrjala
2014-05-15 15:10 ` akash goel
2014-05-15 17:20 ` [PATCH v3 " ville.syrjala
2014-05-16 2:54 ` sourab gupta
2014-04-29 10:35 ` [PATCH 9/9] drm/i915: Fix gen2 and hsw scanline counter ville.syrjala
2014-05-15 17:23 ` [PATCH v2 9/9] drm/i915: Fix gen2 and hsw+ " ville.syrjala
2014-05-16 5:33 ` akash goel
2014-05-16 6:24 ` sourab gupta
2014-05-21 9:01 ` Ville Syrjälä
2014-04-29 10:44 ` [PATCH v4 0/9] drm/i915: Atomic sprites v4 Ville Syrjälä
-- strict thread matches above, loose matches on Subject: below --
2014-05-19 9:19 [PATCH v8 3/9] drm/i915: Make sprite updates atomic Arun Murthy
2014-05-19 10:46 ` Ville Syrjälä
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=5379E1CF.2090709@intel.com \
--to=arun.r.murthy@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox