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: [RFC PATCH] drm/bridge: adv7511: use cache_only during power down
Date: Fri, 24 Jul 2026 17:32:35 +0700 [thread overview]
Message-ID: <20260724103235.57577-1-phucduc.bui@gmail.com> (raw)
From: bui duc phuc <phucduc.bui@gmail.com>
adv7511_power_on() and adv7511_power_off() restore the register state
using regcache_mark_dirty() and regcache_sync(), but nothing prevents
other code paths from accessing the registers over I2C while the chip
is powered down.
Wrap the power-down window with regcache_cache_only() to prevent direct
register accesses. It is unclear whether this is necessary or whether
it could affect the CEC or packet sub-regmaps, so send this as an RFC.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
This RFC is related to the following patch series:
https://lore.kernel.org/all/20260724100803.50169-1-phucduc.bui@gmail.com/
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 3e470366bce0..49da1806797b 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -323,6 +323,7 @@ static void adv7511_power_off(struct adv7511 *adv7511)
__adv7511_power_off(adv7511);
if (adv7511->info->has_dsi)
adv7533_dsi_power_off(adv7511);
+ regcache_cache_only(adv7511->regmap, true);
adv7511->powered = false;
}
@@ -374,11 +375,13 @@ static void adv7511_power_on(struct adv7511 *adv7511)
/*
* Most of the registers are reset during power down or when HPD is low.
*/
+ regcache_cache_only(adv7511->regmap, false);
ret = regcache_sync(adv7511->regmap);
if (ret) {
dev_err(&adv7511->i2c_main->dev,
"Failed to sync register cache: %d\n", ret);
__adv7511_power_off(adv7511);
+ regcache_cache_only(adv7511->regmap, true);
return;
}
--
2.43.0
next reply other threads:[~2026-07-24 10:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 10:32 phucduc.bui [this message]
2026-07-24 10:39 ` [RFC PATCH] drm/bridge: adv7511: use cache_only during power down Laurent Pinchart
2026-07-24 10:56 ` Bui Duc Phuc
2026-07-24 12:20 ` Bui Duc Phuc
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=20260724103235.57577-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox