dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	kernel@pengutronix.de, Daniel Stone <daniels@collabora.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config
Date: Wed, 15 Jun 2016 10:16:06 +0200	[thread overview]
Message-ID: <1465978566.3539.7.camel@pengutronix.de> (raw)
In-Reply-To: <20160614160835.GV1338@phenom.ffwll.local>

Am Dienstag, den 14.06.2016, 18:08 +0200 schrieb Daniel Vetter:
> On Thu, Jun 02, 2016 at 07:27:51PM +0200, Philipp Zabel wrote:
> > Since commit 0955c1250e96 ("drm/crtc: take references to connectors used
> > in a modeset. (v2)"), the reference counts of all connectors in the
> > drm_mode_set given to drm_crtc_helper_set_config are incremented, and then
> > the reference counts of all connectors are decremented on success, but in a
> > temporary copy of the connector structure. This leads to the following
> > error after the first modeset on imx-drm:
[...]
> Commit message needs to be augmented:
> 
> "Note that this can only be hit when fbdev emulation is disabled, since
> then the refcount drops from 1 to 0 and we call the connector destroy
> functions on the backup copy, which eventually results in tears. With
> fbdev emulation the refcount only goes down from 2 to 1 ever. And since we
> unconditionally increment the refcount on the real object, the refcount of
> that will slowly increase. The backup connector's refcount doesn't matter,
> since we kfree() that either way in the end of
> drm_crtc_helper_set_config()."

Indeed, it all makes sense now. Thanks!

regards
Philipp

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

      parent reply	other threads:[~2016-06-15  8:16 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
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 [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=1465978566.3539.7.camel@pengutronix.de \
    --to=p.zabel@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