Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1270384lfc; Wed, 1 Jun 2022 13:43:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyT7SQ8MQEW+vyKWHfmSflAwWN3jfHg+7sT1bmzufLv2qK+ijAsvaUGeTDlYxk8YrjHogXh X-Received: by 2002:a17:90b:3c4e:b0:1e3:36c8:8496 with SMTP id pm14-20020a17090b3c4e00b001e336c88496mr11294458pjb.82.1654116235527; Wed, 01 Jun 2022 13:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654116235; cv=none; d=google.com; s=arc-20160816; b=SxGD6il95U26CVUjalWrL3Wk1KnEmB0EiDKGwYNAJAvb3523Z3OkRw7pnu9CdD4bCz mWsoE8Z8lFmjb92P9w1QLja/4rKDAxGSL4X1wFMGZ9MX8YVtl9v6wOOVdx/WCzI4e+gs bYmDbEukGjKLZlVAtxg4kLCcuBTiOVsgkeqrE2k5I5pVA+J724JfbzsTMt50AJX3T6hN WCcS3FuSPsJZ3orbWeUvKJQoEC45D+FFSohbUY46rFy+J87HuawiDrXxZ3yK4vGm+mxa 4ZgK/81UTVh0VblRX3WT0pXcg1P1XVIigKg63/jalmBr6Dv3xLJosQD4YTxRFYZtd1wW nmjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2D0n0MD9FVM5CduT1NCFZoyK1Wf+YfR32ZwltpKGpW0=; b=pXgn4dRmib1ISESDCB2IgjP1Lo9mUeV86BB80kjdeScAdjr66TdPT1V5jNoLKHW0FL Qq00Wos3sCSFOmYpp+sRSXtysooNhy/OFcuB5KG4OraBVQ2G7gdVJFjxBA/UruvDfLmc jI6/Cwc2x14GKHb8C9BXrafmGqg/Nt6nq8zo3dEN53aE3UZbu0NoEXhc6NUf7qeHudnz bHLR+F2OEkmCjddn8ewXpZuXF90o4mLUMXEmwcF0oZ7F+Pe7/W7kDALtINVlDxQt1LBA Z/1RLxU0Sr2Dwgq6DUlX+hXz1Bp7c4KKAaiM7ktkVP/O0qcGIgp9qUc15F/JHh0DweWw QvLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ZQT68xf2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bh6-20020a170902a98600b00163fc5e39a0si3208703plb.227.2022.06.01.13.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:43:55 -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=pass header.i=@chromium.org header.s=google header.b=ZQT68xf2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77EBE1F6B70; Wed, 1 Jun 2022 12:51:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345208AbiEaVGx (ORCPT + 99 others); Tue, 31 May 2022 17:06:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238177AbiEaVGv (ORCPT ); Tue, 31 May 2022 17:06:51 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A8B7B499 for ; Tue, 31 May 2022 14:06:49 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id h11so19164139eda.8 for ; Tue, 31 May 2022 14:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2D0n0MD9FVM5CduT1NCFZoyK1Wf+YfR32ZwltpKGpW0=; b=ZQT68xf2h4yPB1aO3z6MMCxjgrGQxzK6GsAwKC4AbtmM7jt7hPu9NP/5/38W/CoGs4 /U426ZyODXRJ/hIK1zizXSQUiCeTA65NiXm2tba9pIlaxq1ArpOmj55sVibamQlHpil1 HXArJ8lpnCJ5gJjSUw7JSWNWLGFhmor2Mb+W4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2D0n0MD9FVM5CduT1NCFZoyK1Wf+YfR32ZwltpKGpW0=; b=cWVkgL16lpp3lDRLOJJdht8Kok1JWUbzVBDDB5E/Py4yHF9reuXf/dJyaCa3/jWQce qHOmXG5/Vb0S3mGjHIFbceQN/uaOgRahO/98/ZsetjV2SqBrBtdhSU5K6+3xH1IGUOvV mgmS23NHI3gjNEAuv4vBfOtpOm4aFlOe6+lHGRXFmYXCLJAKUWMwOKtCQUmzoqjj2EH2 dj2+du1Aa8Xw24rGkfzfIRDcl0EEChqpPEZJIPCWBwqEguQTI4nqJgwNsAOi8j0N3TkA vexS6tM9ZO7OWJqqkC4bg4AApRGIsOaIt9GVlAO4ZlaRp18R6t1yg4ko6Wy6Dtac63BW RBiw== X-Gm-Message-State: AOAM532K+wav1PpyPuSITpp7X1eVC4JNTJpK5nILBzPs+51XhmeYJLLX 4A1YvZbHYzl1rSpiC/fJmMJ+R2AEO37+x/Sn X-Received: by 2002:a05:6402:2753:b0:423:3895:7031 with SMTP id z19-20020a056402275300b0042338957031mr65243982edd.170.1654031207674; Tue, 31 May 2022 14:06:47 -0700 (PDT) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com. [209.85.128.48]) by smtp.gmail.com with ESMTPSA id l27-20020a50d6db000000b0042dc25fdf5bsm6083515edj.29.2022.05.31.14.06.46 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 May 2022 14:06:46 -0700 (PDT) Received: by mail-wm1-f48.google.com with SMTP id r9-20020a1c4409000000b00397345f2c6fso1910621wma.4 for ; Tue, 31 May 2022 14:06:46 -0700 (PDT) X-Received: by 2002:a05:600c:3d8e:b0:397:73e3:8c83 with SMTP id bi14-20020a05600c3d8e00b0039773e38c83mr25043368wmb.29.1654031205884; Tue, 31 May 2022 14:06:45 -0700 (PDT) MIME-Version: 1.0 References: <20220510192944.2408515-1-dianders@chromium.org> <20220510122726.v3.3.Iba4b9bf6c7a1ee5ea2835ad7bd5eaf84d7688520@changeid> <20220521091751.opeiqbmc5c2okdq6@houat> In-Reply-To: From: Doug Anderson Date: Tue, 31 May 2022 14:06:34 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/4] drm/bridge: Add devm_drm_bridge_add() To: Maxime Ripard Cc: dri-devel , Hsin-Yi Wang , Abhinav Kumar , Philip Chen , Sankeerth Billakanti , Robert Foss , freedreno , Dmitry Baryshkov , linux-arm-msm , Stephen Boyd , Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Maxime, On Mon, May 23, 2022 at 10:00 AM Doug Anderson wrote: > > Hi, > > On Sat, May 21, 2022 at 2:17 AM Maxime Ripard wrote: > > > > 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. > > > > > > 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. > > I'm kinda confused. In this case there is no DRM device for the bridge > and, as per my CL description, "bridge-dev->dev" appears to be the > encoder device. I wasn't personally involved in discussions about it, > but I was under the impression that this was expected / normal. Thus > we can't make this DRM-managed. Since I didn't hear a reply, I'll assume that my response addressed your concerns. Assuming I get reviews for the other two patches in this series I'll plan to land this with Dmitry's review. -Doug