From: Daniel Vetter <daniel@ffwll.ch>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4] drm/i915: Use a spin lock to protect the pipe crc struct
Date: Tue, 22 Oct 2013 00:27:16 +0200 [thread overview]
Message-ID: <20131021222716.GN4830@phenom.ffwll.local> (raw)
In-Reply-To: <1382362170-1686-1-git-send-email-damien.lespiau@intel.com>
On Mon, Oct 21, 2013 at 02:29:30PM +0100, Damien Lespiau wrote:
> Daniel pointed out that it was hard to get anything lockless to work
> correctly, so don't even try for this non critical piece of code and
> just use a spin lock.
>
> v2: Make intel_pipe_crc->opened a bool
> v3: Use assert_spin_locked() instead of a comment (Daniel Vetter)
> v4: Use spin_lock_irq() in the debugfs functions (they can only be
> called from process context),
> Use spin_lock() in the pipe_crc_update() function that can only be
> called from an interrupt handler,
> Use wait_event_interruptible_lock_irq() when waiting for data in the
> cicular buffer to ensure proper locking around the condition we are
> waiting for. (Daniel Vetter)
>
> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2013-10-21 22:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 15:41 [PATCH] drm/i915: Use a spin lock to protect the pipe crc struct Damien Lespiau
2013-10-17 16:20 ` [PATCH v2] " Damien Lespiau
2013-10-17 16:32 ` [PATCH v3] " Damien Lespiau
2013-10-18 13:21 ` Daniel Vetter
2013-10-21 13:29 ` [PATCH v4] " Damien Lespiau
2013-10-21 22:27 ` Daniel Vetter [this message]
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=20131021222716.GN4830@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=damien.lespiau@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox