Received: by 2002:ab2:7a09:0:b0:1f8:46dc:890e with SMTP id k9csp67375lqo; Wed, 15 May 2024 07:58:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLB5dURX3XViHX3hbTuvxB0X7o9gVRgLi4I84cWikgFrEH6/3yHCGFokdSXtfMpY98vVRL0WO3SlF301SwQi3jnpqvE7RfHmoCswz6+A== X-Google-Smtp-Source: AGHT+IE29jpi4cuhSiEkoD+LAqj80fpth8FiuRiJninV9MlI87Cq4n2xCpRECj+oOBiauZj/TSdG X-Received: by 2002:a05:6a20:2447:b0:1af:d9df:d8de with SMTP id adf61e73a8af0-1afde0afc3fmr18977549637.21.1715785137953; Wed, 15 May 2024 07:58:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715785137; cv=pass; d=google.com; s=arc-20160816; b=aQigEOOCZdH3FYQQq8ikid/ltMkg0FP8Anh9x/Xja2oOFaIM1efyt98ErZlJy8KhS4 osKeg9T6ZYiTmxlj/uYDx45H9e4CQaAxp5U2qgEmX/9ZTCl0KeAa9g5VMgXih23pxuPs +S6b4uuKVDvmv767ZoCXWjSs00NEp5I9z8x1BedkbYzWyoDEpG727/WxYsKu+d4Uy+BP Z973najqfGQChwBR/KmK7uw+Lim/1rBfkMozkNoofIcqs6bQhfFXPiRLRdGO1LLzKYSB DcMCwkX041uUGTlKbFROn6CYkfznuWZWQSGjVw48jQK9xAZaVwtPV1aO3wHBmQvt+DF3 O3UA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=H4fvttaW5ayZbuhZGdEunUdzP2phRBo1WR9XclwqbBA=; fh=P41ScactKO94JSCi7BGldhyal2NQGx4DsCaOEoiWLHE=; b=gX91w4P4duxZn1GAddH5yRjYprVDKrM6q+wjToI2vS9Tz4t0FuWi4hFQFO9ZzYhDIG yHgqV3slvYOUAViMxYiS/qw+01QEK8zutmoF1lt3CAWj7MShGl+00MmRoVpoIgB9Ydzn MHnqaE+XDUd8O+Ox4aWTOw41aBXF2k9qVI9SRwSg5MnIRabUMlNrlbkEiHHV8NhxcFT9 pOLBSSCNoUxzn8oNwdIV38Tixvd/brUphY+nHAh4aDp3rpMiS+ZMJI9Ik0AVOZCkFHYh vm1Gcnyu1U1v4wYvk9TrWFA84vwIj+XrLSbgZRmamRi2kYQAuuPMFmCK8xSDYidd0ncM jepw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WSTDR7vc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180032-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f6f77si14583763a12.333.2024.05.15.07.58.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 07:58:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180032-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WSTDR7vc; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-180032-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180032-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 77F82B21BFC for ; Wed, 15 May 2024 14:58:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ECFC15573D; Wed, 15 May 2024 14:58:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WSTDR7vc" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C750E1E480 for ; Wed, 15 May 2024 14:58:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715785123; cv=none; b=VgGg7VOGmnheeW1wjddlmRMAODyn/ma3K9Kq5iRGmfOYn+xPNB1M/VFpbm9tr2Zv9TyGHHgGG7FcfF4PMuQ2CcCoZ7DZFRhCJi/DudCRTUEN6Spj+dlmyQAxa/num61bO0NENtVLORo2q1R1c610lZSJcSBaNq3Brzh1DQ6fTTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715785123; c=relaxed/simple; bh=H4fvttaW5ayZbuhZGdEunUdzP2phRBo1WR9XclwqbBA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mg5+wG2g9dyd4CkyrOM3KoXdariiMeWkG394varZFoWxk/bnaPSSvuo20RYCFlqdJ9cPWcO1+UqFPMAsmF3FlgriqSA4eR61h42nv3mY9MPXts8pokL3TXecW+aY96Up7LM2TgC3lT2KFw3LSqb7R/HMBUwIOxM/LW709KfTEqA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WSTDR7vc; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6AF9C116B1; Wed, 15 May 2024 14:58:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715785123; bh=H4fvttaW5ayZbuhZGdEunUdzP2phRBo1WR9XclwqbBA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WSTDR7vcNt1KrNEwvkAlMGG6a0Qo9/t5SF3cOP3RroxNld3mBPBTaWAapgj38N44L UMezzf6AULi4TxjtPWMNzRZVgxEQaoMKYffcIyBTZhl2VTXhK43lSWXiwuy4HREKBq xSbw5wfswH747qb3wIBb0Ny8u7hw+HRZGY1vvc5amWd0juw1oEkSdFYQH9L3jPId2/ BMJPGj9yU2c1t63t/Amii0IcXTRm8qzG9T0Je1lzj+RrA2aXcdZT/Kt8C2CzDCgG0d hQXWc+/nYJz3uOr4JNwaaJDcWxYu8DF6d+gNg6jH3KCXTlH8MpD7r9Bvkwfm42ITaV eaMvBA5I+vMdw== Date: Wed, 15 May 2024 16:58:40 +0200 From: Maxime Ripard To: Sui Jingfeng Cc: Neil Armstrong , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] drm/bridge: Add 'struct device *' field to the drm_bridge structure Message-ID: <20240515-copper-chimpanzee-of-fortitude-ff3dab@penduick> References: <20240514154045.309925-1-sui.jingfeng@linux.dev> <20240514-scarlet-corgi-of-efficiency-faf2bb@penduick> <20240515-fair-satisfied-myna-480dea@penduick> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="nnqcwypgq74a2js6" Content-Disposition: inline In-Reply-To: --nnqcwypgq74a2js6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 15, 2024 at 10:53:00PM +0800, Sui Jingfeng wrote: > On 5/15/24 22:30, Maxime Ripard wrote: > > On Wed, May 15, 2024 at 12:53:33AM +0800, Sui Jingfeng wrote: > > > On 2024/5/15 00:22, Maxime Ripard wrote: > > > > Hi, > > > >=20 > > > > On Tue, May 14, 2024 at 11:40:43PM +0800, Sui Jingfeng wrote: > > > > > Because a lot of implementations has already added it into their = drived > > > > > class, promote it into drm_bridge core may benifits a lot. drm br= idge is > > > > > a driver, it should know the underlying hardware entity. > > > > Is there some actual benefits, or is it theoretical at this point? > > >=20 > > >=20 > > > I think, DRM bridge drivers could remove the 'struct device *dev' > > > member from their derived structure. Rely on the drm bridge core > > > when they need the 'struct device *' pointer. > >=20 > > Sure, but why do we need to do so? > >=20 > > The other thread you had with Jani points out that it turns out that > > things are more complicated than "every bridge driver has a struct > > device anyway", it creates inconsistency in the API (bridges would have > > a struct device, but not other entities), and it looks like there's no > > use for it anyway. > >=20 > > None of these things are deal-breaker by themselves, but if there's only > > downsides and no upside, it's not clear to me why we should do it at al= l. > > It can reduce boilerplate. You're still using a conditional here. Maxime --nnqcwypgq74a2js6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZkTNnwAKCRAnX84Zoj2+ dpZCAYCvwVAwC/xH/sNA6jr+W48uYJHUiGFm1EaRagcrEpn+Vmm6ntjQFe8LLIpl eQetDGgBgN4V7i9OmkXkcdhGNkhsT/oGnh3L3/mF7PFNx89Z5mm5Cnw9b0axTGbn lAqrW3gWLg== =4/O0 -----END PGP SIGNATURE----- --nnqcwypgq74a2js6--