public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Matt Roper <matthew.d.roper@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 4/5] drm/i915: Change locking for struct_mutex, v2.
Date: Mon, 2 Nov 2015 14:55:39 +0100	[thread overview]
Message-ID: <56376B5B.7090900@linux.intel.com> (raw)
In-Reply-To: <20151102130623.GO2014@nuc-i3427.alporthouse.com>

Op 02-11-15 om 14:06 schreef Chris Wilson:
> On Mon, Nov 02, 2015 at 01:57:59PM +0100, Maarten Lankhorst wrote:
>> struct_mutex is being locked for every plane in intel_prepare_plane_fb and
>> intel_cleanup_plane_fb. This can be optimized by acquiring struct_mutex first
>> before calling the atomic helpers. This way the lock only needs to be acquired
>> twice in ->atomic_commit(). Once for pinning new framebuffers at the start,
>> the second time for unpinning old framebuffer.
> A little explanation that you move the locking into the caller would
> help clarify the patch.
>
>> @@ -13453,10 +13461,6 @@ intel_prepare_plane_fb(struct drm_plane *plane,
>> @@ -13520,7 +13521,6 @@ intel_cleanup_plane_fb(struct drm_plane *plane,
> Please document that you now expect both of these functions to be called
> with struct_mutex held. Also is there any opportunity to reduce the
> struct_mutex lock time?
>
Patch 5/5 reduces locking time. It moves most waiting out of struct_mutex except for the full idle during modesets. :)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-11-02 13:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-23 11:27 [PATCH 0/5] drm/i915: Interruptible framebuffer pinning Maarten Lankhorst
2015-09-23 11:27 ` [PATCH 1/5] drm/i915: Make plane fb tracking work correctly, v2 Maarten Lankhorst
2015-10-14 12:59   ` Ander Conselvan De Oliveira
2015-10-14 13:54     ` Maarten Lankhorst
2015-09-23 11:27 ` [PATCH 2/5] drm/i915: Make prepare_plane_fb fully interruptible Maarten Lankhorst
2015-10-16 11:21   ` Ander Conselvan De Oliveira
2015-10-19  9:39     ` Daniel Vetter
2015-09-23 11:27 ` [PATCH 3/5] drm/i915: Make wait_for_flips interruptible Maarten Lankhorst
2015-10-19 13:16   ` Ander Conselvan De Oliveira
2015-10-19 13:30     ` Daniel Vetter
2015-10-20  7:38       ` Ander Conselvan De Oliveira
2015-10-20  8:10         ` Daniel Vetter
2015-10-20 13:07           ` Ander Conselvan De Oliveira
2015-10-19 14:38     ` Maarten Lankhorst
2015-10-19 15:09     ` [PATCH 2.9/5] drm/i915: Do not wait for flips in intel_crtc_disable_noatomic Maarten Lankhorst
2015-10-20 12:56       ` Ander Conselvan De Oliveira
2015-10-20 18:33       ` Daniel Vetter
2015-09-23 11:27 ` [PATCH 4/5] drm/i915: Change locking for struct_mutex Maarten Lankhorst
2015-10-28 22:48   ` Matt Roper
2015-11-02 12:57     ` [PATCH v2 4/5] drm/i915: Change locking for struct_mutex, v2 Maarten Lankhorst
2015-11-02 13:06       ` Chris Wilson
2015-11-02 13:55         ` Maarten Lankhorst [this message]
2015-09-23 11:27 ` [PATCH 5/5] drm/i915: Wait for object idle without locks in atomic_commit Maarten Lankhorst
2015-10-29  0:30   ` Matt Roper
2015-11-02 13:13     ` Maarten Lankhorst
2015-11-02 13:46       ` Chris Wilson
2015-11-02 13:53         ` Maarten Lankhorst
2015-11-02 13:58           ` 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=56376B5B.7090900@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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