From: phucduc.bui@gmail.com
To: Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Cc: Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH 1/2] drm/bridge: adv7511: Reorder power_on() and power_off()
Date: Fri, 24 Jul 2026 17:08:02 +0700 [thread overview]
Message-ID: <20260724100803.50169-1-phucduc.bui@gmail.com> (raw)
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
next reply other threads:[~2026-07-24 10:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 10:08 phucduc.bui [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260724100803.50169-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.