[PATCH 20/32] drm/msm/dsi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 11/32] drm/bridge: synopsys/dsi2: remove DSI device pointer from private callbacks

2025-06-25 Thread Luca Ceresoli
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

[PATCH 21/32] drm/rcar-du: dsi: convert to the .attach_new op

2025-06-25 Thread 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/rcar-du/rcar_mipi_dsi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/renesas/rcar-du

[PATCH 09/32] drm/mcde: remove redundant logging

2025-06-25 Thread Luca Ceresoli
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

[PATCH 30/32] drm/mcde: store a pointer to mipi_dsi_host to perform TE requests

2025-06-25 Thread Luca Ceresoli
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

[PATCH 32/32] drm/mcde: convert to the .attach_new op

2025-06-25 Thread Luca Ceresoli
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

[PATCH 01/32] drm/mipi-dsi: add sanity check of lane number in mipi_dsi_attach()

2025-06-25 Thread Luca Ceresoli
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.

[PATCH 24/32] drm/mediatek: dsi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 05/32] drm/mipi-dsi: log DSI device attach and detach

2025-06-25 Thread Luca Ceresoli
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

[PATCH 00/32] drm/mipi-dsi: avoid DSI host drivers to have pointers to DSI devices

2025-06-25 Thread Luca Ceresoli
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

[PATCH 15/32] drm: adp: mipi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 14/32] drm/mipi-dsi: add .attach_new to mipi_dsi_host_ops

2025-06-25 Thread Luca Ceresoli
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

[PATCH RFC 12/32] drm/meson: dsi: remove unneeded DSI device check

2025-06-25 Thread Luca Ceresoli
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

[PATCH 26/32] drm/bridge: cdns-dsi: convert to the .attach_new op

2025-06-25 Thread Luca Ceresoli
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

[PATCH 29/32] drm/bridge: synopsys: dw-mipi-dsi: convert to the .attach_new op

2025-06-25 Thread Luca Ceresoli
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:

[PATCH 31/32] drm/mcde: use the DSI host pointer in mcde_dsi_irq

2025-06-25 Thread Luca Ceresoli
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

[PATCH 27/32] drm/bridge: tc358768: convert to the .attach_new op

2025-06-25 Thread Luca Ceresoli
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

[PATCH 28/32] drm/sprd: convert to the .attach_new op

2025-06-25 Thread Luca Ceresoli
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

[PATCH 16/32] drm/kmb: dsi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 23/32] drm/vc4: dsi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 17/32] drm/i915/dsi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 25/32] drm/bridge: nwl-dsi: convert to the .attach_new op

2025-06-25 Thread 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/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

[PATCH 19/32] drm/bridge: synopsys/dsi2: convert to the .attach_new op

2025-06-25 Thread 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/bridge/synopsys/dw-mipi-dsi2.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw

[PATCH 18/32] drm/hisilicon/kirin: convert to the .attach_new op

2025-06-25 Thread 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/hisilicon/kirin/dw_drm_dsi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/kirin

[PATCH 06/32] drm/bridge: samsung-dsim: remove redundant logging

2025-06-25 Thread Luca Ceresoli
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

[PATCH 22/32] drm: renesas: rz-du: rzg2l_mipi_dsi: convert to the .attach_new op

2025-06-25 Thread 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

[PATCH 13/32] drm/mipi-dsi: move format define above

2025-06-25 Thread Luca Ceresoli
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

[PATCH 07/32] drm/bridge: nwl-dsi: remove redundant logging

2025-06-25 Thread Luca Ceresoli
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

[PATCH 10/32] drm/sun4i: dsi: remove redundant logging

2025-06-25 Thread Luca Ceresoli
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

[PATCH 08/32] drm/bridge: cdns-dsi: remove redundant logging

2025-06-25 Thread Luca Ceresoli
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

[PATCH 04/32] drm/mcde: remove redundant lanes number check

2025-06-25 Thread Luca Ceresoli
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

[PATCH 02/32] drm/hisilicon/kirin: remove redundant lanes number check

2025-06-25 Thread Luca Ceresoli
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

[PATCH 03/32] drm/bridge: nwl-dsi: remove redundant lanes number check

2025-06-25 Thread Luca Ceresoli
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/

Re: [PATCH] panel/simple-simple: Identify simple DPI panels using .compatible field

2025-06-24 Thread Luca Ceresoli
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

Re: [PATCH v8 3/5] drm/mxsfb: put the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-23 Thread Luca Ceresoli
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

Re: [PATCH v8 2/5] drm/bridge: get the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-23 Thread Luca Ceresoli
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

Re: [PATCH v9 3/3] drm/bridge: add warning for bridges not using devm_drm_bridge_alloc()

2025-06-23 Thread Luca Ceresoli
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

[PATCH v8 2/5] drm/bridge: get the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v8 5/5] drm/probe-helper: put the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v8 1/5] drm/bridge: add a cleanup action for scope-based drm_bridge_put() invocation

2025-06-20 Thread Luca Ceresoli
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

[PATCH v8 0/5] drm/bridge: get/put the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v8 3/5] drm/mxsfb: put the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v8 4/5] drm/atomic-helper: put the bridge returned by drm_bridge_chain_get_first_bridge()

2025-06-20 Thread Luca Ceresoli
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

Re: [PATCH 3/3] drm/bridge: add warning for bridges not using devm_drm_bridge_alloc()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v9 2/3] drm/bridge: get/put the bridge reference in drm_bridge_attach/detach()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v9 3/3] drm/bridge: add warning for bridges not using devm_drm_bridge_alloc()

2025-06-20 Thread Luca Ceresoli
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/

[PATCH v9 1/3] drm/bridge: get/put the bridge reference in drm_bridge_add/remove()

2025-06-20 Thread Luca Ceresoli
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

[PATCH v9 0/3] drm/bridge: get/put the bridge reference in drm_bridge.c, warn on old alloc pattern

2025-06-20 Thread Luca Ceresoli
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):

[PATCH 1/3] drm/bridge: get/put the bridge reference in drm_bridge_add/remove()

2025-06-20 Thread Luca Ceresoli
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

[PATCH 3/3] drm/bridge: add warning for bridges not using devm_drm_bridge_alloc()

2025-06-20 Thread Luca Ceresoli
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

[PATCH 0/3] drm/bridge: get/put the bridge reference in drm_bridge.c, warn on old alloc pattern

2025-06-20 Thread Luca Ceresoli
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_

[PATCH 2/3] drm/bridge: get/put the bridge reference in drm_bridge_attach/detach()

2025-06-20 Thread Luca Ceresoli
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

Re: [PATCH v2 01/16] drm/panel: get/put panel reference in drm_panel_add/remove()

2025-06-20 Thread Luca Ceresoli
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

Re: drm/panel/panel-simple v6.16-rc1 WARNING regression

2025-06-18 Thread Luca Ceresoli
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

[PATCH v9 2/3] drm/bridge: add a .destroy func

2025-06-06 Thread Luca Ceresoli
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

[PATCH v9 3/3] drm/tests: bridge: add KUnit tests for devm_drm_bridge_alloc()

2025-06-06 Thread Luca Ceresoli
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

[PATCH v9 1/3] drm/tests: bridge: convert to devm_drm_bridge_alloc() API

2025-06-06 Thread Luca Ceresoli
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

[PATCH v9 0/3] drm/bridge: add kunit tests for devm_drm_bridge_alloc()

2025-06-06 Thread Luca Ceresoli
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

Re: [PATCH v8 3/3] drm/tests: bridge: add KUnit tests for devm_drm_bridge_alloc()

2025-06-05 Thread Luca Ceresoli
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

[PATCH v4] drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

2025-05-28 Thread Luca Ceresoli
. 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

Re: (subset) [PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-27 Thread Luca Ceresoli
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

Re: [PATCH v3 02/22] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-05-27 Thread Luca Ceresoli
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

Re: [PATCH v8 2/3] dmr/bridge: add a .destroy func

2025-05-26 Thread Luca Ceresoli
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

Re: [PATCH v2 30/34] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-05-26 Thread Luca Ceresoli
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

Re: [PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-23 Thread Luca Ceresoli
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

Re: [PATCH v3 02/22] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-05-22 Thread Luca Ceresoli
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

Re: [PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-22 Thread Luca Ceresoli
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

Re: [PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-22 Thread Luca Ceresoli
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

[PATCH] drm/bridge: fix build with CONFIG_OF=n

2025-05-22 Thread Luca Ceresoli
/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

Re: [PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-21 Thread Luca Ceresoli
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

[PATCH v6] backlight: led-backlight: add devlink to supplier LEDs

2025-05-19 Thread Luca Ceresoli
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

Re: [PATCH v5] backlight: led-backlight: add devlink to supplier LEDs

2025-05-19 Thread Luca Ceresoli
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

[PATCH v5] backlight: led-backlight: add devlink to supplier LEDs

2025-05-19 Thread Luca Ceresoli
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

Re: [PATCH v4 6/8] backlight: led-backlight: add devlink to supplier LEDs

2025-05-19 Thread Luca Ceresoli
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

Re: [PATCH v4 6/8] backlight: led-backlight: add devlink to supplier LEDs

2025-05-16 Thread Luca Ceresoli
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

[PATCH v8 3/3] drm/tests: bridge: add KUnit tests for devm_drm_bridge_alloc()

2025-05-16 Thread Luca Ceresoli
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

[PATCH v8 1/3] drm/tests: bridge: convert to devm_drm_bridge_alloc() API

2025-05-16 Thread Luca Ceresoli
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

[PATCH v8 2/3] dmr/bridge: add a .destroy func

2025-05-16 Thread Luca Ceresoli
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

[PATCH v8 0/3] drm/bridge: add kunit tests for devm_drm_bridge_alloc()

2025-05-16 Thread Luca Ceresoli
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_

Re: [PATCH v7 2/2] drm/tests: bridge: add a KUnit test for devm_drm_bridge_alloc()

2025-05-16 Thread Luca Ceresoli
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

Re: [PATCH v3 02/22] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-05-12 Thread Luca Ceresoli
etime management. Thanks for your understanding. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

[PATCH v3 22/22] drm/todo: add entry to remove devm_drm_put_bridge()

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 21/22] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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: -

[PATCH v3 20/22] drm/bridge: add devm_drm_put_bridge()

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 19/22] drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 18/22] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 17/22] drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 13/22] drm/omap: dss: venc: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 15/22] drm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 16/22] drm/sti: dvo: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 11/22] drm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 14/22] drm/rcar-du: dsi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 12/22] drm/omap: dss: sdi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 10/22] drm/omap: dss: hdmi4: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 04/22] drm/bridge: cdns-dsi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread 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

[PATCH v3 06/22] drm/bridge: nxp-ptn3460: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 09/22] drm/omap: dss: dsi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 08/22] drm/omap: dss: dpi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 07/22] drm/bridge: sii902x: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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

[PATCH v3 05/22] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
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   2   3   4   5   6   7   >