handled by a separate commit.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 35 ---
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index
d2ab7cef0b768b0ff674a77977833d
converted. drm_atomic_bridge_chain_pre_enable()
and drm_atomic_bridge_chain_post_disable() are handled by a separate
commit.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drive
more. In fact all bridges in the encoder chain are refcounted already
thanks to the drm_bridge_get() in drm_bridge_attach() and the
drm_bridge_put() in drm_bridge_detach(). So while iterating with the mutex
held the list cannot change _and_ the refcount of all bridges in the list
cannot drop to z
On Fri, 26 Sep 2025 16:59:40 +0200, Luca Ceresoli wrote:
> drm_bridge_connector_init() takes eight pointers to various bridges, some
> of which can be identical, and stores them in pointers inside struct
> drm_bridge_connector. Get a reference to each of the taken bridges and put
> i
ly exclusive.
[1]
https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/#t
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- Improve commit messages and add documentation as per v1 review
- Patch 4: fixed infinite loop when encoder->bridge_chain is empty
- Link to v1
over the chain.
Add a mutex to be taken whenever looping or changing the encoder chain.
Also add two APIs to lock/unlock the mutex without the need to manipulate
internal struct drm_encoder fields.
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- Added documentation to new APIs
---
drivers
king around the outer
loop. Thankfully there are no return points inside the loops, so the change
is trivial and readable.
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- Improved commit message
---
drivers/gpu/drm/drm_bridge.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/d
drm_bridge_attach() modifies the encoder bridge chain, so take a mutex
around such operations to allow users of the chain to protect themselves
from chain modifications while iterating.
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- Removed comment before on drm_bridge_detach()
---
drivers
op 2nd time, do something with *pos (bridge 2)
6. loop iteration 2 finishes, list_for_each_entry_safe() sets:
pos = n = LIST_POISON1 ==> bug!
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- Expanded commit messge with rationale, as discussed
---
drivers/gpu/drm/drm_encoder.c | 2 +
DRM bridges should be always added to the global bridge list before being
attached.
Link:
https://lore.kernel.org/all/20250709-sophisticated-loon-of-rain-6ccdd8@houat/
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/sti/sti_hda.c | 5 +
1 file changed, 5 insertions(+)
diff --git a
ase
they will be fixed as they are found.
[0]
https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/#t
[1]
https://lore.kernel.org/all/20250709-sophisticated-loon-of-rain-6ccdd8@houat/
Signed-off-by: Luca Ceresoli
---
Luca Ceresoli (4):
drm/sti: hda: ad
houat/
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index
1246a52f8767b52c5f10139aa897824b3c2f28da..6dba601a056bb3cff8b8dd5b1ec46299235b2d85
100644
--- a/drivers/gp
Hello Damon,
On Wed, 1 Oct 2025 18:09:22 +0200
Luca Ceresoli wrote:
> Another thing to note is that this patch conflicts with [0], which I
> plan to apply in the next few days. The two patches are orthogonal but
> they insist on the same lines (those assigning
> bridge_connec
On Wed, 24 Sep 2025 17:11:01 +0200, Luca Ceresoli wrote:
> Get a reference for the last_bridge when it is obtained and release it
> using a cleanup action.
>
>
Applied, thanks!
[1/1] drm/bridge: refcount last_bridge in
drm_atomic_bridge_chain_select_bus_fmts()
bridge __free(drm_bridge_encoder_chain_unlock)
=\
-
list_first_entry(&drm_encoder_chain_lock(encoder)->bridge_chain, \
+
list_first_entry_or_null(&drm_encoder_chain_lock(encoder)->bridge_chain, \
Fix queued for v2.
Luca
--
Luca Ce
Hi Maxime,
On Mon, 29 Sep 2025 14:43:46 +0200
Maxime Ripard wrote:
> On Fri, Sep 26, 2025 at 05:59:42PM +0200, Luca Ceresoli wrote:
> > The per-encoder bridge chain is currently assumed to be static once it is
> > fully initialized. Work is in progress to add hot-pluggable bridge
Hi Maxime,
On Mon, 29 Sep 2025 14:45:10 +0200
Maxime Ripard wrote:
> On Fri, Sep 26, 2025 at 05:59:43PM +0200, Luca Ceresoli wrote:
> > drm_encoder_cleanup() modifies the encoder chain by removing bridges via
> > drm_bridge_detach(). Protect this whole operation by taking the mu
be needed to avoid deadlocks
Add a comment to clarify that is intended.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index
change
is trivial and readable.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index
66c0a80db8426ffb360248895cfe2a11d6007ed7..00e0a88128d0eeabf25911591ad8c482d6c1ca
6-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/#t
[1] https://lore.kernel.org/all/20250106-vigorous-talented-viper-fa49d9@houat/
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- No changes to patch 1, discussion pending
- Use devres instead of a flag in patch 2
- Link to v1:
https://lore.kernel.
Hi Maxime,
On Mon, 15 Sep 2025 16:51:56 +0200
Luca Ceresoli wrote:
> I'm going to send soon a v2 with my devres changes so we can continue
> this discussion on actual code.
v2 sent, with the devres changes. Discussion con continue there.
Best regards,
Luca
--
Luca Ceresoli, Bootl
ng the critical section
(drm_bridge_enter() returns nonzero), so sn65dsi83_atomic_disable()
cannot release and execute the devres action
* the devres action is executed at the end of sn65dsi83_remove()
Signed-off-by: Luca Ceresoli
---
Changed in v2:
- Use a devres action instead of
handled by a separate commit.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 35 ---
1 file changed, 12 insertions(+), 23 deletions(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
index
90e467cf91a134342c80d2f958b928
over the chain.
Add a mutex to be taken whenever looping or changing the encoder chain.
Also add two APIs to lock/unlock the mutex without the need to manipulate
internal struct drm_encoder fields.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_encoder.c | 2 ++
include/drm
drm_encoder_cleanup() modifies the encoder chain by removing bridges via
drm_bridge_detach(). Protect this whole operation by taking the mutex, so
any users iterating over the chain will not access it during the change.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_encoder.c | 2 ++
1
sult in disruption of the code iterating over the
chain. Avoid it by introducing a mutex to make list insertion, removal and
iterations mutually exclusive.
[1]
https://lore.kernel.org/lkml/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/#t
Signed-off-by: Luca Ceresoli
---
Luca Cereso
assignment. Add a
drm_bridge_put() before writing them to handle this.
Finally, there is also a function-local panel_bridge pointer taken inside
the loop and used after the loop. Use a cleanup action as well to ensure it
is put on return.
Signed-off-by: Luca Ceresoli
---
This series ensures the bridge
Hi Dmitry,
On Fri, 26 Sep 2025 01:07:26 +0300
Dmitry Baryshkov wrote:
> On Thu, Sep 25, 2025 at 07:19:49PM +0200, Luca Ceresoli wrote:
> > Some code is going to need connector-specific cleanup actions (namely
> > drm_bridge_connector will need to put refcounted bridges).
> &
s on disposal (handled by patch
1) and because of the complex code flow of drm_bridge_connector_init()
(handled by patch 2).
Signed-off-by: Luca Ceresoli
---
Luca Ceresoli (2):
drm/connector: allow a .destroy callback for drmm-allocated connectors
drm/display: bridge-connector: get/put the
assignment. Add a
drm_bridge_put() before writing them to handle this.
Finally, there is also a function-local panel_bridge pointer taken inside
the loop and used after the loop. Due to the various return points, use a
__free() cleanup action to ensure it is put on return.
Signed-off-by: Luca Ceresoli
Some code is going to need connector-specific cleanup actions (namely
drm_bridge_connector will need to put refcounted bridges).
The .destroy callback is appropriate for this task but it is currently
forbidden by drmm_connector_init(). Relax this limitation and document it.
Signed-off-by: Luca
Get a reference for the last_bridge when it is obtained and release it
using a cleanup action.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c
On Mon, 15 Sep 2025 12:12:45 +0200, Luca Ceresoli wrote:
> This series shows removed bridges to the global /dri/bridges file.
> Removed bridges are bridges after drm_bridges_remove() but before they are
> eventually freed on the last drm_bridge_put().
>
> This is part of t
Hello Svyatoslav,
On Sat, 6 Sep 2025 16:53:26 +0300
Svyatoslav Ryhel wrote:
> Existing VI and VIP implementation for Tegra20 is fully compatible with
> Tegra30.
>
> Signed-off-by: Svyatoslav Ryhel
Tested-by: Luca Ceresoli # Tegra20 VIP
Reviewed-by: Luca Ceresoli
--
L
Hello Svyatoslav,
On Fri, 5 Sep 2025 19:05:16 +0300
Svyatoslav Ryhel wrote:
> пт, 5 вер. 2025 р. о 18:59 Luca Ceresoli пише:
> >
> > Hello Svyatoslav,
> >
> > On Tue, 19 Aug 2025 15:16:21 +0300
> > Svyatoslav Ryhel wrote:
> >
> > > Add HFLIP a
just the type of container used to implement such
(de)registration.
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- extracted to an ad-hoc patch from the v7 patch "drm/bridge: add list of
removed refcounted bridges"
---
drivers/gpu/drm/drm_bridge.c | 12 ++--
1 file c
gt;
> > > On Wed, Sep 03, 2025 at 06:41:05PM +0800, Shengjiu Wang wrote:
> > > > On Tue, Sep 2, 2025 at 12:52 AM Luca Ceresoli
> > > > wrote:
> > > > >
> > > > > Hello Shengjiu,
> > > > >
> > > > > On Th
Hello,
On Tue, 02 Sep 2025 15:25:31 +0200
Luca Ceresoli wrote:
> On Fri, 01 Aug 2025 19:05:22 +0200, Luca Ceresoli wrote:
> > Note: the cover in v1 was mentioning by mistake
> > drm_bridge_get_last_bridge() instead of drm_bridge_get_next_bridge().
> >
Hi Maxime,
On Wed, 27 Aug 2025 09:46:03 +0200
Maxime Ripard wrote:
> On Wed, Aug 20, 2025 at 01:13:02PM +0200, Luca Ceresoli wrote:
> > Hello Maxime,
> >
> > On Tue, 19 Aug 2025 14:29:32 +0200
> > Maxime Ripard wrote:
> >
> > > > @@ -1005,7 +1
Hello Svyatoslav,
On Tue, 16 Sep 2025 19:24:52 +0300
Svyatoslav Ryhel wrote:
> вт, 16 вер. 2025 р. о 19:04 Luca Ceresoli пише:
> >
> > Hello Svyatoslav,
> >
> > On Sat, 6 Sep 2025 16:53:32 +0300
> > Svyatoslav Ryhel wrote:
> >
> > > By def
On Sat, 6 Sep 2025 16:53:34 +0300
Svyatoslav Ryhel wrote:
> The avdd-dsi-csi-supply is CSI power supply not VI, hence move it to
> proper place.
>
> Signed-off-by: Svyatoslav Ryhel
Tested-by: Luca Ceresoli # Tegra20 VIP
Reviewed-by: Luca Ceresoli
--
Luca Ceresoli, Bootlin
Em
ee comment above), maybe extend it:
return (subdev->ops == &tegra_csi_ops ||
subdev->ops == &tegra_vip_ops) ? subdev : NULL;
Let me know your thoughts.
Best regards,
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
commit: 288dac9fb6084330d968459c750c838fd06e10e6
Best regards,
--
Luca Ceresoli
On Tue, 16 Sep 2025 11:03:41 +0200
Maxime Ripard wrote:
> On Mon, Sep 15, 2025 at 05:58:05PM +0200, Luca Ceresoli wrote:
> > On Mon, 15 Sep 2025 14:22:24 +0200
> > Maxime Ripard wrote:
> > > On Fri, Aug 08, 2025 at 04:49:14PM +0200, Luca Ceresoli wrote:
> > &g
feedback on drm_for_each_bridge_in_chain_scoped()
would be very welcome to unlock both this and other series from being
applied/sent.
[0]
https://lore.kernel.org/all/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-3-edb6ee81e...@bootlin.com/
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Mon, 15 Sep 2025 14:22:24 +0200
Maxime Ripard wrote:
> Hi,
>
> On Fri, Aug 08, 2025 at 04:49:14PM +0200, Luca Ceresoli wrote:
> > All users have been replaced by drm_for_each_bridge_in_chain_scoped().
> >
> > Signed-off-by: Luca Ceresoli
> > ---
&
e beginning
> > of the .remove function.
>
> Another thing that just crossed my mind is why we don't call
> atomic_disable when we're tearing down the bridge too. We're doing it
> for the main DRM devices, it would make sense to me to disable the
> encoder -> bridge -> connector (and possibly CRTC) chain if we remove a
> bridge automatically.
Uh, interesting idea.
Do you mean something like:
void drm_bridge_unplug(struct drm_bridge *bridge)
{
bridge->unplugged = true;
synchronize_srcu(&drm_bridge_unplug_srcu);
drm_bridge_remove(bridge); // as per discussion above
drm_atomic_helper_shutdown(bridge->dev);
}
?
I'm not sure which is the right call to tear down the pipeline though.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
@bootlin.com
This series was initially part of v6 of this other series:
- Link to v6:
https://lore.kernel.org/dri-devel/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/
---
Luca Ceresoli (3):
drm/bridge: add list of removed refcounted bridges
drm/debugfs: show lingering bridges
be visible in this debugfs file.
Add lingering bridges to the /sys/kernel/debug/dri/bridges output.
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v9:
- rename leftover instances of "removed" to "lingering"
Changes in v8:
- updated to rename
the bridge from the lingering list and bring
bridge->list back to the initialized state.
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- split the documentation changes to a separate patch
- rename "removed" to "lingering"
- improve commi
just the type of container used to implement such
(de)registration.
Reviewed-by: Maxime Ripard
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- extracted to an ad-hoc patch from the v7 patch "drm/bridge: add list of
removed refcounted bridges"
---
drivers/gpu/drm/drm_bri
Hello Maxime,
On Wed, 20 Aug 2025 13:13:02 +0200
Luca Ceresoli wrote:
> > > + /*
> > > + * sn65dsi83_atomic_disable() should release some resources, but it
> > > + * cannot if we call drm_bridge_unplug() before it can
> > > + * drm_bridge_enter().
this debugfs file.
Add removed bridges to the /sys/kernel/debug/dri/bridges output.
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- updated to rename bridge_removed_list -> bridge_lingering_list
Changes in v7:
- rebased on current code which is in drm_bridge.c now
- removed
the bridge from the lingering list and bring
bridge->list back to the initialized state.
Signed-off-by: Luca Ceresoli
---
Changes in v8:
- split the documentation changes to a separate patch
- rename "removed" to "lingering"
- improve commits message about the sp
ps://lore.kernel.org/r/20250819-drm-bridge-debugfs-removed-v7-0-970702579...@bootlin.com
This series was initially part of v6 of this other series:
- Link to v6:
https://lore.kernel.org/dri-devel/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/
---
Luca Ceresoli (3):
drm/bridg
Hi Maxime,
On Wed, 10 Sep 2025 09:52:21 +0200
Maxime Ripard wrote:
> On Mon, Sep 08, 2025 at 03:49:01PM +0200, Luca Ceresoli wrote:
> > Hello Maxime,
> >
> > On Wed, 20 Aug 2025 13:13:02 +0200
> > Luca Ceresoli wrote:
> >
> > > > > +
by: Hulk Robot
> Signed-off-by: Qi Xi
Reviewed-by: Luca Ceresoli
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
se to add 3 different devres actions, one for each,
but it would be more code and a little more resources used and I don't
see the advantage.
I think it makes sense that I send my current version and we can
continue discussion based on the code. I'm waiting a bit before
sending it, in case you have feedback about the other branch of this
discussion (placement of drm_bridge_unplug()).
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Wed, 10 Sep 2025 12:59:12 +0200
Maxime Ripard wrote:
> On Mon, Sep 08, 2025 at 03:49:06PM +0200, Luca Ceresoli wrote:
> > Hi Maxime,
> >
> > On Wed, 27 Aug 2025 09:46:03 +0200
> > Maxime Ripard wrote:
> >
> > > On Wed, Aug 20, 202
Hello Dmitry, Maxime, DRM maintainers,
On Thu, 2 Jan 2025 13:01:40 +0100
Luca Ceresoli wrote:
> Hi Dmitry,
>
> On Tue, 31 Dec 2024 17:29:52 +0200
> Dmitry Baryshkov wrote:
>
> > On Tue, Dec 31, 2024 at 11:40:04AM +0100, Luca Ceresoli wrote:
> > > This driver
Hello,
+Cc: Dmitry's current e-mail address
I replied to such an old thread that is had an old address for Dmitry.
On Tue, 9 Sep 2025 17:29:07 +0200
Luca Ceresoli wrote:
> Hello Dmitry, Maxime, DRM maintainers,
>
> On Thu, 2 Jan 2025 13:01:40 +0100
> Luca Ceresoli wrote:
Hello Svyatoslav,
On Fri, 5 Sep 2025 19:11:06 +0300
Svyatoslav Ryhel wrote:
> пт, 5 вер. 2025 р. о 19:08 Luca Ceresoli пише:
> >
> > On Tue, 19 Aug 2025 15:16:25 +0300
> > Svyatoslav Ryhel wrote:
> >
> > > Tegra20, Tegra30 and Tegra114 have VI revision
or_state().
>
> Signed-off-by: Maxime Ripard
Reviewed-by: Luca Ceresoli
Tested-by: Luca Ceresoli # on imx8mp
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
esetting path, we can document what it's still useful for: to free
> the right state when we free the global state.
>
> Signed-off-by: Maxime Ripard
Reviewed-by: Luca Ceresoli
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
esetting path, we can document what it's still useful for: to free
> the right state when we free the global state.
>
> Signed-off-by: Maxime Ripard
Reviewed-by: Luca Ceresoli
Thanks for documenting these non-obvious (to DRM newcomers) concepts.
Luca
--
Luca Ceresoli, Bootlin
esetting path, we can document what it's still useful for: to free
> the right state when we free the global state.
>
> Signed-off-by: Maxime Ripard
Reviewed-by: Luca Ceresoli
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Tue, 19 Aug 2025 15:16:25 +0300
Svyatoslav Ryhel wrote:
> Tegra20, Tegra30 and Tegra114 have VI revision 1.
Why? You should mention the reason in the commit message.
But I don't see hw_revision used in the series, so unless I missed
something you should drop this patch.
Luca
t; V4L2_CID_VFLIP, 0, 1, 1, 0);
Based on my understanding of V4L2, this should not be done.
AFAIK subdevs should expose what the hardware block can do,
independently from other subdevs. It is up to userspace (e.g.
libcamera) to use the most appropriate control when there are redundant
ones.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Fri, 08 Aug 2025 16:49:07 +0200, Luca Ceresoli wrote:
> This series adds drm_bridge_get/put() calls for DRM bridges used when
> looping over bridges in an encoder chain.
>
> This is part of the work towards removal of bridges from a still existing
> DRM pipeline without use-
On Tue, 02 Sep 2025 11:35:01 +0200
Maxime Ripard wrote:
> The drm_atomic_get_existing_connector_state() function is deprecated and
> isn't used anymore, so let's remove it.
>
> Reviewed-by: Dmitry Baryshkov
> Signed-off-by: Maxime Ripard
Reviewed-by: Luca Ceresoli
On Fri, 01 Aug 2025 19:05:22 +0200, Luca Ceresoli wrote:
> Note: the cover in v1 was mentioning by mistake
> drm_bridge_get_last_bridge() instead of drm_bridge_get_next_bridge().
>
>
> This series adds drm_bridge_get/put() calls for DRM brid
Hi Maxime,
On Wed, 20 Aug 2025 11:40:30 +0200
Luca Ceresoli wrote:
> Hi Maxime,
>
> On Tue, 19 Aug 2025 18:01:37 +0200
> Luca Ceresoli wrote:
>
> > Hi Maxime,
> >
> > On Tue, 19 Aug 2025 15:47:
ever allow me to push.
> >
> > How can I get that commit pushed to drm-misc-next?
> >
> > I think `dim push-branch -f` would work: am I supposed to use it?
>
> Try 'dim -f push-branch'. The parameters after push-branch go to git,
> and you don't want
Hello DRM maintainers,
On Wed, 20 Aug 2025 16:43:56 +0300
Andy Shevchenko wrote:
> On Thu, Aug 14, 2025 at 06:36:09PM +0200, Luca Ceresoli wrote:
> > On Wed, 6 Aug 2025 00:55:02 +0300
> > Andy Shevchenko wrote:
> >
> > > On Fri, Aug 01, 2025 at 07:05:2
n v5, but I noticed
this patch and I was wondering whether this mutex_lock/unlock() is
really needed, as you're copying an int.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
lish
> kind of it to that too. Maybe using register / registration would make
> it more obvious?
OK, I'll reword using register/registration and definitely move to a
separate patch.
Thanks for reviewing.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
ources_needed) {
> > + if (!ctx->irq)
> > + sn65dsi83_monitor_stop(ctx);
> > +
> > + gpiod_set_value_cansleep(ctx->enable_gpio, 0);
> > + usleep_range(1, 11000);
> > +
> > + regulator_dis
Hi Maxime,
On Tue, 19 Aug 2025 18:01:37 +0200
Luca Ceresoli wrote:
> Hi Maxime,
>
> On Tue, 19 Aug 2025 15:47:06 +0200
> Maxime Ripard wrote:
>
> > > +/**
> > > + * drm_for_each_bridge_in_chain_scoped - iterate
on-NULL and the
cleanup action does call drm_bridge_put()
See examples such as for_each_child_of_node_scoped() and other OF
iterators which work in the same way (which is no coincidence, I used
them as starting point for writing this patch).
Best regards,
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
On Fri, 08 Aug 2025 16:49:07 +0200
Luca Ceresoli wrote:
> This series depends on:
>
> * commit 103578241512 ("drm/bridge-connector: Fix bridge in
>drm_connector_hdmi_audio_init()"), currently in drm-misc-fixes, not yet
>on drm-misc-next
Just a quick update:
Hi Maxime,
On Fri, 8 Aug 2025 15:20:01 +0200
Luca Ceresoli wrote:
> > > Some drawbacks of current code are because at every DSI attach/detach,
> > > the samsung-dsim does drm_bridge_add/remove() itself:
> > >
> > > * To me this looks like a ba
this debugfs file.
Add removed bridges to the /sys/kernel/debug/dri/bridges output.
Signed-off-by: Luca Ceresoli
---
Changes in v7:
- rebased on current code which is in drm_bridge.c now
- removed if (drm_bridge_is_refcounted(bridge)), refcounting is not
optional
- don't show bridge ad
6-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/t/#u
Signed-off-by: Luca Ceresoli
---
This series was initially part of v6 of this other series:
- Link to v6:
https://lore.kernel.org/dri-devel/20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/
---
Luca Ceresoli (3):
drm/debugfs: br
Now that bridges are refcounted, exposing the refcount in debugfs can be
useful.
Suggested-by: Dmitry Baryshkov
Signed-off-by: Luca Ceresoli
---
Changes in v7:
- rebased on current code:
- code is in drm_bridge.c now
- removed if (drm_bridge_is_refcounted(bridge)), refcounting is not
n the removed list, not at the initialized state as
drm_bridge_add() currently expects.
Signed-off-by: Luca Ceresoli
---
Changes in v7:
- rebase on current drm-misc-next
- remove if (drm_bridge_is_refcounted(bridge)), refcounting is now
mandatory
- add check to detect when re-adding a bridge that is
Hello relevant maintainers,
On Wed, 6 Aug 2025 00:55:02 +0300
Andy Shevchenko wrote:
> On Fri, Aug 01, 2025 at 07:05:23PM +0200, Luca Ceresoli wrote:
> > Add an equivalent of list_first_entry_or_null() to obtain the last element
> > of a list.
>
> Acked-by: Andy She
All users have been replaced by drm_for_each_bridge_in_chain_scoped().
Signed-off-by: Luca Ceresoli
---
.clang-format| 1 -
include/drm/drm_bridge.h | 14 --
2 files changed, 15 deletions(-)
diff --git a/.clang-format b/.clang-format
index
Use drm_for_each_bridge_in_chain_from _scoped() instead of an open-coded
loop based on drm_bridge_get_next_bridge() to ensure the bridge being
looped on is refcounted and simplify the driver code.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/omapdrm/omap_encoder.c | 4 +---
1 file changed
Add variant of drm_for_each_bridge_in_chain_scoped() that iterates on the
encoder bridge from a given bridge until the end of the chain.
Signed-off-by: Luca Ceresoli
---
include/drm/drm_bridge.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include/drm/drm_bridge.h b
Use drm_for_each_bridge_in_chain_scoped() instead of
drm_for_each_bridge_in_chain() to ensure the bridge being looped on is
refcounted.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm
Use drm_for_each_bridge_in_chain_scoped() instead of
drm_for_each_bridge_in_chain() to ensure the bridge being looped on is
refcounted.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_atomic.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm
Use drm_for_each_bridge_in_chain_scoped() instead of
drm_for_each_bridge_in_chain() to ensure the bridge being looped on is
refcounted.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/display/drm_bridge_connector.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a
e_bus_flags().
Also deprecate drm_for_each_bridge_in_chain(), in preparation for removing
it after converting all users to the scoped version.
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- clarified commit message and mention an example where the current
behaviour of drm_bridge_get_n
ot;drm/bridge-connector: Fix bridge in
drm_connector_hdmi_audio_init()") already did for the audio HDMI bridge,
use n local variable inside the scopes where it is needed as a
bridge_connector->bridge_hdmi_cec shortcut to make its scope clearer as
well as to allow removing the 'bridge' varia
moved the code dereferencing it from the same 'if'
scope, but did not remove the assignment.
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/display/drm_bridge_connector.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c
b/dr
6-hotplug-drm-bridge-v6-0-9d6f2c9c3...@bootlin.com/t/#u
Signed-off-by: Luca Ceresoli
---
Changes in v2:
- Prune series dependency list
- Clarify wording in cover letter and patch 3
- Link to v1:
https://lore.kernel.org/r/20250723-drm-bridge-alloc-getput-for_each_bridge-v1-0-be8f4ae00...@bootlin.
successful drm_bridge_enter() call), which occurs whenever the
hardware is removed while the display is active. When that happens,
sn65dsi83_atomic_disable() in unable to release some resources, thus this
needs to be done in sn65dsi83_remove() after drm_bridge_unplug().
Signed-off-by: Luca Ceresoli
o unplug of the SN65DSI8x
bridge.
[0] https://lore.kernel.org/all/20250106-vigorous-talented-viper-fa49d9@houat/
Signed-off-by: Luca Ceresoli
---
Luca Ceresoli (2):
drm/bridge: add drm_bridge_unplug() and drm_bridge_enter/exit()
drm/bridge: ti-sn65dsi83: protect device resources on u
.
Suggested-by: Maxime Ripard
Link: https://lore.kernel.org/all/20250106-vigorous-talented-viper-fa49d9@houat/
Signed-off-by: Luca Ceresoli
---
drivers/gpu/drm/drm_bridge.c | 58
include/drm/drm_bridge.h | 12 +
2 files changed, 70 insertions
Hi Maxime,
On Thu, 31 Jul 2025 12:05:27 +0200
Maxime Ripard wrote:
> On Mon, Jul 28, 2025 at 07:44:30PM +0200, Luca Ceresoli wrote:
> > Hi Maxime,
> >
> > thanks for the quick feedback.
> >
> > On Mon, 28 Jul 2025 10:10:38 +0200
> > Maxime Ripard wrot
1 - 100 of 852 matches
Mail list logo