Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3303966lfo; Mon, 23 May 2022 01:10:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKLmj13a+e3i9716AyjYEOCURwAxDP2WGJqrt7m2A/IBTNnrf9CySR3ZOtv5WsUUcav/ip X-Received: by 2002:a17:903:2585:b0:162:19fe:a29 with SMTP id jb5-20020a170903258500b0016219fe0a29mr6429519plb.30.1653293439997; Mon, 23 May 2022 01:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653293439; cv=none; d=google.com; s=arc-20160816; b=xQ5crffHdOu0WaBeFchYPL0s9/+OWjirDqA6Gcv6ik5xnB/qhXSpBnDSfT360xCuxv 5ZhO6nSHefHf3eU+krW8hAK1Rl81HS49+FTbfD2v6T2lW3BV/zMv+bMJCkC8x5caLkhi Zt+XP17/s4a1YLrwzMtQYUDzcJLz8nBLLu768lC2bnD9I61paSfjiqowNpybOhrcFE3H Eikk4ONJmvBQ2Q6dlySO3PIgPerUiYHRrZpy6FY1mYBSQsFFcwiosC2IdhmmhlbnDbTr gWYL0RK9Tnx08Fd19v6JtuVyyLEBs9xE+zEhSQgxz2zqH7CLhBgnCGK5MY8O3ul28GLt B7rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=tSnVUwRgkIan0g05mJZYFNNv+SUzSaOd09kahxAg1rw=; b=qMROR9fjGwNIgB3g6GCJZc/dZobUSyF0bBsGiRO9qwRjV4eilpH1sELVl+vuZ4+C6Q TgIR4AQtcI9iftQ6ISa4yX8GOhAxENI4/nOA23gWfWdzETalNp/xNqUQA5IsATEudwSj ADqDp9Wy/7FVd+Yo4T+cRng4bIlKf8iY3vhtLsiZtCIYNEKHldc2t5xLxM4j5Bk3lWvZ tQLk5rLC6xRgbe60x/jPyieFbj0OUZAldG8dy3EHbJzItl8mm5YI+tFVL5YAYouNsDn7 MyENJCkKI67IbVx4LlpZtGmPJEA0P/cAHJJRnJeqTJo0E4V4e6bslbpAn7jCnE3+Ef8N Q5yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (expired) header.i=@cerno.tech; dkim=neutral (expired) header.i=@messagingengine.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 141-20020a630193000000b003fa0ab460b0si6646595pgb.839.2022.05.23.01.10.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 01:10:39 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=neutral (expired) header.i=@cerno.tech; dkim=neutral (expired) header.i=@messagingengine.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E5CB817FC10; Mon, 23 May 2022 00:05:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241338AbiEUJSE (ORCPT + 99 others); Sat, 21 May 2022 05:18:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230144AbiEUJSA (ORCPT ); Sat, 21 May 2022 05:18:00 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A33513C0A8; Sat, 21 May 2022 02:17:58 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C199B5C00E0; Sat, 21 May 2022 05:17:55 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sat, 21 May 2022 05:17:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1653124675; x= 1653211075; bh=tSnVUwRgkIan0g05mJZYFNNv+SUzSaOd09kahxAg1rw=; b=h 95GWU0jeLj958g55gzl2t8b8Id8N4+oKTBAfK5Sste9K6tC/nU5FY9iB5TtjE8Bm 1xF3vxIGNxTvG+OujgkuJshqEVBGO6bIYtyoJjK6AIdj69Hwnk/HVJiaW4G/wBmk vQ5pHzCtJlM84hts9w5bZnxrB2zCEuJJ+chsfPIzVJS7gttf6KItSr1JT2GyPd4K Nph0cnoF7nZAdRBEk4gmELoM5p+/yDE2hbtWDgxPdI73tyDHQguwtcjikh0pvFUJ iBHiGYUERPSWuRbh7CIymRE+vC0G/bhdMII3UIcSU1leUDDURq/uU+eRrd3jdNyh BbLsqKISsG0yvPAj5KxDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1653124675; x= 1653211075; bh=tSnVUwRgkIan0g05mJZYFNNv+SUzSaOd09kahxAg1rw=; b=F BzyzQSXPexamp04Xoi34eEM+p28ClmXflxOxvz3uDnS6d3QUmMPI8ha+HwqlzCjG izV4OWOYKe2yoM5zkFPhsl1GeB20Ao9xiaIqXdScG2MqX8d+lvkqwQxuzpJwrWBG QKEzEcRyFUkAHgLCI35Pb1R/zN3AsUzNY+vVzIavtyyoV6m2dN4kD7TLydiUOpe2 d8J6gBijtxuR7+f0JSicuAjb1wV0Un2360muscfugOcXJ26w1JuG1Ffx4QOtO6MO W7sqW5e3E6rfgmbL7J1iaRX0AHMmK6X9RLvBidKTNSA/+QEKoJeS0xOvG2jGQZg+ V2wcQHxg4Wz20ythBnpiw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrieeigddtjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjgesthhqredttddtvdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeetgfelgefggeekkefggfeludeiudffjeffgeevveekjedukedtudeuteef teefgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 21 May 2022 05:17:54 -0400 (EDT) Date: Sat, 21 May 2022 11:17:51 +0200 From: Maxime Ripard To: Douglas Anderson Cc: dri-devel@lists.freedesktop.org, Hsin-Yi Wang , Abhinav Kumar , Philip Chen , Sankeerth Billakanti , Robert Foss , freedreno@lists.freedesktop.org, Dmitry Baryshkov , linux-arm-msm@vger.kernel.org, Stephen Boyd , Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/4] drm/bridge: Add devm_drm_bridge_add() Message-ID: <20220521091751.opeiqbmc5c2okdq6@houat> References: <20220510192944.2408515-1-dianders@chromium.org> <20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Tue, May 10, 2022 at 12:29:43PM -0700, Douglas Anderson wrote: > This adds a devm managed version of drm_bridge_add(). Like other > "devm" function listed in drm_bridge.h, this function takes an > explicit "dev" to use for the lifetime management. A few notes: > * In general we have a "struct device" for bridges that makes a good > candidate for where the lifetime matches exactly what we want. > * The "bridge->dev->dev" device appears to be the encoder > device. That's not the right device to use for lifetime management. >=20 > Suggested-by: Dmitry Baryshkov > Signed-off-by: Douglas Anderson If we are to introduce more managed helpers, I think it'd be wiser to introduce them as DRM-managed, and not device managed. Otherwise, you'll end up in a weird state when a device has been removed but the DRM device is still around. Maxime