public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 00/10] drm/i915: FBC fixes v2
@ 2013-11-06 21:02 ville.syrjala
  2013-11-06 21:02 ` [PATCH 01/10] drm/i915: Grab struct_mutex around all FBC updates ville.syrjala
                   ` (10 more replies)
  0 siblings, 11 replies; 39+ messages in thread
From: ville.syrjala @ 2013-11-06 21:02 UTC (permalink / raw)
  To: intel-gfx

One more attempt at making FBC suck a bit less.

The main thing as before is getting the LRI based render/blitter
tracking in place.

In this updates series I decided the way to avoid the kms locks in
execbuffer is to keep an extra reference to the fb.

I added a bunch of locking (struct_mutex and crtc->mutex) to some
places to hopefully make it bit less racy. I think/hope that it doesn't
make it more likely to deadlock. We do grab both locks in the fbc work
now, and we do cancel the work while holding at least one of the locks,
so it seems a bit bad. But we cancel the work in a lazy fashion (no _sync
or anything) so I don't think it should deadlock due to that. And we
already grabbed struct_mutex there anyway, and we already held it while
cancelling the work, so it's no worse at least :P

The disable_fbc/update_fbc calls from the page flip code are lacking
kms lock protection, but we can't simply add it there due to possibility
of deadlocks.

So at least the render/blitter tracking seems to work now without
upsetting lockdep, so it seems a bit better than what we had at least.
Maybe someone else will get inspired by this and fix this mess up for
real...

I've only run this on my IVB, and just running X + some apps w/o
a compositor. No extensive tests or anything. But if I frob some
debug register to disable some tracking bits the screen gets
corrupted, so it seems to be doing its job.

I pushed it here in case someone is interested in a git tree:
git://gitorious.org/vsyrjala/linux.git fbc_fixes

Ville Syrjälä (10):
      drm/i915: Use plane_name() in gen7_enable_fbc()
      drm/i915: Grab struct_mutex around all FBC updates
      drm/i915: Have FBC keep references to the fb
      drm/i915: Grab crtc->mutex in intel_fbc_work_fn()
      drm/i915: Limit FBC flush to post batch flush
      drm/i915: Emit SRM after the MSG_FBC_REND_STATE LRI
      drm/i915: Implement LRI based FBC tracking
      drm/i915: Kill sandybridge_blit_fbc_update()
      drm/i915: Don't write ILK/IVB_FBC_RT_BASE directly
      drm/i915: Set has_fbc=true for all SNB+, except VLV

 drivers/gpu/drm/i915/i915_drv.c            |  6 +-
 drivers/gpu/drm/i915/i915_drv.h            |  6 +-
 drivers/gpu/drm/i915/i915_gem_context.c    |  7 +++
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 31 ++++++++++
 drivers/gpu/drm/i915/i915_reg.h            |  1 +
 drivers/gpu/drm/i915/intel_display.c       | 27 +++++++-
 drivers/gpu/drm/i915/intel_drv.h           |  1 +
 drivers/gpu/drm/i915/intel_pm.c            | 98 ++++++++++++++++--------------
 drivers/gpu/drm/i915/intel_ringbuffer.c    | 66 ++++++++++++++++++--
 drivers/gpu/drm/i915/intel_ringbuffer.h    |  2 +
 10 files changed, 188 insertions(+), 57 deletions(-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2013-11-28 11:30 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-06 21:02 [PATCH 00/10] drm/i915: FBC fixes v2 ville.syrjala
2013-11-06 21:02 ` [PATCH 01/10] drm/i915: Grab struct_mutex around all FBC updates ville.syrjala
2013-11-20 22:39   ` Rodrigo Vivi
2013-11-21  8:22     ` Daniel Vetter
2013-11-21 10:49       ` Ville Syrjälä
2013-11-21 11:08   ` [PATCH v2 " ville.syrjala
2013-11-06 21:02 ` [PATCH 02/10] drm/i915: Have FBC keep references to the fb ville.syrjala
2013-11-21 11:09   ` [PATCH v2 " ville.syrjala
2013-11-06 21:02 ` [PATCH 03/10] drm/i915: Grab crtc->mutex in intel_fbc_work_fn() ville.syrjala
2013-11-06 21:02 ` [PATCH 04/10] drm/i915: Limit FBC flush to post batch flush ville.syrjala
2013-11-20 22:48   ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH 05/10] drm/i915: Emit SRM after the MSG_FBC_REND_STATE LRI ville.syrjala
2013-11-20 22:50   ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH v3 06/10] drm/i915: Implement LRI based FBC tracking ville.syrjala
2013-11-20 22:55   ` Rodrigo Vivi
2013-11-20 23:17     ` Chris Wilson
2013-11-20 23:46       ` Rodrigo Vivi
2013-11-21 11:14       ` [PATCH v4 " ville.syrjala
2013-11-21 11:49         ` Chris Wilson
2013-11-21 16:33           ` Ville Syrjälä
2013-11-21 16:39             ` Chris Wilson
2013-11-22  4:20               ` Ben Widawsky
2013-11-27 15:22           ` [PATCH v5 " ville.syrjala
2013-11-28 11:29             ` Chris Wilson
2013-11-20 23:53   ` [PATCH v3 " Rodrigo Vivi
2013-11-06 21:02 ` [PATCH v2 07/10] drm/i915: Kill sandybridge_blit_fbc_update() ville.syrjala
2013-11-20 22:56   ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH v2 08/10] drm/i915: Don't write ILK/IVB_FBC_RT_BASE directly ville.syrjala
2013-11-20 22:57   ` Rodrigo Vivi
2013-11-27 15:24     ` [PATCH v3 08/10] drm/i915: Don't write IVB_FBC_RT_BASE ville.syrjala
2013-11-28 11:30       ` Chris Wilson
2013-11-06 21:02 ` [PATCH 09/10] drm/i915: Set has_fbc=true for all SNB+, except VLV ville.syrjala
2013-11-20 23:00   ` Rodrigo Vivi
2013-11-06 21:02 ` [PATCH 10/10] drm/i915: Use plane_name() in gen7_enable_fbc() ville.syrjala
2013-11-20 23:01   ` Rodrigo Vivi
2013-11-21  8:08     ` Daniel Vetter
2013-11-21  9:57       ` Chris Wilson
2013-11-21 10:55       ` Ville Syrjälä
2013-11-21  9:03 ` [PATCH 00/10] drm/i915: FBC fixes v2 Rodrigo Vivi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox