Skip to contentSkip to conversation

drm/bridge: adv7511: Switch to atomic operations

PATCH Applied Jesse Van Gavere 2 participants 4 messages Jan 6, 2025 – Jan 23, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/bridge: adv7511: Switch to atomic operations

Use the atomic version of enable/disable.

To support bridges where bus format negotiation is needed such as TIDSS we need to implement atomic_get_input_bus_fmts, prepare the driver for this by switching the existing operations to it's atomic variants.

---
Changes in v2:
- Reword commit message to make clear this commit is to prepare for adding input bus formats to make the driver work with systems like TIDSS which expect this capability as suggested by Dmitry

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +10 -4
index eb5919b38263..19c14916ded4 100644
@@ -910,14 +910,16 @@ static struct adv7511 *bridge_to_adv7511(struct drm_bridge *bridge)
 	return container_of(bridge, struct adv7511, bridge);
 }
 
-static void adv7511_bridge_enable(struct drm_bridge *bridge)
+static void adv7511_bridge_atomic_enable(struct drm_bridge *bridge,
+					 struct drm_bridge_state *bridge_state)
 {
 	struct adv7511 *adv = bridge_to_adv7511(bridge);
 
 	adv7511_power_on(adv);
 }
 
-static void adv7511_bridge_disable(struct drm_bridge *bridge)
+static void adv7511_bridge_atomic_disable(struct drm_bridge *bridge,
+					  struct drm_bridge_state *bridge_state)
 {
 	struct adv7511 *adv = bridge_to_adv7511(bridge);
 
@@ -996,14 +998,18 @@ static void adv7511_bridge_hpd_notify(struct drm_bridge *bridge,
 }
 
 static const struct drm_bridge_funcs adv7511_bridge_funcs = {
-	.enable = adv7511_bridge_enable,
-	.disable = adv7511_bridge_disable,
 	.mode_set = adv7511_bridge_mode_set,
 	.mode_valid = adv7511_bridge_mode_valid,
 	.attach = adv7511_bridge_attach,
 	.detect = adv7511_bridge_detect,
 	.edid_read = adv7511_bridge_edid_read,
 	.hpd_notify = adv7511_bridge_hpd_notify,
+
+	.atomic_enable = adv7511_bridge_atomic_enable,
+	.atomic_disable = adv7511_bridge_atomic_disable,
+	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
+	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
+	.atomic_reset = drm_atomic_helper_bridge_reset,
 };
 
 /* -----------------------------------------------------------------------------
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Jesse Van Gavere

Use the atomic version of enable/disable.

To support bridges where bus format negotiation is needed such as TIDSS we need to implement atomic_get_input_bus_fmts, prepare the driver for this by switching the existing operations to it's atomic variants.

Quoted 8 lines

---
Changes in v2:
- Reword commit message to make clear this commit is to prepare for adding input bus formats to make the driver work with systems like TIDSS which expect this capability as suggested by Dmitry

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
Signature · 2 lines
With best wishes
Dmitry
#2 lore raw

Hello,

This patch seems to have been archived but I can't seem to find it in the drm-misc git, is there anything else I should be doing to get this patch approved and included?

Best regards,
Jesse

#3 lore raw
In reply to Jesse Van Gavere
Quoted 8 lines · Jesse Van Gavere

Use the atomic version of enable/disable.

To support bridges where bus format negotiation is needed such as TIDSS we need to implement atomic_get_input_bus_fmts, prepare the driver for this by switching the existing operations to it's atomic variants.

[...]

Applied to drm-misc-next, thanks!

[1/1] drm/bridge: adv7511: Switch to atomic operations

      commit: ed868bcb4f5cecbb61c4f057aa7550650643ac3b

Best regards,

Signature · 2 lines
With best wishes
Dmitry