All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Archit Taneja <architt@codeaurora.org>,
	Xinliang Liu <xinliang.liu@linaro.org>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Sean Paul <seanpaul@chromium.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	David Airlie <airlied@linux.ie>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Bhumika Goyal <bhumirks@gmail.com>,
	Inki Dae <inki.dae@samsung.com>,
	dri-devel@lists.freedesktop.org,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [RFT] drm: adv7511/33: fix adv7511_cec_init() failure handling
Date: Thu, 16 Nov 2017 13:50:22 -0800	[thread overview]
Message-ID: <CALAqxLWstbhPJVbR1hT1AGKMdpZ-GdMyjmDmqE78B0jr0D+-Sw@mail.gmail.com> (raw)
In-Reply-To: <20171115123823.1895515-1-arnd@arndb.de>

On Wed, Nov 15, 2017 at 4:37 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> An otherwise correct cleanup patch from Dan Carpenter turned a broken
> failure handling from a feature patch by Hans Verkuil into a kernel
> Oops, so bisection points to commit 7af35b0addbc ("drm/kirin: Checking
> for IS_ERR() instead of NULL") rather than 3b1b975003e4 ("drm:
> adv7511/33: add HDMI CEC support").
>
> I've managed to piece together several partial problems, though
> I'm still struggling with the bigger picture:
>
> adv7511_probe() registers a drm_bridge structure that was allocated
> with devm_kzalloc(). It calls adv7511_cec_init(), which fails for an
> unknown reason, which in turn triggers the registered structure to be
> removed.
>
> Elsewhere, kirin_drm_platform_probe() gets called, which calls
> of_graph_get_remote_node(), and that returns NULL. Before Dan's
> patch we would go on with a NULL pointer here and register that,
> now kirin_drm_platform_probe() fails with -ENODEV.
>
> In a third driver, dsi_parse_dt() calls drm_of_find_panel_or_bridge(),
> which after not finding a panel goes on to call of_drm_find_bridge(),
> and that crashes due to the earlier list corruption.
>
> This addresses the first issue by making sure that adv7511_probe()
> does not leave behind any corrupted list entries. This should
> get the system back to boot but needs testing. From my understanding,
> there is at least one more bug that needs to be resolved to actually
> get everything to work again.

So I've started hitting the issue this patch tries to address (now
that the related code landed in Linus' tree). The only issue is that
with this fix, I don't see graphics initializing properly, so I
suspect something is still wrong with the error handling (though what
exactly I'm not sure).

If you have a new version of the patch with Hans' feedback in it, I'd
be happy to re-test.

thanks
-john

WARNING: multiple messages have this Message-ID (diff)
From: John Stultz <john.stultz@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Bhumika Goyal <bhumirks@gmail.com>,
	David Airlie <airlied@linux.ie>,
	lkml <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] [RFT] drm: adv7511/33: fix adv7511_cec_init() failure handling
Date: Thu, 16 Nov 2017 13:50:22 -0800	[thread overview]
Message-ID: <CALAqxLWstbhPJVbR1hT1AGKMdpZ-GdMyjmDmqE78B0jr0D+-Sw@mail.gmail.com> (raw)
In-Reply-To: <20171115123823.1895515-1-arnd@arndb.de>

On Wed, Nov 15, 2017 at 4:37 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> An otherwise correct cleanup patch from Dan Carpenter turned a broken
> failure handling from a feature patch by Hans Verkuil into a kernel
> Oops, so bisection points to commit 7af35b0addbc ("drm/kirin: Checking
> for IS_ERR() instead of NULL") rather than 3b1b975003e4 ("drm:
> adv7511/33: add HDMI CEC support").
>
> I've managed to piece together several partial problems, though
> I'm still struggling with the bigger picture:
>
> adv7511_probe() registers a drm_bridge structure that was allocated
> with devm_kzalloc(). It calls adv7511_cec_init(), which fails for an
> unknown reason, which in turn triggers the registered structure to be
> removed.
>
> Elsewhere, kirin_drm_platform_probe() gets called, which calls
> of_graph_get_remote_node(), and that returns NULL. Before Dan's
> patch we would go on with a NULL pointer here and register that,
> now kirin_drm_platform_probe() fails with -ENODEV.
>
> In a third driver, dsi_parse_dt() calls drm_of_find_panel_or_bridge(),
> which after not finding a panel goes on to call of_drm_find_bridge(),
> and that crashes due to the earlier list corruption.
>
> This addresses the first issue by making sure that adv7511_probe()
> does not leave behind any corrupted list entries. This should
> get the system back to boot but needs testing. From my understanding,
> there is at least one more bug that needs to be resolved to actually
> get everything to work again.

So I've started hitting the issue this patch tries to address (now
that the related code landed in Linus' tree). The only issue is that
with this fix, I don't see graphics initializing properly, so I
suspect something is still wrong with the error handling (though what
exactly I'm not sure).

If you have a new version of the patch with Hans' feedback in it, I'd
be happy to re-test.

thanks
-john
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-11-16 21:50 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 12:37 [PATCH] [RFT] drm: adv7511/33: fix adv7511_cec_init() failure handling Arnd Bergmann
2017-11-15 12:37 ` Arnd Bergmann
2017-11-15 12:58 ` Hans Verkuil
2017-11-15 12:58   ` Hans Verkuil
2017-11-16 16:42   ` Naresh Kamboju
2017-11-16 21:50 ` John Stultz [this message]
2017-11-16 21:50   ` John Stultz
2017-11-16 22:20   ` John Stultz
2017-11-16 22:20     ` John Stultz
2017-11-16 22:23     ` John Stultz
2017-11-16 22:23       ` John Stultz
2017-11-16 22:59     ` [RFC][PATCH] drm: adv7511/33: Fix " John Stultz
2017-11-16 22:59       ` John Stultz
2017-11-26 12:56       ` Archit Taneja
2017-11-28 21:32         ` John Stultz
2017-11-28 21:32           ` John Stultz
2017-11-29  5:05           ` Archit Taneja
2017-11-29  5:05             ` Archit Taneja
2017-11-29  8:15             ` Arnd Bergmann
2017-11-17  8:43     ` [RFC] [PATCH] " Hans Verkuil
2017-11-17  8:43       ` Hans Verkuil
2017-11-20 15:05       ` Hans Verkuil
2017-11-20 15:05         ` Hans Verkuil
2017-11-20 15:06         ` Hans Verkuil
2017-11-20 20:13       ` John Stultz
2017-11-20 20:13         ` John Stultz
2017-11-20 20:57     ` [PATCHv2] " Hans Verkuil
2017-11-20 20:57       ` Hans Verkuil
2017-11-20 23:12       ` John Stultz
2017-11-20 23:12         ` John Stultz
2017-11-21  6:48       ` Laurent Pinchart
2017-11-21  8:18         ` Hans Verkuil
2017-11-21  8:18           ` Hans Verkuil
2017-11-21  8:17     ` [PATCHv3] " Hans Verkuil
2017-11-21  8:17       ` Hans Verkuil
2017-11-21  8:22       ` Laurent Pinchart
2017-11-23  0:22       ` John Stultz
2017-11-23  0:22         ` John Stultz
2017-11-30  7:02         ` Archit Taneja
2017-11-30  7:02           ` Archit Taneja

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=CALAqxLWstbhPJVbR1hT1AGKMdpZ-GdMyjmDmqE78B0jr0D+-Sw@mail.gmail.com \
    --to=john.stultz@linaro.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=architt@codeaurora.org \
    --cc=arnd@arndb.de \
    --cc=bhumirks@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hans.verkuil@cisco.com \
    --cc=inki.dae@samsung.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=xinliang.liu@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.