All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: FBC patchset
Date: Fri, 08 Jul 2011 14:28:35 -0700	[thread overview]
Message-ID: <yuny608v4vw.fsf@aiko.keithp.com> (raw)
In-Reply-To: <f80fcd$qmhrd@fmsmga001.fm.intel.com>


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

On Fri, 08 Jul 2011 21:19:29 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Fri, 08 Jul 2011 13:00:09 -0700, Keith Packard <keithp@keithp.com> wrote:
> > On Fri, 08 Jul 2011 20:43:47 +0100, Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > 
> > > Bumping to 250ms sufficiently delays the task to miss the race, but we
> > > can not foretell just how long any given crtc modeset will take. So what
> > > we need is to take the mode_config.lock in order to prevent concurrent
> > > access to the FBC registers and also to prevent the fb from disappearing
> > > beneath us:
> > 
> > Sounds like we also need to push out any FBC reconfiguration anytime
> > modesetting occurs to ensure that we've waited past a vblank interval?
> 
> During intel_crtc_mode_set() and friends we only call into
> intel_update_fbc() which just clears the FBC enabled bit and schedules a
> delayed task to do the rest, if required.

Does a further call into intel_crtc_mode_set push out the delayed task
so that it now occurs at least 50ms after the later call? That seems
useful, although it might not be necessary.

> If we are going from 2 crtcs to 1 with no swapping of the framebuffer,
> then the single crtc that we want to enable FBC on, remains running for
> the whole duration and the actual enabling is just deferred by 250ms.

Which is fine; mode setting doesn't happen often.

> If we are just moving the fb y-offset (e.g. panning the display), then the
> pipe will remain running but we disable FBC and wait 250ms before
> re-enabling.

That also seems fine; we certainly don't want to spend any time
optimizing for this case.

> So I think it just reduced into being an incorrect locking issue, but
> we're still making the assumption that it is safe to touch the FBC just
> because X ms have passed. :|

We could, of course, make sure that a certain number of vblank intervals
have passed instead of using a fixed timeout. Or we could compute the
vblank interval from the mode and then just make sure the timeout used
is sufficient. Or we could just use 100ms and assume that no-one will
ever set a mode of less than 10Hz.

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 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:[~2011-07-08 21:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-08 11:22 FBC patchset Chris Wilson
2011-07-08 11:22 ` [PATCH 1/8] drm/i915: Only export the generic intel_disable_fbc() interface Chris Wilson
2011-07-08 11:22 ` [PATCH 2/8] drm/i915: Replace direct calls to vfunc.disable_fbc with intel_disable_fbc() Chris Wilson
2011-07-08 11:22 ` [PATCH 3/8] drm/i915: Remove vestigial pitch from post-gen2 FBC control routines Chris Wilson
2011-07-08 17:20   ` Keith Packard
2011-07-08 11:22 ` [PATCH 4/8] drm/i915: Use of a CPU fence is mandatory to update FBC regions upon CPU writes Chris Wilson
2011-07-08 11:22 ` [PATCH 5/8] drm/i915: Set persistent-mode for ILK/SNB framebuffer compression Chris Wilson
2011-07-08 11:22 ` [PATCH 6/8] drm/i915: Disable FBC across page-flipping Chris Wilson
2011-07-08 11:22 ` [PATCH 7/8] drm/i915: Perform intel_enable_fbc() from a delayed task Chris Wilson
2011-07-08 11:22 ` [PATCH 8/8] drm/i915: Share the common work of disabling active FBC before updating Chris Wilson
2011-07-08 19:43 ` FBC patchset Chris Wilson
2011-07-08 20:00   ` Keith Packard
2011-07-08 20:19     ` Chris Wilson
2011-07-08 21:28       ` Keith Packard [this message]
2011-07-08 22:08         ` Chris Wilson
2012-01-17 16:18   ` Daniel Vetter
2012-01-17 16:57     ` 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=yuny608v4vw.fsf@aiko.keithp.com \
    --to=keithp@keithp.com \
    --cc=chris@chris-wilson.co.uk \
    --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.