Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Imre Deak <imre.deak@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Tejun Heo <tj@kernel.org>, Heiner Kallweit <hkallweit1@gmail.com>,
	 stable@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm: Schedule the HPD poll work on the system unbound workqueue
Date: Mon, 07 Apr 2025 13:44:30 +0200	[thread overview]
Message-ID: <1ba35cb3e9dff4065f4df397e8a775a97b83302b.camel@redhat.com> (raw)
In-Reply-To: <20230901140403.2821777-2-imre.deak@intel.com>

On Fri, 2023-09-01 at 17:04 +0300, Imre Deak wrote:
> On some i915 platforms at least the HPD poll work involves I2C
> bit-banging using udelay()s to probe for monitor EDIDs. This in turn
> may trigger the
> 
>  workqueue: output_poll_execute [drm_kms_helper] hogged CPU for
> >10000us 4 times, consider switching to WQ_UNBOUND
> 
> warning. Fix this by scheduling drm_mode_config::output_poll_work on
> a
> WQ_UNBOUND workqueue.
> 
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Heiner Kallweit <hkallweit1@gmail.com>
> CC: stable@vger.kernel.org # 6.5
> Cc: dri-devel@lists.freedesktop.org
> Suggested-by: Tejun Heo <tj@kernel.org>
> Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
> Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9245
> Link:
> https://lore.kernel.org/all/f7e21caa-e98d-e5b5-932a-fe12d27fde9b@gmail.com
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/drm_probe_helper.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_probe_helper.c
> b/drivers/gpu/drm/drm_probe_helper.c
> index 3f479483d7d80..72eac0cd25e74 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -279,7 +279,8 @@ static void reschedule_output_poll_work(struct
> drm_device *dev)
>  		 */
>  		delay = HZ;
>  
> -	schedule_delayed_work(&dev->mode_config.output_poll_work,
> delay);
> +	queue_delayed_work(system_unbound_wq,
> +			   &dev->mode_config.output_poll_work,
> delay);
>  }
>  
>  /**
> @@ -614,7 +615,7 @@ int
> drm_helper_probe_single_connector_modes(struct drm_connector
> *connector,
>  		 */
>  		dev->mode_config.delayed_event = true;
>  		if (dev->mode_config.poll_enabled)
> -			mod_delayed_work(system_wq,
> +			mod_delayed_work(system_unbound_wq,
>  					 &dev-
> >mode_config.output_poll_work,
>  					 0);
>  	}
> @@ -838,7 +839,8 @@ static void output_poll_execute(struct
> work_struct *work)
>  		drm_kms_helper_hotplug_event(dev);
>  
>  	if (repoll)
> -		schedule_delayed_work(delayed_work,
> DRM_OUTPUT_POLL_PERIOD);
> +		queue_delayed_work(system_unbound_wq,
> +				   delayed_work,
> DRM_OUTPUT_POLL_PERIOD);
>  }
>  
>  /**

Hello all,

why was this patch never included?
Especially this 2/2 seems to solve a latency issue we are observing:
the work can last milliseconds and run on isolated cores, affecting
latency requirements in some real time scenarios (e.g. oslat).

Thanks,
Gabriele


  reply	other threads:[~2025-04-07 11:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01 14:04 [Intel-gfx] [PATCH 1/2] drm/i915: Schedule the HPD poll init work on an unbound workqueue Imre Deak
2023-09-01 14:04 ` [Intel-gfx] [PATCH 2/2] drm: Schedule the HPD poll work on the system " Imre Deak
2025-04-07 11:44   ` Gabriele Monaco [this message]
2023-09-01 16:31 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Schedule the HPD poll init work on an " Patchwork
2023-09-01 16:31 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-01 16:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-02  2:03 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2024-10-28 14:31 ` [Intel-gfx] [PATCH 1/2] " Lucas De Marchi
2024-10-28 14:49   ` Jani Nikula
2024-10-28 14:59     ` Imre Deak

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=1ba35cb3e9dff4065f4df397e8a775a97b83302b.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hkallweit1@gmail.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=tj@kernel.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