Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbdHDUna (ORCPT ); Fri, 4 Aug 2017 16:43:30 -0400 Received: from anholt.net ([50.246.234.109]:49344 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751268AbdHDUn2 (ORCPT ); Fri, 4 Aug 2017 16:43:28 -0400 From: Eric Anholt To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, Archit Taneja , Andrzej Hajda , Thierry Reding , linux-kernel@vger.kernel.org, Daniel Vetter Subject: Re: [PATCH v5 2/6] drm/bridge: Add a devm_ allocator for panel bridge. In-Reply-To: <2023170.2CE3xBA9bq@avalon> References: <20170718210510.12229-1-eric@anholt.net> <20170718210510.12229-2-eric@anholt.net> <2023170.2CE3xBA9bq@avalon> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Fri, 04 Aug 2017 13:43:25 -0700 Message-ID: <87zibfqd1u.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2009 Lines: 54 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Laurent Pinchart writes: > Hi Eric, > > (CC'ing Daniel) > > Thank you for the patch. > > On Tuesday 18 Jul 2017 14:05:06 Eric Anholt wrote: >> This will let drivers reduce the error cleanup they need, in >> particular the "is_panel_bridge" flag. >>=20 >> v2: Slight cleanup of remove function by Andrzej > > I just want to point out that, in the context of Daniel's work on hot-unp= lug,=20 > 90% of the devm_* allocations are wrong and will get in the way. All DRM = core=20 > objects that are accessible one way or another from userspace will need t= o be=20 > properly reference-counted and freed only when the last reference disappe= ars,=20 > which could be well after the corresponding device is removed. I believe = this=20 > could be one such objects :-/ Sure, if you're hotplugging, your life is pain. For non-hotpluggable devices, like our SOC platform devices (current panel-bridge consumers), this still seems like an excellent simplification of memory management. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlmE3G4ACgkQtdYpNtH8 nuhtKxAAshUWJj5BhS+kca8y1GAjWoezm0bxuWNvUjruENUcZTxXmXJwQ5SojHJl NCypK3m6ocG1ptfrbLrJFxpjlBpbLuGtgscOXliAm8SDif9eA10/D9d0zcj0QARa dC8wGnXmphIt/mJ0vBB6XFZxcvoeoXA7IrEiw7C0aq3jMx8DDO3A54pDf5FkAW+H l1t4B1/6xQ9DTEZCIgG+ZXKApHcRQKy3tPPuz2uZ+ZnhSIauKGxo4XsEoRpmgof5 5SyH8U/IKHlAj87ifUUrtLzTUfkza2Ju5gMT4VQn2whNVfk+kFLtDssSTqog6gVF mw0qqgNUS3jAZ9Mi0HBzMo6sNnGdkKUD7s2GPELkCvHkUXgunN8i4tC3mKRqC2dw 7hA7vWD8KSGMOKvSGO6TZHlMObnP1klOWWmxZnyZppWNBANXI1yorzSU5FE+JwNV DI3vC5spY1CkgaLMrb+7fFCpCsMY4VWPW3D1zmc0TN8By04m2qn5hy0F0oJy6o/w /U09EokAe1lCcacK5po2XE7HJWZIgvzkHO9MaWP7IGrXOe30DyotE+XRZfHksCZk PetI5QUgcnATTPylRZzB3Qvm8D3saDCc/EV2stEbMF4juQLMH7wUjEdyYkGHqZ/6 myJz+7/v87Kn6soL/Dn5+wF3ki7ebNqqVvJextjanrkIaU9E0rY= =Suul -----END PGP SIGNATURE----- --=-=-=--