From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: Possible fb ref count issue with drm_plane_force_disable() Date: Tue, 15 Apr 2014 15:00:27 +0300 Message-ID: <534D1F5B.2040609@ti.com> References: <534684E8.9000203@ti.com> <20140411115054.GC18465@intel.com> <534B9FC0.2020700@ti.com> <534CF904.1070105@ti.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0188960472==" Return-path: Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by gabe.freedesktop.org (Postfix) with ESMTP id CA7626E1DE for ; Tue, 15 Apr 2014 05:00:34 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Rob Clark Cc: dri-devel List-Id: dri-devel@lists.freedesktop.org --===============0188960472== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2l3Cc6Ud1Oi74LMCVWwNG3mFU4kL2403u" --2l3Cc6Ud1Oi74LMCVWwNG3mFU4kL2403u Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 15/04/14 13:10, Rob Clark wrote: > so, what triggers this is that previously drm_framebuffer_remove() did > not process private planes. But now the fb shows up attached to a > plane as well, the crtc's primary plane. >=20 > I suspect there is some way in omap_crtc that I must have assumed the > ref the crtc held to the fb was sufficient for the plane to hold the > same ref. Which is no longer the case. So somewhere between > omap_crtc and it's primary plane, there now needs to be an extra level > of ref/unref. So ref should have gone up to 5. I still quite lost here... Looking at the non-primary plane's fb ref counting, some drivers add and remove refs to fb in plane->plane_update(). But not all. For omapdrm, update_plane takes a ref, but I'm not quite sure who frees that ref. Nothing in omap_plane.c seems to do that. Maybe the ref taken in omapdrm's update_plane is the "same" one that should be taken for the primary plane also. But I'm not sure where that should be taken, and if I do take the ref, then I guess it's freed somewhere else than in omapdrm. Taking and releasing refs in totally different places is really bad practice =3D). Tomi --2l3Cc6Ud1Oi74LMCVWwNG3mFU4kL2403u Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBAgAGBQJTTR9bAAoJEPo9qoy8lh71gqoP/jW0Vwt7VSyeZ5xkvMhEPKUj zgqf53e4M/CBqucWq3ije4HhaT9DzNsUgmaM6SbdLUucvXjHhQ5WGdU8rUzqv/Kk DNCmsaKv691BvAPmZgZHQjTLV5+qSvaH0Iihz15O2LIkiqfEs1floFpZWa+3qR3X F6eC6J2rHGJyQ5+YXyFGp2P6cEQK11Ipy/oeiSVG9dRUYByKfaOvMzCvR9rojUS6 VTCSslCZ7/aAA0iKmV3Em1CIYlhSOQ8P2RyZw/n4xk++h01v4so7W71EQ1XWZqqn aa9NqdLtWcu3GNMhXZJATkrYsJNh8vF2/5jQ/yh7faWXoiXm5ZO6mQCh1TYtuqgO Mo8fzhAGe+S8SMfOY+8PSZYPdQ2duPBFHIlqAIpganrC4g10wImXfrNph913P5Pm qCEl9Uo6BdmPap4LkdHpnnKT5kWwDQ7+OyVyLOLfyGcOTtRpBrogv8zdjMl62/x3 7eUA93Q1if69RFc1UKSUBu2pKQoUO0LvU0wjnaHPhMSlCwA+u7Xbyq4VBag49kj0 OWozjhEflvtGh9hpc4nq0bzZUGBc/NmdQvYP56B2AOjicn1WXsuEY0t+7eJcJjNL dGtLw/Cv/6u8rPOkjbYvr3sOjEnhGMSZA35zWjvpVQt7YV4Jn+hu8T1LRh5IMkHe xPNgLTFkwMLzQR8F8d81 =WoB/ -----END PGP SIGNATURE----- --2l3Cc6Ud1Oi74LMCVWwNG3mFU4kL2403u-- --===============0188960472== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0188960472==--