All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Archit Taneja <archit@ti.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: Possible fb ref count issue with drm_plane_force_disable()
Date: Fri, 11 Apr 2014 10:03:05 +0300	[thread overview]
Message-ID: <534793A9.6060807@ti.com> (raw)
In-Reply-To: <53479270.6070501@ti.com>


[-- Attachment #1.1: Type: text/plain, Size: 1353 bytes --]

On 11/04/14 09:57, Archit Taneja wrote:

> Yes, I meant our driver should call drm_framebuffer_remove() only when
> we are know that the fb reference omapdrm had taken(the one in
> update_pin), has a corresponding fb unref called(in unpin_worker).
> 
> Isn't that something omapdrm should take care of?

Yes, we could do it, and it's probably something we should do. I haven't
looked at it, so I don't know how easy or difficult it is to make sure
the fb won't be used after we think it has been disabled.

But even so, the drm_framebuffer_remove() seems to be designed to handle
the case where the fb is still in use, but it's failing.

>> I forgot to mention that if I comment out the unref in
>> drm_plane_force_disable(), the ref counts match and all looks fine. And
>> also that I didn't see this issue with 3.14.
> 
> That's strange. I guess there must be an extra unref happening somewhere
> in the newer commits. Did you try a diff of drm code between the 2
> kernels? :)

Not yet. I'm guessing that it's about the plane changes. There was
already one issue with omapdrm, where the crtc calls plane->destroy on
the crtc's primary plane. With the latest changes, the all the planes,
including the primary planes, are destroyed automatically, so the crtc's
destroy call is not needed (and causes a crash).

 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

  reply	other threads:[~2014-04-11  7:03 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 [this message]
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
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=534793A9.6060807@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=archit@ti.com \
    --cc=dri-devel@lists.freedesktop.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.