* [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza
@ 2026-09-11 10:29 Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure Krzysztof Kozlowski
` (6 more replies)
0 siblings, 7 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable, Krzysztof Kozlowski, Konrad Dybcio, Abel Vesa,
Conor Dooley
Changes in v4:
- Fix second name in "Properly handle msm_ioremap() without name"
- Tags
- Link to v3: https://patch.msgid.link/20260908-drm-msm-hdmi-fixes-before-eliza-v3-0-dcf8956878ca@oss.qualcomm.com
Changes in v3:
- Add missing regulator_bulk_disable() in msm_hdmi_phy_resource_enable()
- Set hdmi->power_off=false before calling msm_hdmi_audio_update()
- Link to v2: https://patch.msgid.link/20260907-drm-msm-hdmi-fixes-before-eliza-v2-0-b097cf1eac77@oss.qualcomm.com
Split from Eliza patchset, thus `b4 diff` won't exactly work.
v1:
https://lore.kernel.org/all/20260828-drm-msm-hdmi-eliza-v1-0-67843277de17@oss.qualcomm.com/
Changes since v1:
1. New patches:
drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure
drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()
drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable
2. Patch #5: use simpler ?:
3. Add tags.
---
Krzysztof Kozlowski (7):
drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure
drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()
drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable
drm/msm/hdmi_bridge: Drop redundant initialization in msm_hdmi_bridge_init()
drm/msm: Properly handle msm_ioremap() without name
drm/msm/dsi: Fix indentation of if block in dsi_mgr_bridge_mode_valid()
dt-bindings: display/msm: hdmi: Correct name of disallowed supplies
.../devicetree/bindings/display/msm/hdmi.yaml | 4 +--
drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 34 +++++++++++++++-------
drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 16 ++++++++--
drivers/gpu/drm/msm/msm_io_utils.c | 6 ++--
5 files changed, 44 insertions(+), 18 deletions(-)
---
base-commit: 6e95d4043b2c59f1887fd72d1620b7fd3d3138a5
change-id: 20260907-drm-msm-hdmi-fixes-before-eliza-c9bc7185d84c
Best regards,
--
Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
2026-09-11 15:47 ` Konrad Dybcio
2026-09-11 15:47 ` Konrad Dybcio
2026-09-11 10:29 ` [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable() Krzysztof Kozlowski
` (5 subsequent siblings)
6 siblings, 2 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable, Krzysztof Kozlowski
If msm_hdmi_phy_resource_enable() fails, e.g. when enabling regulators,
it should reverse the state of things already changed.
msm_hdmi_phy_resource_enable() is used also in probe path, thus such
failure, which could be simple deferred probe, would leave these
resources permanently enabled for the rest of the runtime.
Cc: <stable@vger.kernel.org>
Fixes: 15b4a4523859 ("drm/msm/hdmi: Create a separate HDMI PHY driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_phy.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
index eb1088755cb3..15e37596bdb1 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_phy.c
@@ -67,16 +67,28 @@ int msm_hdmi_phy_resource_enable(struct hdmi_phy *phy)
ret = regulator_bulk_enable(cfg->num_regs, phy->regs);
if (ret) {
DRM_DEV_ERROR(dev, "failed to enable regulators: (%d)\n", ret);
- return ret;
+ goto err_pm_put;
}
for (i = 0; i < cfg->num_clks; i++) {
ret = clk_prepare_enable(phy->clks[i]);
- if (ret)
+ if (ret) {
DRM_DEV_ERROR(dev, "failed to enable clock: %s (%d)\n",
cfg->clk_names[i], ret);
+ goto err_clk_unprepare;
+ }
}
+ return 0;
+
+err_clk_unprepare:
+ for (; i > 0; i--)
+ clk_disable_unprepare(phy->clks[i - 1]);
+ regulator_bulk_disable(cfg->num_regs, phy->regs);
+
+err_pm_put:
+ pm_runtime_put_sync(dev);
+
return ret;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
2026-09-11 10:58 ` sashiko-bot
2026-09-11 15:48 ` Konrad Dybcio
2026-09-11 10:29 ` [PATCH v4 3/7] drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable Krzysztof Kozlowski
` (4 subsequent siblings)
6 siblings, 2 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable, Krzysztof Kozlowski
Properly handle power up failures during .atomic_pre_enable() by
aborting the .atomic_pre_enable() to avoid accessing registers why
blocks did not bring up. Otherwise this could lead to imprecise aborts
when accessing MMIO while entire power domain is off.
Cc: <stable@vger.kernel.org>
Fixes: ba3d7bf3a7ab ("drm/msm/hdmi: Convert PHY files according to new design")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
index 157f19bd90b4..db85400e574e 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
@@ -13,14 +13,16 @@
#include "msm_kms.h"
#include "hdmi.h"
-static void msm_hdmi_power_on(struct drm_bridge *bridge)
+static int msm_hdmi_power_on(struct drm_bridge *bridge)
{
struct drm_device *dev = bridge->dev;
struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge);
struct hdmi *hdmi = hdmi_bridge->hdmi;
int ret;
- pm_runtime_resume_and_get(&hdmi->pdev->dev);
+ ret = pm_runtime_resume_and_get(&hdmi->pdev->dev);
+ if (ret)
+ return ret;
if (hdmi->extp_clk) {
DBG("pixclock: %lu", hdmi->pixclock);
@@ -29,9 +31,14 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge)
DRM_DEV_ERROR(dev->dev, "failed to set extp clk rate: %d\n", ret);
ret = clk_prepare_enable(hdmi->extp_clk);
- if (ret)
+ if (ret) {
DRM_DEV_ERROR(dev->dev, "failed to enable extp clk: %d\n", ret);
+ pm_runtime_put(&hdmi->pdev->dev);
+ return ret;
+ }
}
+
+ return 0;
}
static void power_off(struct drm_bridge *bridge)
@@ -287,13 +294,18 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
msm_hdmi_set_timings(hdmi, &crtc_state->adjusted_mode);
- mutex_lock(&hdmi->state_mutex);
- if (!hdmi->power_on) {
- msm_hdmi_phy_resource_enable(phy);
- msm_hdmi_power_on(bridge);
- hdmi->power_on = true;
+ scoped_guard(mutex, &hdmi->state_mutex) {
+ if (!hdmi->power_on) {
+ if (msm_hdmi_phy_resource_enable(phy))
+ return;
+
+ if (msm_hdmi_power_on(bridge)) {
+ msm_hdmi_phy_resource_disable(phy);
+ return;
+ }
+ hdmi->power_on = true;
+ }
}
- mutex_unlock(&hdmi->state_mutex);
if (connector->display_info.is_hdmi)
msm_hdmi_audio_update(hdmi);
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 3/7] drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable() Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
2026-09-11 10:43 ` sashiko-bot
2026-09-11 10:29 ` [PATCH v4 4/7] drm/msm/hdmi_bridge: Drop redundant initialization in msm_hdmi_bridge_init() Krzysztof Kozlowski
` (3 subsequent siblings)
6 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable, Konrad Dybcio, Krzysztof Kozlowski
Turning off the power in msm_hdmi_bridge_atomic_post_disable() should
follow reverse order of powering up, not only because it is logical, but
also because msm_hdmi_audio_update() accesses registers thus block
should still be powered on.
Depending on specific timing, existing code could have accesses to MMIO
of powered off block.
Cc: stable@vger.kernel.org
Fixes: c0c0d9eeeb8d ("drm/msm: hdmi audio support")
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
index db85400e574e..1860605850c9 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
@@ -339,10 +339,10 @@ static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge,
msm_hdmi_phy_powerdown(phy);
if (hdmi->power_on) {
- power_off(bridge);
hdmi->power_on = false;
if (hdmi->connector->display_info.is_hdmi)
msm_hdmi_audio_update(hdmi);
+ power_off(bridge);
msm_hdmi_phy_resource_disable(phy);
}
mutex_unlock(&hdmi->state_mutex);
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 4/7] drm/msm/hdmi_bridge: Drop redundant initialization in msm_hdmi_bridge_init()
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
` (2 preceding siblings ...)
2026-09-11 10:29 ` [PATCH v4 3/7] drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 5/7] drm/msm: Properly handle msm_ioremap() without name Krzysztof Kozlowski
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
Konrad Dybcio, Krzysztof Kozlowski
Local 'struct drm_bridge *bridge' variable is assigned in ~13th line of
the function, before any first use, thus explicit NULL initialization is
not necessary.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
index 1860605850c9..49587927e8a5 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
@@ -484,7 +484,7 @@ msm_hdmi_hotplug_work(struct work_struct *work)
/* initialize bridge */
int msm_hdmi_bridge_init(struct hdmi *hdmi)
{
- struct drm_bridge *bridge = NULL;
+ struct drm_bridge *bridge;
struct hdmi_bridge *hdmi_bridge;
int ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 5/7] drm/msm: Properly handle msm_ioremap() without name
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
` (3 preceding siblings ...)
2026-09-11 10:29 ` [PATCH v4 4/7] drm/msm/hdmi_bridge: Drop redundant initialization in msm_hdmi_bridge_init() Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
2026-09-11 15:45 ` Konrad Dybcio
2026-09-11 10:29 ` [PATCH v4 6/7] drm/msm/dsi: Fix indentation of if block in dsi_mgr_bridge_mode_valid() Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 7/7] dt-bindings: display/msm: hdmi: Correct name of disallowed supplies Krzysztof Kozlowski
6 siblings, 1 reply; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
Abel Vesa, Krzysztof Kozlowski
msm_ioremap() accepts being called without name of the region to map and
in such case maps by index 0. However error paths still use the name in
error message.
Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/gpu/drm/msm/msm_io_utils.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c
index a6efe1eac271..99221b0d7e3f 100644
--- a/drivers/gpu/drm/msm/msm_io_utils.c
+++ b/drivers/gpu/drm/msm/msm_io_utils.c
@@ -77,7 +77,8 @@ static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name
if (!res) {
if (!quiet)
- DRM_DEV_ERROR(&pdev->dev, "failed to get memory resource: %s\n", name);
+ DRM_DEV_ERROR(&pdev->dev, "failed to get memory resource: %s\n",
+ (name ?: "#0"));
return ERR_PTR(-EINVAL);
}
@@ -86,7 +87,8 @@ static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name
ptr = devm_ioremap(&pdev->dev, res->start, size);
if (!ptr) {
if (!quiet)
- DRM_DEV_ERROR(&pdev->dev, "failed to ioremap: %s\n", name);
+ DRM_DEV_ERROR(&pdev->dev, "failed to ioremap: %s\n",
+ (name ?: "#0"));
return ERR_PTR(-ENOMEM);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 6/7] drm/msm/dsi: Fix indentation of if block in dsi_mgr_bridge_mode_valid()
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
` (4 preceding siblings ...)
2026-09-11 10:29 ` [PATCH v4 5/7] drm/msm: Properly handle msm_ioremap() without name Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 7/7] dt-bindings: display/msm: hdmi: Correct name of disallowed supplies Krzysztof Kozlowski
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
Konrad Dybcio, Krzysztof Kozlowski
Correct confusing indentation within else {} block in
dsi_mgr_bridge_mode_valid().
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
drivers/gpu/drm/msm/dsi/dsi_manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 959daa88b1d0..531d4ff78f56 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -429,7 +429,7 @@ static enum drm_mode_status dsi_mgr_bridge_mode_valid(struct drm_bridge *bridge,
if (dev_pm_opp_get_opp_count(&pdev->dev) != 0)
return MODE_CLOCK_RANGE;
} else {
- return MODE_ERROR;
+ return MODE_ERROR;
}
return msm_dsi_host_check_dsc(host, mode);
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 7/7] dt-bindings: display/msm: hdmi: Correct name of disallowed supplies
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
` (5 preceding siblings ...)
2026-09-11 10:29 ` [PATCH v4 6/7] drm/msm/dsi: Fix indentation of if block in dsi_mgr_bridge_mode_valid() Krzysztof Kozlowski
@ 2026-09-11 10:29 ` Krzysztof Kozlowski
6 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-09-11 10:29 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter,
Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
Conor Dooley, Krzysztof Kozlowski
There are no properties in DTS or Linux drivers called
"core-vcc-supplies" or "hdmi-mux-supplies", so the binding probably
wanted "-supply" properties instead (which are defined in the top-level
properties of the binding).
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
---
Documentation/devicetree/bindings/display/msm/hdmi.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/msm/hdmi.yaml b/Documentation/devicetree/bindings/display/msm/hdmi.yaml
index dfec6c3480f3..02d27ccad024 100644
--- a/Documentation/devicetree/bindings/display/msm/hdmi.yaml
+++ b/Documentation/devicetree/bindings/display/msm/hdmi.yaml
@@ -113,7 +113,7 @@ allOf:
- const: core
- const: master_iface
- const: slave_iface
- core-vcc-supplies: false
+ core-vcc-supply: false
- if:
properties:
@@ -136,7 +136,7 @@ allOf:
- const: core
- const: alt_iface
- const: extp
- hdmi-mux-supplies: false
+ hdmi-mux-supply: false
- if:
properties:
--
2.53.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v4 3/7] drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable
2026-09-11 10:29 ` [PATCH v4 3/7] drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable Krzysztof Kozlowski
@ 2026-09-11 10:43 ` sashiko-bot
0 siblings, 0 replies; 14+ messages in thread
From: sashiko-bot @ 2026-09-11 10:43 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: robh, devicetree, conor+dt, dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Concurrent lockless calls to `msm_hdmi_audio_update()` from ALSA/ASoC and DRM lead to unclocked MMIO accesses, hardware state corruption, and data races.
--
commit d1867d224f6fab10a2909a251c0566882d455741
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Date: Fri Sep 11 10:29:36 2026 +0000
drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable
This commit reorders power_off() and msm_hdmi_audio_update() in
msm_hdmi_bridge_atomic_post_disable(). This ensures the HDMI block remains
powered on when msm_hdmi_audio_update() accesses hardware registers.
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> @@ -339,10 +339,10 @@ static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge,
> msm_hdmi_phy_powerdown(phy);
>
> if (hdmi->power_on) {
> - power_off(bridge);
> hdmi->power_on = false;
> if (hdmi->connector->display_info.is_hdmi)
> msm_hdmi_audio_update(hdmi);
[Severity: High]
This isn't a bug introduced by this patch, but does this fully resolve the
unclocked MMIO accesses that can lead to hardware state corruption or bus
hangs?
While this correctly orders the power down sequence for the DRM bridge,
concurrent lockless calls to msm_hdmi_audio_update() can still happen from
ALSA/ASoC entry points while the display is powered off.
For example, a local user running an ALSA client can trigger this via the
prepare hook:
drivers/gpu/drm/msm/hdmi/hdmi_audio.c:msm_hdmi_bridge_audio_prepare() {
...
return msm_hdmi_audio_update(hdmi);
}
Or during shutdown:
drivers/gpu/drm/msm/hdmi/hdmi_audio.c:msm_hdmi_bridge_audio_shutdown() {
...
msm_hdmi_audio_update(hdmi);
}
Both of these ALSA hooks call msm_hdmi_audio_update() without acquiring
state_mutex or checking pm_runtime_get_sync(). If power_off() has already
disabled the clocks, the unclocked MMIO reads and writes in
msm_hdmi_audio_update():
drivers/gpu/drm/msm/hdmi/hdmi_audio.c:msm_hdmi_audio_update() {
...
/* Read first before writing */
acr_pkt_ctrl = hdmi_read(hdmi, REG_HDMI_ACR_PKT_CTRL);
...
}
can cause synchronous external aborts on ARM platforms resulting in a
kernel panic. Should these audio hooks be synchronized with the bridge
power state?
> + power_off(bridge);
> msm_hdmi_phy_resource_disable(phy);
> }
> mutex_unlock(&hdmi->state_mutex);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-drm-msm-hdmi-fixes-before-eliza-v4-0-87bdb9f1987f@oss.qualcomm.com?part=3
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()
2026-09-11 10:29 ` [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable() Krzysztof Kozlowski
@ 2026-09-11 10:58 ` sashiko-bot
2026-09-11 15:48 ` Konrad Dybcio
1 sibling, 0 replies; 14+ messages in thread
From: sashiko-bot @ 2026-09-11 10:58 UTC (permalink / raw)
To: Krzysztof Kozlowski; +Cc: dri-devel, conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [High] The patch handles power-up failures by returning early from `atomic_pre_enable`, but leaves unconditional MMIO accesses unguarded in `atomic_post_disable`, leading to a fatal imprecise abort.
Pre-existing issues:
- [High] `msm_hdmi_set_timings` accesses MMIO registers before the HDMI power domain is enabled.
--
commit 8b49f93cb61baf0b2ba06628a0200e4134a1eb45
Author: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()
This patch properly handles power up failures during .atomic_pre_enable()
by aborting early to avoid accessing registers when blocks did not bring up,
preventing imprecise aborts when the entire power domain is off.
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> index 157f19bd90b4e..db85400e574e4 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
[ ... ]
> @@ -287,13 +294,18 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
>
> msm_hdmi_set_timings(hdmi, &crtc_state->adjusted_mode);
[Severity: High]
This is a pre-existing issue, but does this function access MMIO registers
before the HDMI power domain is enabled?
msm_hdmi_set_timings() writes to registers like REG_HDMI_TOTAL:
hdmi_write(hdmi, REG_HDMI_TOTAL,
HDMI_TOTAL_H_TOTAL(mode->htotal - 1) | ...
Since this happens before msm_hdmi_power_on() enables the power domain and
clocks, could this trigger an imprecise abort if HPD is not currently keeping
the power domain active (for example, when userspace forces a display
connection)?
>
> - mutex_lock(&hdmi->state_mutex);
> - if (!hdmi->power_on) {
> - msm_hdmi_phy_resource_enable(phy);
> - msm_hdmi_power_on(bridge);
> - hdmi->power_on = true;
> + scoped_guard(mutex, &hdmi->state_mutex) {
> + if (!hdmi->power_on) {
> + if (msm_hdmi_phy_resource_enable(phy))
> + return;
> +
> + if (msm_hdmi_power_on(bridge)) {
> + msm_hdmi_phy_resource_disable(phy);
> + return;
> + }
[Severity: High]
Does this new early return path cause a crash later in the modeset sequence?
If msm_hdmi_power_on() fails, we return early leaving hdmi->power_on = false.
When the DRM core later calls msm_hdmi_bridge_atomic_post_disable(), it will
execute:
msm_hdmi_set_mode(hdmi, hdmi->hpd_enabled);
msm_hdmi_phy_powerdown(phy);
Both of these functions access MMIO registers unconditionally. Since the
power domain was never brought up, could these unconditional MMIO accesses
trigger an imprecise abort?
> + hdmi->power_on = true;
> + }
> }
> - mutex_unlock(&hdmi->state_mutex);
>
> if (connector->display_info.is_hdmi)
> msm_hdmi_audio_update(hdmi);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260911-drm-msm-hdmi-fixes-before-eliza-v4-0-87bdb9f1987f@oss.qualcomm.com?part=2
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 5/7] drm/msm: Properly handle msm_ioremap() without name
2026-09-11 10:29 ` [PATCH v4 5/7] drm/msm: Properly handle msm_ioremap() without name Krzysztof Kozlowski
@ 2026-09-11 15:45 ` Konrad Dybcio
0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2026-09-11 15:45 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
Abel Vesa
On 9/11/26 12:29 PM, Krzysztof Kozlowski wrote:
> msm_ioremap() accepts being called without name of the region to map and
> in such case maps by index 0. However error paths still use the name in
> error message.
>
> Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure
2026-09-11 10:29 ` [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure Krzysztof Kozlowski
@ 2026-09-11 15:47 ` Konrad Dybcio
2026-09-11 15:47 ` Konrad Dybcio
1 sibling, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2026-09-11 15:47 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable
On 9/11/26 12:29 PM, Krzysztof Kozlowski wrote:
> If msm_hdmi_phy_resource_enable() fails, e.g. when enabling regulators,
> it should reverse the state of things already changed.
> msm_hdmi_phy_resource_enable() is used also in probe path, thus such
> failure, which could be simple deferred probe, would leave these
> resources permanently enabled for the rest of the runtime.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 15b4a4523859 ("drm/msm/hdmi: Create a separate HDMI PHY driver")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure
2026-09-11 10:29 ` [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure Krzysztof Kozlowski
2026-09-11 15:47 ` Konrad Dybcio
@ 2026-09-11 15:47 ` Konrad Dybcio
1 sibling, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2026-09-11 15:47 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable
On 9/11/26 12:29 PM, Krzysztof Kozlowski wrote:
> If msm_hdmi_phy_resource_enable() fails, e.g. when enabling regulators,
> it should reverse the state of things already changed.
> msm_hdmi_phy_resource_enable() is used also in probe path, thus such
> failure, which could be simple deferred probe, would leave these
> resources permanently enabled for the rest of the runtime.
>
> Cc: <stable@vger.kernel.org>
> Fixes: 15b4a4523859 ("drm/msm/hdmi: Create a separate HDMI PHY driver")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
[...]
> +err_clk_unprepare:
> + for (; i > 0; i--)
> + clk_disable_unprepare(phy->clks[i - 1]);
> + regulator_bulk_disable(cfg->num_regs, phy->regs);
> +
> +err_pm_put:
> + pm_runtime_put_sync(dev);
This can apparently fail too.. one more argument for PM_RUNTIME_ACQUIRE_xxx
Konrad
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable()
2026-09-11 10:29 ` [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable() Krzysztof Kozlowski
2026-09-11 10:58 ` sashiko-bot
@ 2026-09-11 15:48 ` Konrad Dybcio
1 sibling, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2026-09-11 15:48 UTC (permalink / raw)
To: Krzysztof Kozlowski, Rob Clark, Dmitry Baryshkov, Abhinav Kumar,
Jessica Zhang, Sean Paul, Marijn Suijten, David Airlie,
Simona Vetter, Archit Taneja, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, devicetree,
stable
On 9/11/26 12:29 PM, Krzysztof Kozlowski wrote:
> Properly handle power up failures during .atomic_pre_enable() by
> aborting the .atomic_pre_enable() to avoid accessing registers why
> blocks did not bring up. Otherwise this could lead to imprecise aborts
> when accessing MMIO while entire power domain is off.
>
> Cc: <stable@vger.kernel.org>
> Fixes: ba3d7bf3a7ab ("drm/msm/hdmi: Convert PHY files according to new design")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
> ---
> drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 30 +++++++++++++++++++++---------
> 1 file changed, 21 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> index 157f19bd90b4..db85400e574e 100644
> --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c
> @@ -13,14 +13,16 @@
> #include "msm_kms.h"
> #include "hdmi.h"
>
> -static void msm_hdmi_power_on(struct drm_bridge *bridge)
> +static int msm_hdmi_power_on(struct drm_bridge *bridge)
> {
> struct drm_device *dev = bridge->dev;
> struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge);
> struct hdmi *hdmi = hdmi_bridge->hdmi;
> int ret;
>
> - pm_runtime_resume_and_get(&hdmi->pdev->dev);
> + ret = pm_runtime_resume_and_get(&hdmi->pdev->dev);
> + if (ret)
> + return ret;
>
> if (hdmi->extp_clk) {
> DBG("pixclock: %lu", hdmi->pixclock);
> @@ -29,9 +31,14 @@ static void msm_hdmi_power_on(struct drm_bridge *bridge)
> DRM_DEV_ERROR(dev->dev, "failed to set extp clk rate: %d\n", ret);
^ should fail too
Konrad
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2026-09-11 15:48 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-11 10:29 [PATCH v4 0/7] drm/msm/hdmi: Fixes/Cleanups before Eliza Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 1/7] drm/msm/hdmi_phy: Cleanup after msm_hdmi_phy_resource_enable() failure Krzysztof Kozlowski
2026-09-11 15:47 ` Konrad Dybcio
2026-09-11 15:47 ` Konrad Dybcio
2026-09-11 10:29 ` [PATCH v4 2/7] drm/msm/hdmi: Handle msm_hdmi_power_on() errors during .atomic_pre_enable() Krzysztof Kozlowski
2026-09-11 10:58 ` sashiko-bot
2026-09-11 15:48 ` Konrad Dybcio
2026-09-11 10:29 ` [PATCH v4 3/7] drm/msm/hdmi_bridge: Correct poweroff/audio cleanup order in post_disable Krzysztof Kozlowski
2026-09-11 10:43 ` sashiko-bot
2026-09-11 10:29 ` [PATCH v4 4/7] drm/msm/hdmi_bridge: Drop redundant initialization in msm_hdmi_bridge_init() Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 5/7] drm/msm: Properly handle msm_ioremap() without name Krzysztof Kozlowski
2026-09-11 15:45 ` Konrad Dybcio
2026-09-11 10:29 ` [PATCH v4 6/7] drm/msm/dsi: Fix indentation of if block in dsi_mgr_bridge_mode_valid() Krzysztof Kozlowski
2026-09-11 10:29 ` [PATCH v4 7/7] dt-bindings: display/msm: hdmi: Correct name of disallowed supplies Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox