Re: [PATCH v2 1/2] drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux