From: Lucas Stach <l.stach@pengutronix.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: kernel@pengutronix.de, Daniel Vetter <daniel.vetter@ffwll.ch>,
dri-devel@lists.freedesktop.org,
Daniel Stone <daniels@collabora.com>
Subject: Re: [PATCH v2 1/2] drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config
Date: Tue, 14 Jun 2016 13:57:13 +0200 [thread overview]
Message-ID: <1465905433.16135.0.camel@pengutronix.de> (raw)
In-Reply-To: <20160613181847.GK1338@phenom.ffwll.local>
Am Montag, den 13.06.2016, 20:18 +0200 schrieb Daniel Vetter:
[...]
> > > > Only the reference count of connectors that weren't previously bound to
> > > > an encoder should be incremented after a call to drm_crtc_helper_set_config.
> > > > And only the reference count of connectors that were previously bound to
> > > > an encoder and are unbound afterwards should ever be decremented.
> > > > The reference counts of the temporary copies in the save_connectors
> > > > should not be touched at all.
> > > >
> > > > This patch fixes the above error by only incrementing the reference count
> > > > of those connectors in the set that are initially not bound to any encoder,
> > > > and also by restoring the reference count of only those connectors in the
> > > > set in the failure case.
> > > >
> > > > Fixes: 0955c1250e96 ("drm/crtc: take references to connectors used in a modeset. (v2)")
> > > > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> > >
> > > I'd like to analyze this bug first a bit more (since it seems to be imx
> > > specific) before review/merging, per our ongoing discussion. The current
> > > code is definitely wrong, but looking at it I more expected a leak (since
> > > we decrement saved structures, not the real ones), not an explosion.
> > > -Daniel
> > >
> > There is a regression bug open against nouveau, which shows the same
> > symptoms and is fixed by these patches.
> >
> > https://bugzilla.kernel.org/show_bug.cgi?id=119861
> >
> > It is not specific to imx-drm, but doesn't explode on desktop system
> > right away, probably due to the FB emulation holding a reference to all
> > connectors.
>
> Sensible theory. Can you confirm that enabling fbdev emulation on imx
> works around this?
Yes, we are unable to reproduce the issue if fbdev emulation is enabled.
Regards,
Lucas
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-06-14 11:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 17:27 [PATCH v2 1/2] drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config Philipp Zabel
2016-06-02 17:27 ` [PATCH v2 2/2] drm/crtc: only store the necessary data for set_config rollback Philipp Zabel
2016-06-02 20:26 ` Daniel Vetter
2016-06-02 20:28 ` [PATCH v2 1/2] drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config Daniel Vetter
2016-06-13 16:49 ` Lucas Stach
2016-06-13 18:18 ` Daniel Vetter
2016-06-14 11:57 ` Lucas Stach [this message]
2016-06-14 14:51 ` Philipp Zabel
2016-06-14 16:03 ` Daniel Vetter
2016-06-14 16:08 ` Daniel Vetter
2016-06-14 17:40 ` Daniel Vetter
2016-06-15 8:16 ` Philipp Zabel
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=1465905433.16135.0.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=daniels@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
/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