From: Eric Engestrom <eric.engestrom@imgtec.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Don't block the kworker waiting for mode_config.lock in output_poll()
Date: Tue, 6 Dec 2016 11:55:14 +0000 [thread overview]
Message-ID: <20161206115514.GS1943@imgtec.com> (raw)
In-Reply-To: <20161206113715.30382-1-chris@chris-wilson.co.uk>
On Tuesday, 2016-12-06 11:37:15 +0000, Chris Wilson wrote:
> If we cannot acquire the mode_config.lock immediately, just back off and
s/mode_config.lock/mode_config.mutex lock/ ?
> queue a new attempt after the poll interval. This is mostly to stop the
> hung task spam when the system is deadlocked, but it will also lessen
> the load (in such extreme cases).
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
> ---
> drivers/gpu/drm/drm_probe_helper.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index ff9ba6f35248..0bf629354297 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -394,7 +394,11 @@ static void output_poll_execute(struct work_struct *work)
> if (!drm_kms_helper_poll)
> goto out;
>
> - mutex_lock(&dev->mode_config.mutex);
> + if (!mutex_trylock(&dev->mode_config.mutex)) {
> + repoll = true;
> + goto out;
> + }
> +
> drm_for_each_connector(connector, dev) {
>
> /* Ignore forced connectors. */
> --
> 2.11.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-12-06 11:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 11:37 [PATCH] drm: Don't block the kworker waiting for mode_config.lock in output_poll() Chris Wilson
2016-12-06 11:55 ` Eric Engestrom [this message]
2016-12-06 12:41 ` [Intel-gfx] " Daniel Vetter
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=20161206115514.GS1943@imgtec.com \
--to=eric.engestrom@imgtec.com \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--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;
as well as URLs for NNTP newsgroup(s).