All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/bridge: adv7511: Reorder power_on() and power_off()
@ 2026-07-24 10:08 phucduc.bui
  2026-07-24 10:08 ` [PATCH 2/2] drm/bridge: adv7511: handle regcache_sync() failure on power on phucduc.bui
  0 siblings, 1 reply; 3+ messages in thread
From: phucduc.bui @ 2026-07-24 10:08 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong
  Cc: Robert Foss, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	Luca Ceresoli, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, dri-devel,
	linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Move the power_on function block below the power_off function block
to prepare for the following patch.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 48 ++++++++++----------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 02f8f7e78a16..d98a8f7afc7f 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -302,6 +302,30 @@ static void adv7511_set_link_config(struct adv7511 *adv7511,
 	adv7511->rgb = config->input_colorspace == HDMI_COLORSPACE_RGB;
 }
 
+static void __adv7511_power_off(struct adv7511 *adv7511)
+{
+	/* TODO: setup additional power down modes */
+	if (adv7511->info->hpd_override_enable)
+		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER2,
+				   ADV7535_REG_POWER2_HPD_OVERRIDE, 0);
+
+	regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
+			   ADV7511_POWER_POWER_DOWN,
+			   ADV7511_POWER_POWER_DOWN);
+	regmap_update_bits(adv7511->regmap,
+			   ADV7511_REG_INT_ENABLE(1),
+			   ADV7511_INT1_DDC_ERROR, 0);
+	regcache_mark_dirty(adv7511->regmap);
+}
+
+static void adv7511_power_off(struct adv7511 *adv7511)
+{
+	__adv7511_power_off(adv7511);
+	if (adv7511->info->has_dsi)
+		adv7533_dsi_power_off(adv7511);
+	adv7511->powered = false;
+}
+
 static void __adv7511_power_on(struct adv7511 *adv7511)
 {
 	adv7511->current_edid_segment = -1;
@@ -355,30 +379,6 @@ static void adv7511_power_on(struct adv7511 *adv7511)
 	adv7511->powered = true;
 }
 
-static void __adv7511_power_off(struct adv7511 *adv7511)
-{
-	/* TODO: setup additional power down modes */
-	if (adv7511->info->hpd_override_enable)
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER2,
-				   ADV7535_REG_POWER2_HPD_OVERRIDE, 0);
-
-	regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-			   ADV7511_POWER_POWER_DOWN,
-			   ADV7511_POWER_POWER_DOWN);
-	regmap_update_bits(adv7511->regmap,
-			   ADV7511_REG_INT_ENABLE(1),
-			   ADV7511_INT1_DDC_ERROR, 0);
-	regcache_mark_dirty(adv7511->regmap);
-}
-
-static void adv7511_power_off(struct adv7511 *adv7511)
-{
-	__adv7511_power_off(adv7511);
-	if (adv7511->info->has_dsi)
-		adv7533_dsi_power_off(adv7511);
-	adv7511->powered = false;
-}
-
 /* -----------------------------------------------------------------------------
  * Interrupt and hotplug detection
  */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-24 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 10:08 [PATCH 1/2] drm/bridge: adv7511: Reorder power_on() and power_off() phucduc.bui
2026-07-24 10:08 ` [PATCH 2/2] drm/bridge: adv7511: handle regcache_sync() failure on power on phucduc.bui
2026-07-24 10:24   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.