dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: adv7511: Fix crash in IRQ handler when no encoder is associated
Date: Thu, 14 May 2015 14:52:10 +0200	[thread overview]
Message-ID: <55549A7A.4080205@metafoo.de> (raw)
In-Reply-To: <1431606593-14561-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

On 05/14/2015 02:29 PM, Laurent Pinchart wrote:
> The ADV7511 is probed before its slave encoder init function associates
> it with an encoder. This creates a time window during which hot plug
> detection interrupts can occur with an encoder, resulting in a crash in
> the IRQ handler.
>
> Fix this by ignoring hot plug detection IRQs when no encoder is
> associated yet.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

> ---
>   drivers/gpu/drm/i2c/adv7511.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i2c/adv7511.c b/drivers/gpu/drm/i2c/adv7511.c
> index b728523e194f..2aaa3c88999e 100644
> --- a/drivers/gpu/drm/i2c/adv7511.c
> +++ b/drivers/gpu/drm/i2c/adv7511.c
> @@ -438,7 +438,7 @@ static int adv7511_irq_process(struct adv7511 *adv7511)
>   	regmap_write(adv7511->regmap, ADV7511_REG_INT(0), irq0);
>   	regmap_write(adv7511->regmap, ADV7511_REG_INT(1), irq1);
>
> -	if (irq0 & ADV7511_INT0_HDP)
> +	if (irq0 & ADV7511_INT0_HDP && adv7511->encoder)
>   		drm_helper_hpd_irq_event(adv7511->encoder->dev);
>
>   	if (irq0 & ADV7511_INT0_EDID_READY || irq1 & ADV7511_INT1_DDC_ERROR) {
>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2015-05-14 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 12:29 [PATCH] drm: adv7511: Fix crash in IRQ handler when no encoder is associated Laurent Pinchart
2015-05-14 12:52 ` Lars-Peter Clausen [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=55549A7A.4080205@metafoo.de \
    --to=lars@metafoo.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart+renesas@ideasonboard.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