From: Jani Nikula <jani.nikula@intel.com>
To: Dibin Moolakadan Subrahmanian
<dibin.moolakadan.subrahmanian@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, uma.shankar@intel.com,
arun.r.murthy@intel.com
Subject: Re: [PATCH v5] drm/i915/display: Optimize panel power-on wait time
Date: Wed, 06 Aug 2025 16:11:44 +0300 [thread overview]
Message-ID: <9001e3e398f04c5918fcbb382f1661d01c07cf50@intel.com> (raw)
In-Reply-To: <20250804053120.3794531-1-dibin.moolakadan.subrahmanian@intel.com>
On Mon, 04 Aug 2025, Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com> wrote:
> The current wait_panel_status() uses intel_de_wait(),
> which internally on Xe platforms calls xe_mmio_wait32().
> xe_mmio_wait32() increases poll interval exponentially.
>
> This exponential poll interval increase causes unnessory delays
> during resume or power-on when the panel becomes ready earlier,
> but polling is delayed due to backoff.
>
> Replace intel_de_wait() with read_poll_timeout() +
> intel_de_read() to actively poll the register at a fixed 10ms interval
> up to a 5 second timeout. This allows poll to exit
> early when panel is ready.
>
> Changes in v2:
> Replaced two-phase intel_de_wait() with read_poll_timeout()
> + intel_de_read()
> Changes in v3:
> - Add poll_interval_ms argument 'wait_panel_status' function.
> - Modify 'wait_panel_status' callers with proper poll interval
> Changes in v4:
> - Change 'wait_panel_off' poll interval to 10ms
> Changes in v5:
> - Dropped poll_interval_ms parameter,use fixed polling
> interval of 10ms (Jani Nikula)
>
> Signed-off-by: Dibin Moolakadan Subrahmanian <dibin.moolakadan.subrahmanian@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_pps.c | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_pps.c b/drivers/gpu/drm/i915/display/intel_pps.c
> index b64d0b30f5b1..47e274a6fd72 100644
> --- a/drivers/gpu/drm/i915/display/intel_pps.c
> +++ b/drivers/gpu/drm/i915/display/intel_pps.c
> @@ -4,6 +4,7 @@
> */
>
> #include <linux/debugfs.h>
> +#include <linux/iopoll.h>
>
> #include <drm/drm_print.h>
>
> @@ -608,6 +609,8 @@ static void wait_panel_status(struct intel_dp *intel_dp,
> struct intel_display *display = to_intel_display(intel_dp);
> struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
> i915_reg_t pp_stat_reg, pp_ctrl_reg;
> + int ret;
> + u32 val;
>
> lockdep_assert_held(&display->pps.mutex);
>
> @@ -624,7 +627,18 @@ static void wait_panel_status(struct intel_dp *intel_dp,
> intel_de_read(display, pp_stat_reg),
> intel_de_read(display, pp_ctrl_reg));
>
> - if (intel_de_wait(display, pp_stat_reg, mask, value, 5000))
> + ret = read_poll_timeout(intel_de_read, val,
> + (val & mask) == value,
> + 10 * 1000, 5000 * 1000, true,
> + display, pp_stat_reg);
> +
> + if (ret)
> + goto panel_wait_err;
> +
> + drm_dbg_kms(display->drm, "Wait complete\n");
> + return;
> +
> +panel_wait_err:
What I meant was, you'd have
if (ret)
> drm_err(display->drm,
> "[ENCODER:%d:%s] %s panel status timeout: PP_STATUS: 0x%08x PP_CONTROL: 0x%08x\n",
> dig_port->base.base.base.id, dig_port->base.base.name,
> @@ -632,7 +646,6 @@ static void wait_panel_status(struct intel_dp *intel_dp,
> intel_de_read(display, pp_stat_reg),
> intel_de_read(display, pp_ctrl_reg));
But with the goto, the drm_err() is now incorrectly indented.
BR,
Jani.
>
> - drm_dbg_kms(display->drm, "Wait complete\n");
> }
>
> static void wait_panel_on(struct intel_dp *intel_dp)
--
Jani Nikula, Intel
prev parent reply other threads:[~2025-08-06 13:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 5:31 [PATCH v5] drm/i915/display: Optimize panel power-on wait time Dibin Moolakadan Subrahmanian
2025-08-04 6:13 ` ✓ i915.CI.BAT: success for drm/i915/display: Optimize panel power-on wait time (rev6) Patchwork
2025-08-04 8:06 ` ✗ i915.CI.Full: failure " Patchwork
2025-08-06 13:11 ` Jani Nikula [this message]
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=9001e3e398f04c5918fcbb382f1661d01c07cf50@intel.com \
--to=jani.nikula@intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=arun.r.murthy@intel.com \
--cc=dibin.moolakadan.subrahmanian@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=uma.shankar@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).