This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers
The callbacks in struct dw_mipi_dsi2_host_ops have a struct mipi_dsi_device
pointer to the device, which is unused. Remove it as a step towards
avoiding DSI host drivers to hold a pointer to the DSI device.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c | 4
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/renesas/rcar-du
These lines logged as info are too much, drivers should be mostly silent
when everything works. And now there is an equivalent dbg line logged in
mipi_dsi_attach(), valid for all DSI hosts.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/mcde/mcde_dsi.c | 6 --
1 file changed, 6 deletions
additionally storing a pointer to the struct
mipi_dsi_host, and using it in host_to_mcde_dsi().
The second usage is removed in a following patch.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/mcde/mcde_display.c | 2 +-
drivers/gpu/drm/mcde/mcde_drm.h | 3 ++-
drivers/gpu/drm/mcde
struct mcde_dsi. That's
exactly what .attach_new aims at removing.
Instead of the struct mipi_dsi_device, store:
* a copy of the format parameters in struct mcde_dsi
* a pointer to it in struct mcde
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/mcde/mcde_display.c | 14 +++
drivers/gp
of a device by storing such pointer and
checking whether it is NULL. As a replacement, host drivers will be able to
check the lane number to be non-zero, so ensuring a zero value is never
passed along will make such checks robust.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_mipi_dsi.
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c
b/drivers/gpu/drm
el in case of failure).
Later commits will remove the now-redundant logging in individual drivers.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_mipi_dsi.c | 14 +-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/driver
if (output->connector.dev)
drm_helper_hpd_irq_event(output->connector.dev);
}
Anusha, Maxime, do you think the ongoing work on panel lifetime and the
panel_bridge can interact with this? DO you see any short-term soliution
while that
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/adp/adp-mipi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/adp/adp-mipi.c b/drivers/gpu/drm/adp/adp-mipi.c
modified to hold a struct mipi_dsi_bus_fmt instead
of individual fields.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_mipi_dsi.c | 21 +++--
include/drm/drm_mipi_dsi.h | 29 -
2 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/drivers
This check is not really needed: there is no reason the detaching client
can be different from the attached one. Should this happen, that would be a
bug elsewhere.
Signed-off-by: Luca Ceresoli
---
**NOTE**: I'm not 100% sure this is correct, but it appears so, and other
drivers have no
h_new aims at removing.
Store a copy of the format parameters instead of the struct mipi_dsi_device
pointer.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 57 +-
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.h | 2 +-
2 files change
format parameters in
various places outside the .attach op, and currently it does so by storing
a pointer to the struct mipi_dsi_device. That's exactly what .attach_new
aims at removing, so store a copy of the format parameters instead of the
struct mipi_dsi_device pointer.
Signed-off-by:
mcde_dsi_irq() takes a struct mipi_dsi_device which it uses solely to get
the struct mipi_dsi_host pointer.
We want to get rid of mipi_dsi_device pointers in host drivers, so use
directly the struct dsi_host pointer which is now stored in struct
mcde.
Signed-off-by: Luca Ceresoli
---
drivers
h_new aims at removing.
Store a copy of the format parameters instead of the struct mipi_dsi_device
pointer.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/tc358768.c | 40 +++
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/drivers/gp
h_new aims at removing.
Store a copy of the format parameters instead of the struct mipi_dsi_device
pointer.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/sprd/megacores_pll.c | 2 +-
drivers/gpu/drm/sprd/sprd_dpu.c | 2 +-
drivers/gpu/drm/sprd/sprd_dsi.c
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/kmb/kmb_dsi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/vc4/vc4_dsi.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/i915/display/icl_dsi.c | 4 ++--
drivers/gpu/drm/i915/display/vlv_dsi.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/nwl-dsi.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi2.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin
This line logged as info is too much, drivers should be mostly silent when
everything works. And now there is an equivalent dbg line logged in
mipi_dsi_attach(), valid for all DSI hosts.
This avoids the need to access the @name field in struct mipi_dsi_device.
Signed-off-by: Luca Ceresoli
This op does not pass any pointer to the DSI device, so the DSI host driver
cannot store it.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/renesas/rz-du
In preparation for adding a new struct using them, but visible to the
struct mipi_dsi_host_ops declaration, move them above such declaration.
Signed-off-by: Luca Ceresoli
---
include/drm/drm_mipi_dsi.h | 76 +++---
1 file changed, 38 insertions(+), 38
This line logged as info is too much, drivers should be mostly silent when
everything works. And now there is an equivalent dbg line logged in
mipi_dsi_attach(), valid for all DSI hosts.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/nwl-dsi.c | 4
1 file changed, 4 deletions
Now there is an equivalent of this dev_err in mipi_dsi_attach(), valid for
all DSI hosts.
This avoids the need to access the @name field in struct mipi_dsi_device.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a
Now there is an equivalent of this dev_err in mipi_dsi_attach(), valid for
all DSI hosts.
This avoids the need to access the @name field in struct mipi_dsi_device.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 9 ++---
1 file changed, 2 insertions(+), 7
Checking that the number of lanes is > 0 is now done by the DRM MIPI DSI
core in mipi_dsi_attach().
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/mcde/mcde_dsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/m
Checking that the number of lanes is > 0 is now done by the DRM MIPI DSI
core in mipi_dsi_attach().
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
Checking that the number of lanes is > 0 is now done by the DRM MIPI DSI
core in mipi_dsi_attach().
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/nwl-dsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/
el/panel-simple: Use the new allocation in place
> of devm_kzalloc()")
Please add a mention to the discussion:
Closes: https://lore.kernel.org/all/20250612081834.GA248237@francesco-nb/
and also:
Reported-by: Francesco Dolcini
> Suggested-by: Luca Ceresoli
> Suggested-by: Maxime Ripar
struct drm_bridge *bridge __free(drm_bridge_put) =
> + drm_bridge_chain_get_first_bridge(encoder);
Good idea, I probably didn't think about it because I was grown up in a
world where all declarations must before the code. :-)
Changing this in v9.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Hello Liu,
On Mon, 23 Jun 2025 10:56:13 +0800
Liu Ying wrote:
> On 06/21/2025, Luca Ceresoli wrote:
> > drm_bridge_chain_get_first_bridge() returns a bridge pointer that the
> > caller could hold for a long time. Increment the refcount of the returned
> > bridge and docum
Hello Dmitry,
thanks for reviewing!
On Mon, 23 Jun 2025 14:06:43 +0300
Dmitry Baryshkov wrote:
> On 20/06/2025 18:59, Luca Ceresoli wrote:
> > To the best of my knowledge, all drivers in the mainline kernel adding a
> > DRM bridge are now converted to using devm_drm_bri
drm_bridge_chain_get_first_bridge() returns a bridge pointer that the
caller could hold for a long time. Increment the refcount of the returned
bridge and document it must be put by the caller.
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
This patch was added in v7.
---
include
The bridge returned by drm_bridge_chain_get_first_bridge() is
refcounted. Put it when done.
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
This patch was added in v7.
---
drivers/gpu/drm/drm_probe_helper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm
igned-off-by: Luca Ceresoli
---
This patch was added in v7.
---
include/drm/drm_bridge.h | 4
1 file changed, 4 insertions(+)
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index
7f66f9018c1090642876ff948bbf06ca66a46bfe..b110c5bba8c0612a71f749ad51345e7a8ccdc910
100644
571f8c...@bootlin.com/
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- rebased on current drm-misc-next
- Patch 4: reworked based on current code
- Link to v7:
https://lore.kernel.org/all/20250314-drm-bridge-refcount-v7-0-152571f8c...@bootlin.com/
---
Luca Ceresoli (5):
drm/bridge: add a
The bridge returned by drm_bridge_chain_get_first_bridge() is
refcounted. Put it when done. Use a scope-based free action to catch all
the code paths.
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
This patch was added in v7.
---
drivers/gpu/drm/mxsfb/lcdif_kms.c | 3 ++-
1 file
The bridge returned by drm_bridge_chain_get_first_bridge() is
refcounted. Put it when done.
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- reworked after the changes in pre_enable/post_disable order:
f6ee26f58870 ("drm/atomic-helper: Refactor crtc & encoder-bridge op loops
into
Hi Maxime,
On Fri, 20 Jun 2025 13:41:48 +0200
Maxime Ripard wrote:
> Hi Luca,
>
> On Fri, Jun 20, 2025 at 11:32:08AM +0200, Luca Ceresoli wrote:
> > To the best of my knowledge, all drivers in the mainline kernel adding a
> > DRM bridge are now converted to using devm_d
drm_bridge_attach() adds the bridge to the encoder chain, so take a
reference for that. Vice versa in drm_bridge_detach().
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v9: none
Changes in v8: none
Changes in v7:
- in v6 this was part of "drm/bridge: add suppor
to the struct device. The affected driver should be easy to catch
based on the following stack trace however.
Signed-off-by: Luca Ceresoli
---
Changes in v9:
- change warning trigger from "refcount != 1" to "container not NULL"
This patch was added in v8
---
drivers/gpu/
drm_bridge_add() adds the bridge to the global bridge_list, so take a
reference for that. Vice versa in drm_bridge_remove().
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v9: none
Changes in v8: none
Changes in v7:
- in v6 this was part of "drm/bridge: add suppor
c3...@bootlin.com/t/#u
[2]
https://lore.kernel.org/all/20250314-drm-bridge-refcount-v7-0-152571f8c...@bootlin.com/
Signed-off-by: Luca Ceresoli
---
Changes in v9:
- patch 3: change warning trigger from "refcount != 1" to "container not NULL"
- Link to v8 (counted as v1 by mistake):
drm_bridge_add() adds the bridge to the global bridge_list, so take a
reference for that. Vice versa in drm_bridge_remove().
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v8: none
Changes in v7:
- in v6 this was part of "drm/bridge: add support for refcounte
to the struct device. The affected driver should be easy to catch
based on the following stack trace however.
Signed-off-by: Luca Ceresoli
---
This patch was added in v8
---
drivers/gpu/drm/drm_bridge.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_bridge.c b
c3...@bootlin.com/t/#u
[2]
https://lore.kernel.org/all/20250314-drm-bridge-refcount-v7-0-152571f8c...@bootlin.com/
Signed-off-by: Luca Ceresoli
---
Luca Ceresoli (3):
drm/bridge: get/put the bridge reference in drm_bridge_add/remove()
drm/bridge: get/put the bridge reference in drm_bridge_
drm_bridge_attach() adds the bridge to the encoder chain, so take a
reference for that. Vice versa in drm_bridge_detach().
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v8: none
Changes in v7:
- in v6 this was part of "drm/bridge: add support for refcounte
keep up with refcounting.
>
> Reviewed-by: Luca Ceresoli
> Signed-off-by: Anusha Srivatsa
This patch is good.
I'd just point out that this must be applied only after all drivers
have been converted to the the _alloc API, otherwise with the following
sequence:
panel = devm_kzalloc
illed descriptor
* panel_simple_probe() call panel_dpi_probe() early [before
devm_drm_panel_alloc()] and get the filled descriptor
* call devm_drm_panel_alloc() with that descriptor in the panel-dsi
case, or with the good old descriptor otherwise
As a good side effect, it would get rid of a case where
devm_drm_panel_alloc() is called with a Unknown connector type.
Anusha, does it look like a good plan?
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Some users of DRM bridges may need to execute specific code just before
deallocation.
As of now the only known user would be KUnit tests.
Suggested-by: Maxime Ripard
Acked-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v9:
- move .destroy before .detach in struct
Add KUnit tests for the newly introduced devm_drm_bridge_alloc().
Signed-off-by: Luca Ceresoli
---
Changed in v9:
- fold drm_bridge_alloc_test_ctx into drm_bridge_init_priv (do not
introduce another test context struct specific to alloc tests)
- use the existing func sets for .destroy (do
which are counting bridge-specific events, into the new "private
driver struct" (and avoid adding new unnecessary indirections).
Also add a trivial bridge_to_dummy_bridge() function just like many drivers
do.
Signed-off-by: Luca Ceresoli
---
Changes in v9:
* rename struct dummy_drm_bri
rnel/-/commit/0cc6aadd7fc1e629b715ea3d1ba537ef2da95eec
[1]
https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/t/#u
Signed-off-by: Luca Ceresoli
---
Changes in v9:
- Patch 1: rename structs according to conventions
- Patch 2: swap .destroy and .detach declarati
ridge_init_priv
for all tests.
The change is not very invasive, and perhaps even a cleanup, thus I'm
going to send as above in v9.
I'm OK with all the other changes you proposed. All queued for v9.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
. The drawback is we now iterate twice over the endpoints during probe.
Signed-off-by: Luca Ceresoli
---
devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM
bridge, and the only one supported from now on. It is the first milestone
towards removal of bridges from a still exi
On Fri, 09 May 2025 15:53:26 +0200, Luca Ceresoli wrote:
> devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM
> bridge, and the only one supported from now on. It is the first milestone
> towards removal of bridges from a still existing DRM pipeline without
&g
n applied, but it is useful per se, and in the records
anyway.
Kind regards,
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Hi Maxime,
On Thu, 22 May 2025 17:43:37 +0200
Maxime Ripard wrote:
> On Fri, May 16, 2025 at 06:48:38PM +0200, Luca Ceresoli wrote:
> > Some users of DRM bridges may need to execute specific code just before
> > deallocation.
> >
> > As of now the only know
Hello Liu,
On Thu, 22 May 2025 11:01:13 +0800
Liu Ying wrote:
> On 05/07/2025, Luca Ceresoli wrote:
>
> [...]
>
> >> After looking into this patch and patch 31(though I've already provided my
> >> A-b)
> >> more closely, I think the imx8qxp_pc and
Hello Inki,
On Fri, 23 May 2025 00:11:24 +0900
Inki Dae wrote:
> Hello Luca Ceresoli,
>
> 2025년 5월 21일 (수) 오후 11:23, Luca Ceresoli 님이 작성:
> >
> > Hello Maxime, Shawn, Liu, all,
> >
> > On Fri, 09 May 2025 15:53:26 +0200
> > Luca Ceresoli wrote:
> &g
the lack of responses, can't you ping him internally?
Ah, sure, Louis and I were discussing it together. The question was
quite "which is the correct process to manage an incorrectly-applied
patch?", i.e. whether the revert itself needs to the Reviewed/Acked-by
etc.
Luca
--
L
should be applied to drm-misc.
OK, will do soon.
> That being said, putting a two days timeout on *any* email is really
> over-the-top. I doubt you reply to any of your mail in such a short
> timeframe. We have rules for a reason, I'd expect you to follow them, no
> matter how fru
he other entry (ARM/FREESCALE IMX / MXC ARM ARCHITECTURE) is another
story.
> >> drm/bridge: imx8qxp-pixel-combiner: convert to
> >> devm_drm_bridge_alloc() API
> >
> > Not acked/reviewed, some discussion happened. I am resending it in v4,
> > p
/dri-devel/2025-05-21#34288266;
Signed-off-by: Luca Ceresoli
---
include/drm/drm_bridge.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index
464da28f9134f0fcece5c72a8c5fe7f3e42c7e3d..0af5db244db8580ea0c9af1d9a373b7bf62ee699
100644
Hello Maxime, Shawn, Liu, all,
On Fri, 09 May 2025 15:53:26 +0200
Luca Ceresoli wrote:
> devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM
> bridge, and the only one supported from now on. It is the first milestone
> towards removal of bridges from a still exi
ing LED device, as other drivers and subsystems do as well.
Tested-by: Alexander Sverdlin
Fixes: ae232e45acf9 ("backlight: add led-backlight driver")
Signed-off-by: Luca Ceresoli
---
Changes in v6:
- EDITME: describe what is new in this series revision.
- EDITME: use bulletpoints and ter
Hi Hervé,
On Mon, 19 May 2025 17:47:29 +0200
Herve Codina wrote:
> Hi Luca,
>
> On Mon, 19 May 2025 17:16:39 +0200
> Luca Ceresoli wrote:
>
> ...
>
> > diff --git a/drivers/video/backlight/led_bl.c
> > b/drivers/v
ystems do as well.
Tested-by: Alexander Sverdlin
Fixes: ae232e45acf9 ("backlight: add led-backlight driver")
Signed-off-by: Luca Ceresoli
---
Changes in v5:
- separated this patch as a standalone patch
- improved commit message, adding feedback from Alexander
- no code changes
Hello Daniel,
I wonder whether you remember about this conversation...
On Fri, 20 Sep 2024 14:41:13 +0200
Luca Ceresoli wrote:
> Hello Daniel,
>
> On Thu, 19 Sep 2024 14:43:23 +0200
> Daniel Thompson wrote:
>
> > On Tue, Sep 17, 2024 at 10:53:10AM +0200, Luca Cereso
s well),
> > thanks for fixing it!
> >
> > Tested-by: Alexander Sverdlin
Thanks for the feedback! I will have a look next week, perhaps sending
a new version of this patch alone (outside of the series).
> Would it make sense to add
>
> Fixes: ae232e45acf9 ("backli
Add KUnit tests for the newly introduced devm_drm_bridge_alloc().
Signed-off-by: Luca Ceresoli
---
Changed in v8:
- rebase on new patch converting drm_bridge_test.c to
devm_drm_bridge_alloc()
- add check that bridge is removed (thanks to the .destroy callback)
- add a check with get/put
which are counting bridge-specific events, into the new "private
driver struct" (and avoid adding new unnecessary indirections).
Also add a trivial bridge_to_dummy_bridge() just like many drivers do.
Signed-off-by: Luca Ceresoli
---
This patch was added in v8.
---
drivers/g
Some users of DRM bridges may need to execute specific code just before
deallocation.
As of now the only known user would be KUnit tests.
Suggested-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
This patch is new in v8. The .destroy callback had appeared in v5 as well
[5], but as part of
rnel/-/commit/0cc6aadd7fc1e629b715ea3d1ba537ef2da95eec
[1]
https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/t/#u
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- Remove documentation patch
- Add patch to convert existing kunit tests to use devm_drm_bridge_
Hi Maxime,
On Thu, 15 May 2025 10:11:33 +0200
Maxime Ripard wrote:
> On Tue, Apr 15, 2025 at 01:22:14PM +0200, Luca Ceresoli wrote:
> > > > +/*
> > > > + * Mimick the typical struct defined by a bridge driver, which embeds a
> > > > + * bridge plus oth
etime management.
Thanks for your understanding.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
devm_drm_put_bridge() is a temporary workaround waiting for the panel
bridge lifetime rework. Add a TODO entry to not forget it must be removed
after such rework.
Suggested-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
To: Jonathan Corbet
Cc: linux-...@vger.kernel.org
This patch was
ree() the
panel_bridge in current code, so update it as well to put the bridge
reference instead.
This is a temporary solution until the panel lifetime is reworked, which
should make this workaround unnecessary, so add a comment to clarify that.
Signed-off-by: Luca Ceresoli
---
Changes in v3:
-
afterwards.
Signed-off-by: Luca Ceresoli
---
Changes in v3:
- document this function is a temporary workaround, not to be used
(in kerneldoc and commit message)
Changes in v2: none
---
drivers/gpu/drm/drm_bridge.c | 17 +
include/drm/drm_bridge.h | 4
2 files changed, 21
happening after
allocation, directly into the private struct data, as they used to.
This solution is chosen to minimize the changes in the driver logical code
flow. The drawback is we now iterate twice over the endpoints.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/tc358767.c | 56
channels into an array of channel pointers
* allocate each channel using devm_drm_bridge_alloc()
* adapt the code wherever using the channels
* remove the is_available flag, now "ch != NULL" is equivalent
Signed-off-by: Luca Ceresoli
---
Cc: Liu Ying
Changes in v3:
- fix NULL pointe
drm_bridge_add(). Hence, following carefully the code
flow, it is correct to change the allocation function and .funcs assignment
in the submodule, while the drm_bridge_add() is not in that submodule.
Signed-off-by: Luca Ceresoli
---
Cc: Laurent Pinchart
Cc: Michal Simek
Cc: Tomi Valkeinen
Changes in v2
This is the new API for allocating DRM bridges.
Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.
Signed-off-by: Luca Ceresoli
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
Cc: Alexandre Torgue
Cc: Maxime Coquelin
Cc: Philippe Cornu
Cc: Raphael Gallais-Pou
Cc: Yannick Fertre
---
drivers/gpu/drm/stm/lvds.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
private struct, to make use of the
new API with the same code flow.
Signed-off-by: Luca Ceresoli
---
Cc: Alain Volmat
Cc: Raphael Gallais-Pou
Changed in v2:
- fix typos in commit message
---
drivers/gpu/drm/sti/sti_dvo.c | 29 +++--
1 file changed, 11 insertions
This is the new API for allocating DRM bridges.
Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.
Signed-off-by: Luca Ceresoli
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
Cc: Kieran Bingham
Cc: Laurent Pinchart
Cc: Tomi Valkeinen
---
drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm
This is the new API for allocating DRM bridges.
Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.
Signed-off-by: Luca Ceresoli
This is the new API for allocating DRM bridges.
Switching from a non-devm to a devm allocation allows removing the kfree()
in the remove function and in the probe error management code, and as a
consequence to simplify the code flow by removing now unnecessary gotos.
Signed-off-by: Luca Ceresoli
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
Cc: Aradhya Bhatia
Cc: Tomi Valkeinen
---
drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/nxp-ptn3460.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c
b/drivers/gpu/drm/bridge/nxp-ptn3460.c
index
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
Cc: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c
b/drivers/gpu/drm/omapdrm/dss/dsi.c
index
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
Cc: "Rob Herring (Arm)"
Cc: Helge Deller
Cc: Kuninori Morimoto
Cc: Tomi Valkeinen
---
drivers/gpu/drm/omapdrm/dss/dpi.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/d
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/bridge/sii902x.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index
This is the new API for allocating DRM bridges.
Signed-off-by: Luca Ceresoli
---
Cc: Ian Ray
Cc: Martyn Welch
Cc: Peter Senna Tschudin
Changed in v3:
- updated Ian Ray's e-mail (old one is bouncing
Changed in v2: none
---
drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c
1 - 100 of 669 matches
Mail list logo