From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Andrzej Hajda <a.hajda@samsung.com>,
Rob Clark <robdclark@gmail.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: Possible fb ref count issue with drm_plane_force_disable()
Date: Tue, 15 Apr 2014 13:44:29 +0300 [thread overview]
Message-ID: <534D0D8D.3070100@ti.com> (raw)
In-Reply-To: <534D09F9.2030608@samsung.com>
[-- Attachment #1.1: Type: text/plain, Size: 1076 bytes --]
On 15/04/14 13:29, Andrzej Hajda wrote:
> I have experienced similar problem with exynos_drm. I have found that
> in exynos_drm_crtc_mode_set there is line:
>
> plane->fb = crtc->primary->fb;
>
> without drm_framebuffer_reference.
> In result drm_framebuffer_remove dereferences it twice:
> - because of crtc->primary->fb == fb,
> - because of fb being on dev->mode_config.plane_list
>
> I am not sure how it should be solved properly, but adding
> drm_framebuffer_reference in exynos_drm_crtc_mode_set helps.
>
> In omap_plane_mode_set there is also assignment:
>
> plane->fb = fb
>
> without drm_framebuffer_reference so maybe it can be solved the same way.
The omap_plane_mode_set() is called also when using non-primary planes.
For those the refcounting goes right at the moment (I think), so adding
drm_framebuffer_reference() at that func would break it.
I guess I could check if the plane is primary, and add ref only then. Or
add the ref in omap_crtc, before it calls omap_plane_mode_set(). Both
feel a bit hacky...
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-04-15 10:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 11:47 Possible fb ref count issue with drm_plane_force_disable() Tomi Valkeinen
2014-04-11 6:31 ` Archit Taneja
2014-04-11 6:40 ` Tomi Valkeinen
2014-04-11 6:57 ` Archit Taneja
2014-04-11 7:03 ` Tomi Valkeinen
2014-04-11 7:19 ` Daniel Vetter
2014-04-11 11:50 ` Ville Syrjälä
2014-04-14 8:43 ` Tomi Valkeinen
2014-04-15 9:16 ` Tomi Valkeinen
2014-04-15 10:10 ` Rob Clark
2014-04-15 10:29 ` Andrzej Hajda
2014-04-15 10:44 ` Tomi Valkeinen [this message]
2014-04-15 12:24 ` Rob Clark
2014-04-15 13:30 ` Tomi Valkeinen
2014-04-15 22:01 ` Daniel Vetter
2014-04-15 12:00 ` Tomi Valkeinen
2014-04-15 21:57 ` Daniel Vetter
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=534D0D8D.3070100@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=a.hajda@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=robdclark@gmail.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