| Message ID | 20230227113925.875425-3-jagan@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-amarula+bncBD7MFH7A7EEBBCNN6KPQMGQECACEI3Q@amarulasolutions.com> X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DC4A03F9C2 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 27 Feb 2023 12:39:54 +0100 (CET) Received: by mail-pg1-f199.google.com with SMTP id b21-20020a63cf55000000b004393806c06esf1783395pgj.4 for <linux-amarula@patchwork.amarulasolutions.com>; Mon, 27 Feb 2023 03:39:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677497993; cv=pass; d=google.com; s=arc-20160816; b=auSbhyf4ZTnpgnakyP6qYNlwhdVlJyFr6B9iSQWPiKDeFT9XeIR0JczNx6r3Ss5+a0 aI9eXA2vNOabDMV4HOBF0LFyEQN5HcAQZFaMFTb+eBc8rJISrCvk76iCTbV133YSN8sp vtmcJRdtgJuMGfJNwDcW8l1DRyv/pOf4UBi72wKUCBV4kuF3JP9W9HjX/JM4HPD3ZKPb WgPpnWEFi8ouvlY4RSoXmONmZPdFkaLr14e2IWCENF38loW/HKYRcLYhlzJ1NE/A3sY+ bYD62SjgHx9fH2rY6DTp7fZxLf7ieHrYWRleAHG32KaFKzILphRlE4Z/m1XXPVkx6hLW byfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PXyMaYakWpzeHxDItJjMLvVDwLUKRthExKSMycQHk94=; b=G6glJLkuNz0t5Q/3Nw0FNWAN3hufvBE3RiOmBqcpRWluALOcYs+jVevEgoS7hyUTF3 J0auHTJRgDQaZHoSmPkv3tbpItPXB2RzzRACcZ4oFxJemEy/PWgDs+uWXQ6jESz592ta +lP6oyJB8caSiJ5yPVrorVDxstQpXi3IrflnN8j/D5jHGYF5fVZFSJFJy0ZtHGl5CPLy 0L8kSv1wHYGMUp1xx/fDWTeZ1S4/+K2X6yxEXKgnrOWkaNwHYZPRUjboSmErJSjXtXNx lIHKiD+RrUc2bl5LTTxnoCwBattc7PKCbCR7jvhRMkZPMJcD4tgwCiwNBrjuZFRvBwMG BmYg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="XO8VVmB/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=PXyMaYakWpzeHxDItJjMLvVDwLUKRthExKSMycQHk94=; b=ffmLgU62GE0VRaBoD9j3hd0y4oHbNS8bdz8MZDLPFMeudCqrgIO0pKH0zdeQPvETKS +xEkNSqXbh+DZavUoRu3/8Z35F5e4oKPpqEm8cdZUAnqMRHfUryzuXWLJ+vca3MdUM+5 rEBbsiIx3RlwBorK48/03ICp9tPHQcQ/bFTGg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PXyMaYakWpzeHxDItJjMLvVDwLUKRthExKSMycQHk94=; b=aJOeuIvigJsWPpUea/VIPfPUaEhesrkgsz6xLcDpk+ljFtwAreUzeVQi6W0KlNYnQl 6vh6SM+Q7gHBrBbxe201V58R9w8qbzFUIOVbeHxGMO24s+vucViEItGAbUo2X8b4+pST mZLGdy/XryF4FF9Nz+U6nelWTxZrJTkXTcJT2V0CsZCzSDAI2xgQoppUVirJw/6LNN9q /HIsHSCSfxeb8dGgzeP45Ft65+aJ0VPmEWBB/vzu29hBKh9xGGBt5yuN7v35m2STyP/o J7D+grsFkkHt3K09IFqUlJQHQ3lVk6NddQZGeuvpBsB6kJv2ESCr76vKAsXwih2daXUD pOJw== X-Gm-Message-State: AO0yUKU//g9pQuF5ysCul89PbgHLPaA2EATs/DJqTxkfB9JG3Hr/+bEh YJV63jZT85GMhsHXFmK0LTEfxvoT X-Google-Smtp-Source: AK7set+O4XfDZn6I9j8o022UnMQ+r/vihi67/i65ixg5Aw3Xmnk2WoaexejScSiZ6YgaYImrBnzbNg== X-Received: by 2002:a17:903:48e:b0:19a:e617:34ff with SMTP id jj14-20020a170903048e00b0019ae61734ffmr5897362plb.11.1677497993547; Mon, 27 Feb 2023 03:39:53 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2881:b0:225:cae6:ff24 with SMTP id f1-20020a17090a288100b00225cae6ff24ls4577643pjd.2.-pod-preprod-gmail; Mon, 27 Feb 2023 03:39:52 -0800 (PST) X-Received: by 2002:a17:902:ea07:b0:199:33ff:918a with SMTP id s7-20020a170902ea0700b0019933ff918amr30482450plg.21.1677497992592; Mon, 27 Feb 2023 03:39:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677497992; cv=none; d=google.com; s=arc-20160816; b=Vb3VcNw4sv0mO6Rm55mTiBhirAT974e+gU11AiSlsd5HLHDqxU2kokiihcWILqylAk byP9kDDck21j/qj4bZKDa/S4nYk1TDrBmUF6d8DnfC+viXSeqzH3bKsWuLvua6SBr/5W AHDXnE2g+gWeVE5c+RkigpFw86+R7r1+asI6TpLFJH6NYzhgLVpFkHbhirZ3uVCiRNHr +k8ben0B+qCvLwR1wDbMn/OJbMjapki/jEVsAPrIGVP/MbFkWxhIUEkqNQ9jGarB+8Ty okFNV95vxA8v8uJ4zjtQNaWukT/vt2RX8/robEEqQWp7tRSIJco/ff3APG87+L2hfWeH rnyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nuq+y+HWw18yw8Sob2qSkhl5lK1AxCLgf7u71EJPHEk=; b=tHkph/G+HoB+qewaJ1mhPQ//e10L+LLJIxysSdu4R6P+AbghYp0OOuD3JfjmHJjlT7 VeWO5IKW6LIUv7Cs1E0CJXQckTY19R5VMXTFMF2js+zRzO9wXaFqViSHleEC/SEmEtJR mpYN+fpBkgBlVxu0gf9dDVWbWGSzkNGSKGhrPKEDrHpXPM0shS9bATL68WK8uH6FlFo6 l3+5j3aUOk6I+mIFjuCRtSTvUW0SRKvISsXUzEgSi/m4DhzAtr50RJCBY+5KvcAqrBDc 5jgxBIexgLw8l3kRwugT+9nam6YSPZYkh7A4DIh5HFqOiFNN9LJyvb0ASJtQXtTS+Luz JkrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="XO8VVmB/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id d14-20020a170902654e00b00198ec2df868sor2286990pln.121.2023.02.27.03.39.52 for <linux-amarula@amarulasolutions.com> (Google Transport Security); Mon, 27 Feb 2023 03:39:52 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:903:42cd:b0:19c:d5c7:9401 with SMTP id jy13-20020a17090342cd00b0019cd5c79401mr9789215plb.52.1677497992292; Mon, 27 Feb 2023 03:39:52 -0800 (PST) Received: from localhost.localdomain ([94.140.8.120]) by smtp.gmail.com with ESMTPSA id k10-20020a170902ba8a00b0019c919bccf8sm4395277pls.86.2023.02.27.03.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 03:39:51 -0800 (PST) From: Jagan Teki <jagan@amarulasolutions.com> To: Andrzej Hajda <andrzej.hajda@intel.com>, Inki Dae <inki.dae@samsung.com>, Marek Szyprowski <m.szyprowski@samsung.com>, Seung-Woo Kim <sw0312.kim@samsung.com>, Kyungmin Park <kyungmin.park@samsung.com>, Frieder Schrempf <frieder.schrempf@kontron.de>, Tim Harvey <tharvey@gateworks.com>, Adam Ford <aford173@gmail.com>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Marek Vasut <marex@denx.de> Cc: Matteo Lisi <matteo.lisi@engicam.com>, dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team <linux-imx@nxp.com>, linux-amarula <linux-amarula@amarulasolutions.com>, Jagan Teki <jagan@amarulasolutions.com>, Maxime Ripard <mripard@kernel.org>, Linus Walleij <linus.walleij@linaro.org>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Subject: [PATCH v13 02/18] drm: bridge: panel: Support nodrm case for drmm_panel_bridge_add Date: Mon, 27 Feb 2023 17:09:09 +0530 Message-Id: <20230227113925.875425-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227113925.875425-1-jagan@amarulasolutions.com> References: <20230227113925.875425-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="XO8VVmB/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: <linux-amarula.amarulasolutions.com> X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>, <mailto:linux-amarula@amarulasolutions.com> List-Help: <https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>, <mailto:linux-amarula+help@amarulasolutions.com> List-Archive: <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/> List-Unsubscribe: <mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>, <https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe> |
| Series |
drm: Add Samsung MIPI DSIM bridge
|
|
Commit Message
Jagan Teki
Feb. 27, 2023, 11:39 a.m. UTC
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 <mripard@kernel.org>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
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(+)
Comments
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 <mripard@kernel.org> > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > Cc: Linus Walleij <linus.walleij@linaro.org> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > --- > 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? Also, where did the devm_drm_of_dsi_get_bridge go? I thought you were going to convert it to a drm-managed version? Maxime
On Mon, Feb 27, 2023 at 5:41 PM Maxime Ripard <maxime@cerno.tech> 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 <mripard@kernel.org> > > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > > --- > > 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.
On Mon, Feb 27, 2023 at 5:41 PM Maxime Ripard <maxime@cerno.tech> 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 <mripard@kernel.org> > > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > > Cc: Linus Walleij <linus.walleij@linaro.org> > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > > --- > > 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? > > Also, where did the devm_drm_of_dsi_get_bridge go? I thought you were > going to convert it to a drm-managed version? I found another solution that supports DRM-managed action common across dsi and normal bridges, can I send those patches alone by excluding them from this series? Please let me know. Jagan.
On Mon, Feb 27, 2023 at 05:58:03PM +0530, Jagan Teki wrote: > On Mon, Feb 27, 2023 at 5:41 PM Maxime Ripard <maxime@cerno.tech> 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 <mripard@kernel.org> > > > Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > > > Cc: Linus Walleij <linus.walleij@linaro.org> > > > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> > > > --- > > > 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 Ah, yes, indeed. This is still a hack we don't need. > 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/ Because we've already been over this. You can't call that function from DSI's attach. So you should change that to what I already pointed you to, and then you'll have the drm device pointer available. > > 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/ You can't use devm. You can and should definitely use drmm. Maxime
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; + ret = drmm_add_action_or_reset(drm, drmm_drm_panel_bridge_release, bridge); if (ret)