From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: [PATCH 10/16] drm/i915/de: Use intel_de_wait_for_{set,clear}_ms()
Date: Mon, 10 Nov 2025 19:27:49 +0200 [thread overview]
Message-ID: <20251110172756.2132-11-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20251110172756.2132-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Use intel_de_wait_for_{set,clear}_ms() instead of
intel_de_wait_ms() where appropriate.
Done with cocci (with manual formatting fixes):
@@
identifier func !~ "intel_de_wait_for";
expression display, reg, mask, timeout_ms;
@@
func(...)
{
<...
(
- intel_de_wait_ms(display, reg, mask, mask, timeout_ms, NULL)
+ intel_de_wait_for_set_ms(display, reg, mask, timeout_ms)
|
- intel_de_wait_ms(display, reg, mask, 0, timeout_ms, NULL)
+ intel_de_wait_for_clear_ms(display, reg, mask, timeout_ms)
)
...>
}
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_cx0_phy.c | 6 ++--
drivers/gpu/drm/i915/display/intel_lt_phy.c | 30 ++++++++++----------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
index 68e9009d2556..d98b4cf6b60e 100644
--- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
@@ -2826,9 +2826,9 @@ void intel_cx0_powerdown_change_sequence(struct intel_encoder *encoder,
intel_cx0_get_powerdown_update(lane_mask));
/* Update Timeout Value */
- if (intel_de_wait_ms(display, buf_ctl2_reg,
- intel_cx0_get_powerdown_update(lane_mask), 0,
- XELPDP_PORT_POWERDOWN_UPDATE_TIMEOUT_MS, NULL))
+ if (intel_de_wait_for_clear_ms(display, buf_ctl2_reg,
+ intel_cx0_get_powerdown_update(lane_mask),
+ XELPDP_PORT_POWERDOWN_UPDATE_TIMEOUT_MS))
drm_warn(display->drm,
"PHY %c failed to bring out of lane reset\n",
phy_name(phy));
diff --git a/drivers/gpu/drm/i915/display/intel_lt_phy.c b/drivers/gpu/drm/i915/display/intel_lt_phy.c
index ac6ff183bc97..bebd7488aab9 100644
--- a/drivers/gpu/drm/i915/display/intel_lt_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_lt_phy.c
@@ -1201,9 +1201,9 @@ intel_lt_phy_lane_reset(struct intel_encoder *encoder,
XELPDP_LANE_PCLK_PLL_REQUEST(0),
XELPDP_LANE_PCLK_PLL_REQUEST(0));
- if (intel_de_wait_ms(display, XELPDP_PORT_CLOCK_CTL(display, port),
- XELPDP_LANE_PCLK_PLL_ACK(0), XELPDP_LANE_PCLK_PLL_ACK(0),
- XE3PLPD_MACCLK_TURNON_LATENCY_MS, NULL))
+ if (intel_de_wait_for_set_ms(display, XELPDP_PORT_CLOCK_CTL(display, port),
+ XELPDP_LANE_PCLK_PLL_ACK(0),
+ XE3PLPD_MACCLK_TURNON_LATENCY_MS))
drm_warn(display->drm, "PHY %c PLL MacCLK assertion ack not done\n",
phy_name(phy));
@@ -1214,15 +1214,15 @@ intel_lt_phy_lane_reset(struct intel_encoder *encoder,
intel_de_rmw(display, XELPDP_PORT_BUF_CTL2(display, port),
lane_pipe_reset | lane_phy_pulse_status, 0);
- if (intel_de_wait_ms(display, XELPDP_PORT_BUF_CTL2(display, port),
- lane_phy_current_status, 0,
- XE3PLPD_RESET_END_LATENCY_MS, NULL))
+ if (intel_de_wait_for_clear_ms(display, XELPDP_PORT_BUF_CTL2(display, port),
+ lane_phy_current_status,
+ XE3PLPD_RESET_END_LATENCY_MS))
drm_warn(display->drm, "PHY %c failed to bring out of lane reset\n",
phy_name(phy));
- if (intel_de_wait_ms(display, XELPDP_PORT_BUF_CTL2(display, port),
- lane_phy_pulse_status, lane_phy_pulse_status,
- XE3PLPD_RATE_CALIB_DONE_LATENCY_MS, NULL))
+ if (intel_de_wait_for_set_ms(display, XELPDP_PORT_BUF_CTL2(display, port),
+ lane_phy_pulse_status,
+ XE3PLPD_RATE_CALIB_DONE_LATENCY_MS))
drm_warn(display->drm, "PHY %c PLL rate not changed\n",
phy_name(phy));
@@ -2001,9 +2001,9 @@ void intel_lt_phy_pll_enable(struct intel_encoder *encoder,
XELPDP_LANE_PCLK_PLL_REQUEST(0));
/* 12. Poll for PORT_CLOCK_CTL[PCLK PLL Ack LN0]= 1. */
- if (intel_de_wait_ms(display, XELPDP_PORT_CLOCK_CTL(display, port),
- XELPDP_LANE_PCLK_PLL_ACK(0), XELPDP_LANE_PCLK_PLL_ACK(0),
- XE3PLPD_MACCLK_TURNON_LATENCY_MS, NULL))
+ if (intel_de_wait_for_set_ms(display, XELPDP_PORT_CLOCK_CTL(display, port),
+ XELPDP_LANE_PCLK_PLL_ACK(0),
+ XE3PLPD_MACCLK_TURNON_LATENCY_MS))
drm_warn(display->drm, "PHY %c PLL MacCLK ack assertion timeout\n",
phy_name(phy));
@@ -2029,9 +2029,9 @@ void intel_lt_phy_pll_enable(struct intel_encoder *encoder,
rate_update, MB_WRITE_COMMITTED);
/* 16. Poll for PORT_BUF_CTL2 register PHY Pulse Status = 1 for Owned PHY Lanes. */
- if (intel_de_wait_ms(display, XELPDP_PORT_BUF_CTL2(display, port),
- lane_phy_pulse_status, lane_phy_pulse_status,
- XE3PLPD_RATE_CALIB_DONE_LATENCY_MS, NULL))
+ if (intel_de_wait_for_set_ms(display, XELPDP_PORT_BUF_CTL2(display, port),
+ lane_phy_pulse_status,
+ XE3PLPD_RATE_CALIB_DONE_LATENCY_MS))
drm_warn(display->drm, "PHY %c PLL rate not changed\n",
phy_name(phy));
--
2.49.1
next prev parent reply other threads:[~2025-11-10 17:28 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 17:27 [PATCH 00/16] drm/i915/de: Register polling cleanup Ville Syrjala
2025-11-10 17:27 ` [PATCH 01/16] drm/i915/de: Implement register waits one way Ville Syrjala
2025-11-11 4:52 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 02/16] drm/i915/de: Have intel_de_wait() hand out the final register value Ville Syrjala
2025-11-11 4:14 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 03/16] drm/i915/de: Include units in intel_de_wait*() function names Ville Syrjala
2025-11-11 4:21 ` Kandpal, Suraj
2025-11-11 17:45 ` Ville Syrjälä
2025-11-10 17:27 ` [PATCH 04/16] drm/i915/de: Introduce intel_de_wait_us() Ville Syrjala
2025-11-11 4:24 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 05/16] drm/i915/de: Use intel_de_wait_us() Ville Syrjala
2025-11-11 4:28 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 06/16] drm/i915/de: Use intel_de_wait_ms() for the obvious cases Ville Syrjala
2025-11-11 4:32 ` Kandpal, Suraj
2025-11-11 17:41 ` Ville Syrjälä
2025-11-10 17:27 ` [PATCH 07/16] drm/i915/de: Nuke intel_de_wait_custom() Ville Syrjala
2025-11-11 4:33 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 08/16] drm/i915/de: Introduce intel_de_wait_for_{set, clear}_us() Ville Syrjala
2025-11-11 4:35 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 09/16] drm/i915/de: Use intel_de_wait_for_{set,clear}_us() Ville Syrjala
2025-11-11 4:38 ` [PATCH 09/16] drm/i915/de: Use intel_de_wait_for_{set, clear}_us() Kandpal, Suraj
2025-11-10 17:27 ` Ville Syrjala [this message]
2025-11-11 4:39 ` [PATCH 10/16] drm/i915/de: Use intel_de_wait_for_{set, clear}_ms() Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 11/16] drm/1915/dpio: Stop using intel_de_wait_fw_ms() Ville Syrjala
2025-11-11 4:41 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 12/16] drm/u195/de: Replace __intel_de_rmw_nowl() with intel_de_rmw_fw() Ville Syrjala
2025-11-11 4:44 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 13/16] drm/i915/de: Nuke wakelocks from intel_de_wait_fw_ms() Ville Syrjala
2025-11-11 4:45 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 14/16] drm/i915/de: Replace __intel_de_wait_for_register_nowl() with intel_de_wait_fw_us_atomic() Ville Syrjala
2025-11-11 4:46 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 15/16] drm/i915/power: Use the intel_de_wait_ms() out value Ville Syrjala
2025-11-11 4:48 ` Kandpal, Suraj
2025-11-10 17:27 ` [PATCH 16/16] drm/i915/dpio: " Ville Syrjala
2025-11-11 4:50 ` Kandpal, Suraj
2025-11-10 21:24 ` ✓ i915.CI.BAT: success for drm/i915/de: Register polling cleanup Patchwork
2025-11-11 3:41 ` ✗ i915.CI.Full: failure " Patchwork
2025-11-11 8:01 ` [PATCH 00/16] " Jani Nikula
2025-11-11 16:11 ` Ville Syrjälä
2025-11-11 19:09 ` Ville Syrjälä
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=20251110172756.2132-11-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
/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