linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	Archit Taneja <architt@codeaurora.org>,
	Wolfram Sang <wsa+renesas@sang-engineering.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [RFC][PATCH 2/3] drm/bridge: adv7511: Add 200ms delay on power-on
Date: Tue, 22 Nov 2016 10:07:53 -0800	[thread overview]
Message-ID: <CALAqxLXpYfnqPaxRNpiTqo25xyN3ENLPd3L8nfRoi0Gk5xDTyQ@mail.gmail.com> (raw)
In-Reply-To: <CALAqxLUMCD0PywzYJPn7OccM-xbyP=M0zRJX6+MfFtHBSSGvcA@mail.gmail.com>

On Tue, Nov 22, 2016 at 9:38 AM, John Stultz <john.stultz@linaro.org> wrote:
>
> Interestingly, without the msleep added in this patch, removing the
> wait_event_interruptible_timeout() method in adv7511_wait_for_edid()
> and using the polling loop seems to make things just as reliable. So
> maybe something is off with the irq handling here instead?

Ahhhh.. So I think the trouble here is the that when we fail waiting
for the irq, the backtrace is as follows:

[    8.318654] [<ffffff8008087c28>] dump_backtrace+0x0/0x1a0
[    8.318661] [<ffffff8008087ddc>] show_stack+0x14/0x20
[    8.318671] [<ffffff80084344f0>] dump_stack+0x90/0xb0
[    8.318680] [<ffffff8008534650>] adv7511_get_edid_block+0x2c8/0x320
[    8.318687] [<ffffff80085214a8>] drm_do_get_edid+0x78/0x280
[    8.318693] [<ffffff8008534728>] adv7511_get_modes+0x80/0xd8
[    8.318700] [<ffffff8008534794>] adv7511_connector_get_modes+0x14/0x20
[    8.318710] [<ffffff8008500a54>]
drm_helper_probe_single_connector_modes+0x2bc/0x500
[    8.318718] [<ffffff800850e400>] drm_fb_helper_hotplug_event+0x130/0x188
[    8.318726] [<ffffff800850ee68>] drm_fbdev_cma_hotplug_event+0x10/0x20
[    8.318733] [<ffffff8008535718>] kirin_fbdev_output_poll_changed+0x20/0x58
[    8.318740] [<ffffff8008500cc0>] drm_kms_helper_hotplug_event+0x28/0x38
[    8.318748] [<ffffff80085010d8>] drm_helper_hpd_irq_event+0x138/0x180
[    8.318754] [<ffffff8008533850>] adv7511_irq_process+0x78/0xd8
[    8.318761] [<ffffff80085338c4>] adv7511_irq_handler+0x14/0x28
[    8.318769] [<ffffff8008100060>] irq_thread_fn+0x28/0x68
[    8.318775] [<ffffff8008100350>] irq_thread+0x128/0x1e8
[    8.318782] [<ffffff80080d2e68>] kthread+0xd0/0xe8
[    8.318788] [<ffffff8008082e80>] ret_from_fork+0x10/0x50

So we're actually in irq handling the hotplug interrupt, which is why
we never get the irq notification when the edid is read.

I suspect we need to use a workqueue to do the hotplug handling out of irq.

thanks
-john

  reply	other threads:[~2016-11-22 18:15 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22  0:37 [RFC][PATCH 0/3] adv7511 EDID probing improvements John Stultz
2016-11-22  0:37 ` [RFC][PATCH 1/3] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally John Stultz
2016-11-22  8:14   ` Laurent Pinchart
2016-11-22  8:16     ` John Stultz
2016-11-22  8:27       ` Laurent Pinchart
2016-11-22 17:25     ` John Stultz
2016-11-22 17:38       ` Laurent Pinchart
2016-11-22 17:44         ` John Stultz
2016-11-22 19:46         ` John Stultz
2016-11-23  3:50           ` Archit Taneja
2016-11-28 18:44             ` John Stultz
2016-11-22  0:37 ` [RFC][PATCH 2/3] drm/bridge: adv7511: Add 200ms delay on power-on John Stultz
2016-11-22  8:25   ` Laurent Pinchart
2016-11-22 17:38     ` John Stultz
2016-11-22 18:07       ` John Stultz [this message]
2016-11-22 18:23         ` Laurent Pinchart
2016-11-22 18:53           ` John Stultz
2016-11-23  7:55           ` Daniel Vetter
2016-11-25  0:23             ` Laurent Pinchart
2016-11-25  6:33               ` Daniel Vetter
2016-11-22  0:37 ` [RFC][PATCH 3/3] drm/bridge: adv7511: Enable HPD interrupts to support hotplug and improve monitor detection John Stultz
2016-11-22  8:29   ` Laurent Pinchart

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=CALAqxLXpYfnqPaxRNpiTqo25xyN3ENLPd3L8nfRoi0Gk5xDTyQ@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lars@metafoo.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).