From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 010FFC64ED8 for ; Mon, 27 Feb 2023 12:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eJWDa7c9jrMuD3z4+j4w+dKK/VIEaWLeXDqNG2R1bNk=; b=kX+hTcVBCJqtCQ rVfoh2K6bfxEcZst4elKzqPCWRs6xUJHnVZxsYUL0Cx787FmzUtTHQfKNrlqzUg9I6ogG+1xbJp81 Kex6UiPr7+6gqRHFBYqBFjhoOsbBESbvuno6cdybLGIviqhYNnIVMrN4RILAd9psbERvW1foFuJXr aT8oiBp5cCk1AHTJOZxpKrckSLPwsJQjYFulXpV0z7UuVGxW2wTB9r0WS+ilo9vMHoduWWiB+2Ccv QbrsIGeNLs1QceEGh/C14Or/Ra/ws1VnJBSW1MRo9+hI24xmEaRwA9CWW5aRHzUX5JSx9NiwrTRJD 1G1i39BphZ91eIcg7yjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWcc9-009b0M-0z; Mon, 27 Feb 2023 12:28:21 +0000 Received: from mail-yw1-x1133.google.com ([2607:f8b0:4864:20::1133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pWcc5-009az3-Dx for linux-arm-kernel@lists.infradead.org; Mon, 27 Feb 2023 12:28:19 +0000 Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-53852143afcso171257137b3.3 for ; Mon, 27 Feb 2023 04:28:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WwR6ZSekWbBuT7yj7OTRMClZyQccVnFXtI1dVPMFqqU=; b=Emc8xQxFSXMvSrm+i70nSvGeFZesVg4lDXPcqr+1kCyqci31jAiQYw/aHaeWi8Vh8f kVjiEWCuWvT2FYubxbZLPn6BSb5MnpuCwwn7cERSb7IActXOShQ0Ge9DBO2IPsFXEyRa Ir8VVHVN3q9oSupSQe0W1W4HNo1pKt2k2NHW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WwR6ZSekWbBuT7yj7OTRMClZyQccVnFXtI1dVPMFqqU=; b=CVzNiyk8oVjSYkDXEekm52dgUn15JoTbrf3eaQyzgRqNmX9tQzLo48rFiACH0P1KEK JEqIP5WEYa3YtTqufavqx31vJy+Ttl6or8GljOYSpJ9TatrCytPOa1yq0ko8HvKPdAcq ynVNqJxgwdDKs4gvcAi07WMhwKrLFry89vhNOdUn3e/2cu2jP6KghOtUrFp2w8UOgcjz FPdLLZo5jsqUskNPxdifgMvBbsDMRseoyL9w7VAJyzWFbaDHphRbrg6xJsEXCcIgVeUh UL40ZnPsGEz1L1D/nqHGuHU54hgbuSgDALgtjJ+S/nILLO88PHlITGMiKtBZsigSXKx0 AAdA== X-Gm-Message-State: AO0yUKUO5kOdh3j49mdQH00FRyLMFRIKwiG/puCSgv7f/usG5WcuZxLm E1Rzyo6+lHMvHw2tI56OqlIt9ghPLHRx/FWDP70P6w== X-Google-Smtp-Source: AK7set/J1/v6xMiecz4aEizWMrNP2r+5Uo6EjVIK1FJeWxI5ysPY4sPzBtm5HepMje66xHgnhJKxP8ZzBK4nloEmtfE= X-Received: by 2002:a81:ac60:0:b0:52a:92e9:27c1 with SMTP id z32-20020a81ac60000000b0052a92e927c1mr10155528ywj.10.1677500895190; Mon, 27 Feb 2023 04:28:15 -0800 (PST) MIME-Version: 1.0 References: <20230227113925.875425-1-jagan@amarulasolutions.com> <20230227113925.875425-3-jagan@amarulasolutions.com> <20230227121149.c3ibajgog3i2s2ek@houat> In-Reply-To: <20230227121149.c3ibajgog3i2s2ek@houat> From: Jagan Teki Date: Mon, 27 Feb 2023 17:58:03 +0530 Message-ID: Subject: Re: [PATCH v13 02/18] drm: bridge: panel: Support nodrm case for drmm_panel_bridge_add To: Maxime Ripard Cc: Andrzej Hajda , Inki Dae , Marek Szyprowski , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Laurent Pinchart , Marek Vasut , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Linus Walleij , Maarten Lankhorst X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230227_042817_504171_CA362EF4 X-CRM114-Status: GOOD ( 28.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 27, 2023 at 5:41 PM Maxime Ripard wrote: > > On Mon, Feb 27, 2023 at 05:09:09PM +0530, Jagan Teki wrote: > > drmm_panel_bridge_add DRM-managed action helper is useful for the bridge > > which automatically removes the bridge when drm pointer is cleaned. > > > > Supporting the same on non-component bridges like host DSI bridge requires > > a drm pointer which is indeed available only when a panel-bridge is found. > > > > For these use cases, the caller would call the drmm_panel_bridge_add by > > passing NULL to drm pointer. > > > > So, assign the bridge->dev to drm pointer for those cases. > > > > Cc: Maxime Ripard > > Cc: Laurent Pinchart > > Cc: Linus Walleij > > Cc: Maarten Lankhorst > > Signed-off-by: Jagan Teki > > --- > > Changes for v13: > > - new patch > > > > Note: use case on > > "[PATCH v13 04/18] drm: exynos: dsi: Switch to DSI panel or bridge find helper" > > > > drivers/gpu/drm/bridge/panel.c | 7 +++++++ > > 1 file changed, 7 insertions(+) > > > > diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c > > index d4b112911a99..45a0c6671000 100644 > > --- a/drivers/gpu/drm/bridge/panel.c > > +++ b/drivers/gpu/drm/bridge/panel.c > > @@ -402,6 +402,13 @@ struct drm_bridge *drmm_panel_bridge_add(struct drm_device *drm, > > if (IS_ERR(bridge)) > > return bridge; > > > > + /* > > + * For non-component bridges, like host DSI bridge the DRM pointer > > + * can be available only when a panel-bridge is found. > > + */ > > + if (!drm) > > + drm = bridge->dev; > > + > > Why can't the caller use bridge->dev? The first step of drmm_panel_bridge_add is to find the panel-bridge, so we can only get bridge->dev after this step. The caller doesn't know anything about the panel bridge it just sends a panel pointer to find the panel-bridge and then assigns bridge->dev to drm for DRM action. Please check this patch about the caller, https://patchwork.kernel.org/project/dri-devel/patch/20230227113925.875425-5-jagan@amarulasolutions.com/ > > Also, where did the devm_drm_of_dsi_get_bridge go? I thought you were > going to convert it to a drm-managed version? Look like your suggestion to can't use devm_drm_of_dsi_get_bridge and call the DRM-action from the driver, that is the reason I have removed this and done the same as your previous inputs. https://lore.kernel.org/all/20230203110437.otzl2azscbujigv6@houat/ Jagan. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel