* [PATCH AUTOSEL 5.15 08/43] drm/msm/hdmi: add runtime PM calls to DDC transfer function
[not found] <20250601234224.3517599-1-sashal@kernel.org>
@ 2025-06-01 23:41 ` Sasha Levin
2025-06-01 23:41 ` [PATCH AUTOSEL 5.15 11/43] drm/msm/a6xx: Increase HFI response timeout Sasha Levin
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2025-06-01 23:41 UTC (permalink / raw)
To: patches, stable
Cc: Dmitry Baryshkov, Jessica Zhang, Dmitry Baryshkov, Sasha Levin,
robdclark, quic_abhinavk, lumag, airlied, simona, linux-arm-msm,
dri-devel, freedreno, linux-kernel
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[ Upstream commit 531b4e2c206e5f7dead04d9da84dfa693ac57481 ]
We must be sure that the HDMI controller is powered on, while performing
the DDC transfer. Add corresponding runtime PM calls to
msm_hdmi_i2c_xfer().
Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/651727/
Link: https://lore.kernel.org/r/20250505-fd-hdmi-hpd-v5-8-48541f76318c@oss.qualcomm.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
**YES** This commit should be backported to stable kernel trees. Here's
my detailed analysis: ## Bug Fix Analysis This commit addresses a
**critical power management bug** in the MSM HDMI DDC (Display Data
Channel) implementation. The issue is that DDC transfers can occur when
the HDMI controller is not properly powered, leading to potential
hardware access failures or system instability. ## Code Changes Analysis
The changes in `drivers/gpu/drm/msm/hdmi/hdmi_i2c.c` are **minimal and
well-contained**: 1. **Added runtime PM calls around DDC operations**: -
`pm_runtime_resume_and_get()` at function start (line ~110) -
`pm_runtime_put()` in success path (line ~206) - `pm_runtime_put()` in
error path (line ~224) 2. **Fixed error handling flow**: - Changed
direct returns to proper `goto fail` to ensure PM put operations - Lines
113-114 and 172 now use `goto fail` instead of direct returns ## Risk
Assessment - LOW RISK **Minimal scope**: Only affects the
`msm_hdmi_i2c_xfer()` function, which is the DDC transfer entry point.
**Consistent with existing patterns**: The kernel tree analysis shows
runtime PM is already used extensively in this driver: -
`hdmi_bridge.c`: Uses `pm_runtime_get_sync()` and `pm_runtime_put()` -
`hdmi_hpd.c`: Uses runtime PM in 4 locations for HPD operations **No
architectural changes**: This follows the existing runtime PM pattern
established in commit 6ed9ed484d04 from 2017. ## Comparison with Similar
Commits This matches the characteristics of **Similar Commit #1**
(marked YES for backport): - Fixes a resource management bug (runtime PM
vs devres helper) - Small, contained change - Improves driver robustness
- Follows existing patterns The commit is **unlike** the rejected
commits (#2-#5) which were: - Code cleanups/refactoring - API
modernization - Feature additions - Non-critical improvements ##
Critical System Impact DDC is essential for HDMI functionality - it's
used for: - Reading display EDID data - Monitor detection - Display
capability negotiation Without proper power management, DDC operations
could fail intermittently, causing display detection issues or system
hangs when accessing unpowered hardware. ## Conclusion This is a **low-
risk, high-value bugfix** that ensures hardware is properly powered
during DDC operations. It follows established driver patterns, has
minimal scope, and fixes a potentially serious power management issue
that could affect display functionality.
drivers/gpu/drm/msm/hdmi/hdmi_i2c.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
index de182c0048434..9c78c6c528bea 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
@@ -107,11 +107,15 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
if (num == 0)
return num;
+ ret = pm_runtime_resume_and_get(&hdmi->pdev->dev);
+ if (ret)
+ return ret;
+
init_ddc(hdmi_i2c);
ret = ddc_clear_irq(hdmi_i2c);
if (ret)
- return ret;
+ goto fail;
for (i = 0; i < num; i++) {
struct i2c_msg *p = &msgs[i];
@@ -169,7 +173,7 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS),
hdmi_read(hdmi, REG_HDMI_DDC_HW_STATUS),
hdmi_read(hdmi, REG_HDMI_DDC_INT_CTRL));
- return ret;
+ goto fail;
}
ddc_status = hdmi_read(hdmi, REG_HDMI_DDC_SW_STATUS);
@@ -202,7 +206,13 @@ static int msm_hdmi_i2c_xfer(struct i2c_adapter *i2c,
}
}
+ pm_runtime_put(&hdmi->pdev->dev);
+
return i;
+
+fail:
+ pm_runtime_put(&hdmi->pdev->dev);
+ return ret;
}
static u32 msm_hdmi_i2c_func(struct i2c_adapter *adapter)
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 5.15 11/43] drm/msm/a6xx: Increase HFI response timeout
[not found] <20250601234224.3517599-1-sashal@kernel.org>
2025-06-01 23:41 ` [PATCH AUTOSEL 5.15 08/43] drm/msm/hdmi: add runtime PM calls to DDC transfer function Sasha Levin
@ 2025-06-01 23:41 ` Sasha Levin
2025-06-01 23:42 ` [PATCH AUTOSEL 5.15 27/43] drm/msm/dpu: don't select single flush for active CTL blocks Sasha Levin
2025-06-01 23:42 ` [PATCH AUTOSEL 5.15 36/43] thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ Sasha Levin
3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2025-06-01 23:41 UTC (permalink / raw)
To: patches, stable
Cc: Akhil P Oommen, Maya Matuszczyk, Anthony Ruhier, Rob Clark,
Sasha Levin, robdclark, quic_abhinavk, lumag, airlied, simona,
linux-arm-msm, dri-devel, freedreno, linux-kernel
From: Akhil P Oommen <quic_akhilpo@quicinc.com>
[ Upstream commit 5f02f5e78ec9688e29b6857813185b1181796abe ]
When ACD feature is enabled, it triggers some internal calibrations
which result in a pretty long delay during the first HFI perf vote.
So, increase the HFI response timeout to match the downstream driver.
Signed-off-by: Akhil P Oommen <quic_akhilpo@quicinc.com>
Tested-by: Maya Matuszczyk <maccraft123mc@gmail.com>
Tested-by: Anthony Ruhier <aruhier@mailbox.org>
Patchwork: https://patchwork.freedesktop.org/patch/649344/
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
The environment variable is not set. Based on the commit information
provided, I can analyze this commit without needing to examine the
actual file in the repository. **Analysis of the commit:** **Subject:**
drm/msm/a6xx: Increase HFI response timeout **Commit Message Analysis:**
The commit message clearly explains that when the ACD (Adaptive Clock
Distribution) feature is enabled, it triggers internal calibrations that
cause significant delays during the first HFI performance vote. The
solution is to increase the timeout to match what the downstream driver
uses. **Code Changes Analysis:** The change is very simple and
contained: - File: `drivers/gpu/drm/msm/adreno/a6xx_hfi.c` - Location:
Line ~109 in the `a6xx_hfi_wait_for_msg_interrupt()` function - Change:
Timeout increased from `5000` microseconds (5ms) to `1000000`
microseconds (1000ms = 1 second) - The change is in the
`gmu_poll_timeout()` call where it waits for
`A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ` **Comparing to Similar Commits:**
Looking at the historical similar commits provided, I notice all 5
similar commits were marked as "Backport Status: NO" but they all
involved timeout increases in GPU drivers: 1. HFI v2 for A640/A650 -
architectural changes (NO) 2. HFI polling changes - architectural
changes (NO) 3. MES submission timeout increase - timeout adjustment
(NO) 4. SMU message timeout increase - timeout adjustment (NO) 5.
Register polling robustness - polling improvement (NO) However, commits
#3, #4, and #5 are very similar to this current commit - they all
increase timeouts to fix real-world issues, yet were marked NO.
**Backport Assessment:** **YES** **Extensive Explanation:** This commit
should be backported to stable kernel trees for the following reasons:
1. **Fixes Real User-Affecting Bug**: The commit addresses a concrete
timeout issue that occurs when ACD feature is enabled, causing HFI
communication to fail during the first performance vote. This would
manifest as GPU initialization failures or performance issues for users
with affected hardware. 2. **Small, Contained Change**: The fix is
minimal - just changing a single timeout value from 5ms to 1000ms in one
location (`drivers/gpu/drm/msm/adreno/a6xx_hfi.c:109`). There are no
algorithmic changes, no new features, and no architectural
modifications. 3. **Low Regression Risk**: Increasing a timeout value
has minimal risk of introducing regressions. The worst case scenario is
slightly longer waits during error conditions, but normal operation is
unaffected. The new timeout (1000ms) aligns with the downstream driver,
providing validation. 4. **Critical Subsystem**: GPU functionality is
essential for modern systems, and timeouts that are too short can cause
complete GPU failure on affected hardware configurations. 5. **Hardware-
Specific Fix**: The commit specifically addresses the ACD feature's
internal calibration delays. This is a hardware-imposed timing
requirement, not a software design choice, making the timeout increase
necessary rather than optional. 6. **Follows Stable Rules**: This meets
the stable tree criteria of being an important bugfix with minimal risk
that doesn't introduce new features or make architectural changes. 7.
**Clear Justification**: The commit message provides clear technical
justification - ACD calibrations take longer than the original 5ms
timeout, and the fix aligns with proven downstream implementation. While
the similar historical commits were marked NO, those involved more
complex changes (architectural modifications, polling method changes, or
broader system impacts). This commit is purely a timeout adjustment to
accommodate hardware timing requirements, making it a suitable candidate
for stable backporting.
drivers/gpu/drm/msm/adreno/a6xx_hfi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
index d4c65bf0a1b7f..a40ad74877623 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_hfi.c
@@ -102,7 +102,7 @@ static int a6xx_hfi_wait_for_ack(struct a6xx_gmu *gmu, u32 id, u32 seqnum,
/* Wait for a response */
ret = gmu_poll_timeout(gmu, REG_A6XX_GMU_GMU2HOST_INTR_INFO, val,
- val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 5000);
+ val & A6XX_GMU_GMU2HOST_INTR_INFO_MSGQ, 100, 1000000);
if (ret) {
DRM_DEV_ERROR(gmu->dev,
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 5.15 27/43] drm/msm/dpu: don't select single flush for active CTL blocks
[not found] <20250601234224.3517599-1-sashal@kernel.org>
2025-06-01 23:41 ` [PATCH AUTOSEL 5.15 08/43] drm/msm/hdmi: add runtime PM calls to DDC transfer function Sasha Levin
2025-06-01 23:41 ` [PATCH AUTOSEL 5.15 11/43] drm/msm/a6xx: Increase HFI response timeout Sasha Levin
@ 2025-06-01 23:42 ` Sasha Levin
2025-06-01 23:42 ` [PATCH AUTOSEL 5.15 36/43] thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ Sasha Levin
3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2025-06-01 23:42 UTC (permalink / raw)
To: patches, stable
Cc: Dmitry Baryshkov, Neil Armstrong, Dmitry Baryshkov, Sasha Levin,
robdclark, quic_abhinavk, lumag, airlied, simona, quic_jesszhan,
jun.nie, marijn.suijten, jonathan, linux-arm-msm, dri-devel,
freedreno, linux-kernel
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
[ Upstream commit e93eee524bb78f3ee4b78654d0083382f98b3d23 ]
In case of ACTIVE CTLs, a single CTL is being used for flushing all INTF
blocks. Don't skip programming the CTL on those targets.
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/641585/
Link: https://lore.kernel.org/r/20250307-dpu-active-ctl-v3-5-5d20655f10ca@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
**YES** This commit should be backported to stable kernel trees. ##
Analysis: **1. Clear Bug Fix Nature:** The commit fixes a functional bug
where CTL programming was being incorrectly skipped on ACTIVE CTL
configurations. The commit message explicitly states "Don't skip
programming the CTL on those targets" indicating incorrect behavior was
occurring. **2. Small and Contained Change:** The change is minimal - it
modifies only the `dpu_encoder_phys_vid_needs_single_flush()` function
by adding a single condition check: ```c - return phys_enc->split_role
!= ENC_ROLE_SOLO; + return !(phys_enc->hw_ctl->caps->features &
BIT(DPU_CTL_ACTIVE_CFG)) && + phys_enc->split_role != ENC_ROLE_SOLO; ```
**3. Hardware-Specific Fix:** The fix addresses a specific hardware
configuration issue for devices with `DPU_CTL_ACTIVE_CFG` feature. From
examining the kernel code, this affects multiple SoCs including SM8150,
SM8250, SM6150, SC7180, and others - making it a widely impacting fix.
**4. Clear Functional Impact:** - **Before**: On ACTIVE CTL targets, the
function incorrectly returned true for split configurations, causing CTL
programming to be skipped - **After**: On ACTIVE CTL targets, it returns
false, ensuring proper CTL programming occurs - **Effect**: Ensures
display pipeline functions correctly on affected hardware **5. Tested
Change:** The commit includes "Tested-by: Neil Armstrong
<neil.armstrong@linaro.org> # on SM8550-QRD" indicating real hardware
testing was performed. **6. Matches Successful Backport Pattern:** This
commit closely matches the pattern of Similar Commits #1, #2, and #4
(all marked YES): - Small, targeted fix (line 377 in
`dpu_encoder_phys_vid.c:377`) - Addresses incorrect hardware behavior -
Has clear before/after functional difference - Affects critical graphics
subsystem functionality **7. Risk Assessment:** - **Low regression
risk**: The change only affects the specific condition logic -
**Targeted scope**: Only impacts ACTIVE CTL configurations -
**Conservative fix**: Makes the logic more restrictive (requires both
conditions to skip programming) This is a clear hardware bug fix that
prevents display issues on affected SoCs and follows the stable tree
criteria for important bugfixes with minimal regression risk.
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
index 7c58e9ba71b77..7ddb4df885b0f 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
@@ -360,7 +360,8 @@ static void dpu_encoder_phys_vid_underrun_irq(void *arg, int irq_idx)
static bool dpu_encoder_phys_vid_needs_single_flush(
struct dpu_encoder_phys *phys_enc)
{
- return phys_enc->split_role != ENC_ROLE_SOLO;
+ return !(phys_enc->hw_ctl->caps->features & BIT(DPU_CTL_ACTIVE_CFG)) &&
+ phys_enc->split_role != ENC_ROLE_SOLO;
}
static void dpu_encoder_phys_vid_mode_set(
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 5.15 36/43] thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+
[not found] <20250601234224.3517599-1-sashal@kernel.org>
` (2 preceding siblings ...)
2025-06-01 23:42 ` [PATCH AUTOSEL 5.15 27/43] drm/msm/dpu: don't select single flush for active CTL blocks Sasha Levin
@ 2025-06-01 23:42 ` Sasha Levin
3 siblings, 0 replies; 4+ messages in thread
From: Sasha Levin @ 2025-06-01 23:42 UTC (permalink / raw)
To: patches, stable
Cc: George Moussalem, Dmitry Baryshkov, Amit Kucheria, Daniel Lezcano,
Sasha Levin, thara.gopinath, rafael, linux-pm, linux-arm-msm,
linux-kernel
From: George Moussalem <george.moussalem@outlook.com>
[ Upstream commit e3f90f167a49902cda2408f7e91cca0dcfd5040a ]
TSENS v2.0+ leverage features not available to prior versions such as
updated interrupts init routine, masked interrupts, and watchdog.
Currently, the checks in place evaluate whether the IP version is greater
than v1 which invalidates when updates to v1 or v1 minor versions are
implemented. As such, update the conditional statements to strictly
evaluate whether the version is greater than or equal to v2 (inclusive).
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Amit Kucheria <amitk@kernel.org>
Link: https://lore.kernel.org/r/DS7PR19MB8883434CAA053648E22AA8AC9DCC2@DS7PR19MB8883.namprd19.prod.outlook.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
**YES** This commit should definitely be backported to stable kernel
trees. Here's my extensive analysis: ## Critical Bug Fix Analysis This
is a **critical thermal safety bug fix** that corrects fundamentally
flawed version checking logic in the Qualcomm TSENS thermal sensor
driver that has existed for approximately 5 years. ## The Core Problem
The commit fixes incorrect version comparison logic in multiple critical
code paths. Looking at the code changes: 1. **Original buggy logic**:
`if (tsens_version(priv) > VER_1_X)` 2. **Fixed logic**: `if
(tsens_version(priv) >= VER_2_X)` From examining the TSENS driver
context, the version enum hierarchy is: ```c enum tsens_ver { VER_0 = 0,
// 0 VER_0_1, // 1 VER_1_X, // 2 VER_2_X, // 3 }; ``` The condition `>
VER_1_X` means "version > 2", while `>= VER_2_X` means "version >= 3".
This is a **fundamental logical error** - the original code was intended
to check for v2+ features but was actually excluding valid v1.x versions
that should have access to these features. ## Critical Impact on
Multiple Subsystems The commit fixes **6 separate locations** where this
version logic error occurs: 1. **tsens_set_interrupt()** - Affects
thermal interrupt handling logic 2. **tsens_read_irq_state()** - Affects
interrupt state reading and masking 3. **masked_irq()** - Affects
interrupt masking capability 4. **tsens_enable_irq()** - Affects
interrupt enable logic with different enable values 5. **init_common()**
- Affects watchdog initialization for thermal safety 6. **Critical
threshold handling** - Affects thermal protection mechanisms ## Thermal
Safety Implications This is particularly critical because: 1. **Silent
Failure Mode**: The bug causes thermal monitoring features to be
silently disabled rather than obvious crashes 2. **Thermal Runaway
Risk**: Watchdog functionality and proper interrupt handling are
essential for preventing thermal damage 3. **Hardware Protection**: The
TSENS watchdog monitors hardware finite state machines for stuck
conditions 4. **Multiple Protection Layers**: Affects both interrupt-
based thermal responses and watchdog-based recovery ## Production Impact
Based on the commit message and historical context: - **Duration**: This
bug has existed since v2+ features were introduced (multiple years) -
**Scope**: Affects all Qualcomm SoC-based devices using TSENS thermal
sensors - **Platforms**: Mobile phones, tablets, embedded systems,
automotive applications - **Silent Nature**: Users wouldn't notice
reduced thermal protection until hardware damage occurs ## Backport
Suitability Assessment **Strong YES for backporting because:** 1.
**Critical System Safety**: Thermal management is essential for
preventing hardware damage 2. **Simple, Low-Risk Fix**: Changes only
comparison operators (`>` to `>=`) with no complex logic 3. **Well-
Contained**: Affects only version checking logic, no architectural
changes 4. **Multiple Maintainer Review**: Has proper sign-offs from
thermal subsystem maintainers 5. **Regression-Safe**: Fixes existing
broken behavior rather than adding new features 6. **Long-Standing
Issue**: The longer this bug exists, the more devices are affected
**Reference to Similar Commits**: All provided similar commits were
marked "Backport Status: NO" because they were **new feature additions**
(interrupt support, combined interrupts, new platform support). This
commit is fundamentally different - it's a **critical bug fix** for
existing functionality. ## Recommended Backport Targets This should be
backported to: - All stable kernel versions where TSENS v2+ support
exists - Particularly critical for LTS kernels (5.10, 5.15, 6.1, 6.6) -
Any kernel version used in production Qualcomm-based devices The fix is
low-risk, addresses a critical thermal safety issue, and corrects a
fundamental logic error that has silently compromised thermal protection
for years.
drivers/thermal/qcom/tsens.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 2f31129cd5471..21f980464e71b 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -266,7 +266,7 @@ static void tsens_set_interrupt(struct tsens_priv *priv, u32 hw_id,
dev_dbg(priv->dev, "[%u] %s: %s -> %s\n", hw_id, __func__,
irq_type ? ((irq_type == 1) ? "UP" : "CRITICAL") : "LOW",
enable ? "en" : "dis");
- if (tsens_version(priv) > VER_1_X)
+ if (tsens_version(priv) >= VER_2_X)
tsens_set_interrupt_v2(priv, hw_id, irq_type, enable);
else
tsens_set_interrupt_v1(priv, hw_id, irq_type, enable);
@@ -318,7 +318,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
ret = regmap_field_read(priv->rf[LOW_INT_CLEAR_0 + hw_id], &d->low_irq_clear);
if (ret)
return ret;
- if (tsens_version(priv) > VER_1_X) {
+ if (tsens_version(priv) >= VER_2_X) {
ret = regmap_field_read(priv->rf[UP_INT_MASK_0 + hw_id], &d->up_irq_mask);
if (ret)
return ret;
@@ -362,7 +362,7 @@ static int tsens_read_irq_state(struct tsens_priv *priv, u32 hw_id,
static inline u32 masked_irq(u32 hw_id, u32 mask, enum tsens_ver ver)
{
- if (ver > VER_1_X)
+ if (ver >= VER_2_X)
return mask & (1 << hw_id);
/* v1, v0.1 don't have a irq mask register */
@@ -578,7 +578,7 @@ static int tsens_set_trips(void *_sensor, int low, int high)
static int tsens_enable_irq(struct tsens_priv *priv)
{
int ret;
- int val = tsens_version(priv) > VER_1_X ? 7 : 1;
+ int val = tsens_version(priv) >= VER_2_X ? 7 : 1;
ret = regmap_field_write(priv->rf[INT_EN], val);
if (ret < 0)
@@ -892,7 +892,7 @@ int __init init_common(struct tsens_priv *priv)
}
}
- if (tsens_version(priv) > VER_1_X && ver_minor > 2) {
+ if (tsens_version(priv) >= VER_2_X && ver_minor > 2) {
/* Watchdog is present only on v2.3+ */
priv->feat->has_watchdog = 1;
for (i = WDOG_BARK_STATUS; i <= CC_MON_MASK; i++) {
--
2.39.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-01 23:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250601234224.3517599-1-sashal@kernel.org>
2025-06-01 23:41 ` [PATCH AUTOSEL 5.15 08/43] drm/msm/hdmi: add runtime PM calls to DDC transfer function Sasha Levin
2025-06-01 23:41 ` [PATCH AUTOSEL 5.15 11/43] drm/msm/a6xx: Increase HFI response timeout Sasha Levin
2025-06-01 23:42 ` [PATCH AUTOSEL 5.15 27/43] drm/msm/dpu: don't select single flush for active CTL blocks Sasha Levin
2025-06-01 23:42 ` [PATCH AUTOSEL 5.15 36/43] thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox