From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Deak, Imre" <imre.deak@intel.com>
Subject: Re: [PATCH 04/12] drm/i915: Disable intel HPD poll after DRM poll init/enable
Date: Mon, 8 Jan 2024 06:23:21 +0000 [thread overview]
Message-ID: <5ef345cfe519ac276146d6fc723a92f70f306997.camel@intel.com> (raw)
In-Reply-To: <20240104083008.2715733-5-imre.deak@intel.com>
On Thu, 2024-01-04 at 10:30 +0200, Imre Deak wrote:
> The only purpose of intel_hpd_poll_disable() during driver loading
> and
> system resume - at which point polling should be disabled anyway,
> except
> for connectors in an IRQ storm, for which the polling will stay
> enabled -
> is to force-detect all the connectors. However this detection in
> i915_hpd_poll_init_work() depends on drm.mode_config.poll_enabled,
> which
> will get set in drm_kms_helper_poll_init(), possibly after
> i915_hpd_poll_init_work() is scheduled. Hence the initial detection
> of
> connectors during driver loading may not happen.
>
> Fix the above by moving intel_hpd_poll_disable() after
> i915_hpd_poll_init_work(), the proper place anyway for doing the
> above
> detection after all the HW initialization steps are complete. Change
> the
> order the same way during system resume as well. The above race
> condition shouldn't matter here - as drm.mode_config.poll_enabled
> will
> be set - but the detection should happen here as well after the HW
> init
> steps are done.
>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_driver.c | 2 +-
> drivers/gpu/drm/i915/i915_driver.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c
> b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index da549962feccd..1974f2394a518 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -374,7 +374,6 @@ int intel_display_driver_probe(struct
> drm_i915_private *i915)
>
> /* Only enable hotplug handling once the fbdev is fully set
> up. */
> intel_hpd_init(i915);
> - intel_hpd_poll_disable(i915);
>
> skl_watermark_ipc_init(i915);
>
> @@ -412,6 +411,7 @@ void intel_display_driver_register(struct
> drm_i915_private *i915)
> * fbdev->async_cookie.
> */
> drm_kms_helper_poll_init(&i915->drm);
> + intel_hpd_poll_disable(i915);
>
> intel_display_device_info_print(DISPLAY_INFO(i915),
> DISPLAY_RUNTIME_INFO(i915),
> &p);
> diff --git a/drivers/gpu/drm/i915/i915_driver.c
> b/drivers/gpu/drm/i915/i915_driver.c
> index c7d7c3b7ecc63..be86596a8904d 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1249,9 +1249,9 @@ static int i915_drm_resume(struct drm_device
> *dev)
> intel_dp_mst_resume(dev_priv);
> intel_display_driver_resume(dev_priv);
>
> - intel_hpd_poll_disable(dev_priv);
> if (HAS_DISPLAY(dev_priv))
> drm_kms_helper_poll_enable(dev);
> + intel_hpd_poll_disable(dev_priv);
>
> intel_opregion_resume(dev_priv);
>
next prev parent reply other threads:[~2024-01-08 6:23 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 8:29 [PATCH 00/12] drm/i915: Fix HPD handling during driver init/shutdown Imre Deak
2024-01-04 8:29 ` [PATCH 01/12] drm/i915: Init DRM connector polled field early Imre Deak
2024-01-05 12:54 ` Hogander, Jouni
2024-01-05 13:12 ` Imre Deak
2024-01-04 8:29 ` [PATCH 02/12] drm/i915: Keep the connector polled state disabled after storm Imre Deak
2024-01-05 13:23 ` Hogander, Jouni
2024-01-05 13:38 ` Imre Deak
2024-01-05 14:08 ` Hogander, Jouni
2024-01-05 14:22 ` Imre Deak
2024-01-04 8:29 ` [PATCH 03/12] drm/i915: Move audio deinit after disabling polling Imre Deak
2024-01-05 13:42 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 04/12] drm/i915: Disable intel HPD poll after DRM poll init/enable Imre Deak
2024-01-08 6:23 ` Hogander, Jouni [this message]
2024-01-04 8:30 ` [PATCH 05/12] drm/i915: Suspend the framebuffer console during driver shutdown Imre Deak
2024-01-08 7:51 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 06/12] drm/i915: Suspend the framebuffer console earlier during system suspend Imre Deak
2024-01-08 7:51 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 07/12] drm/i915: Prevent modesets during driver init/shutdown Imre Deak
2024-01-04 13:23 ` [PATCH v2 " Imre Deak
2024-01-08 8:31 ` [PATCH " Hogander, Jouni
2024-01-08 9:20 ` Imre Deak
2024-01-08 9:44 ` Hogander, Jouni
2024-01-08 12:34 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 08/12] drm/i915: Disable hotplug detection works " Imre Deak
2024-01-08 9:40 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 09/12] drm/i915: Disable hotplug detection handlers " Imre Deak
2024-01-08 9:59 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 10/12] drm/i915: Add intel_digital_port lock/unlock hooks Imre Deak
2024-01-08 10:08 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 11/12] drm/i915: Filter out glitches on HPD lines during hotplug detection Imre Deak
2024-01-08 10:25 ` Hogander, Jouni
2024-01-04 8:30 ` [PATCH 12/12] drm/i915/dp: Abort AUX on disconnected native DP ports Imre Deak
2024-01-08 10:33 ` Hogander, Jouni
2024-01-04 12:39 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix HPD handling during driver init/shutdown Patchwork
2024-01-04 12:39 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-01-04 12:57 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-01-04 13:50 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Fix HPD handling during driver init/shutdown (rev2) Patchwork
2024-01-04 13:50 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-01-04 14:08 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-01-04 16:00 ` Imre Deak
2024-01-05 7:12 ` Illipilli, TejasreeX
2024-01-05 7:11 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-05 8:38 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-01-08 18:19 ` Imre Deak
2024-01-10 11:40 ` Illipilli, TejasreeX
2024-01-10 9:45 ` Patchwork
2024-01-10 10:03 ` Patchwork
2024-01-10 11:11 ` ✓ Fi.CI.IGT: success " Patchwork
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=5ef345cfe519ac276146d6fc723a92f70f306997.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=imre.deak@intel.com \
--cc=intel-gfx@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