intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH] drm/i915/display: Stop touching vga on post enable
Date: Wed, 19 Nov 2025 12:04:38 -0800	[thread overview]
Message-ID: <20251119-ioport-v1-1-ec43f1e12c49@intel.com> (raw)

Touching VGA_MIS_W goes back to commit f9dcb0dfee98 ("drm/i915: touch
VGA MSR after we enable the power well"). That case doesn't seem to be
reproduced anymore, even considering that the unclaimed accesses are now
printed with debug log level. Also note that the original issue was
reproduced with vgacon, but that is not used anymore on x86 when booted
with EFI.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
WIP to drop the VGA accesses and allow xe driver to be used with
non-x86 platforms. There are multiple patches floating around, some
disabling code for non-x86, some disabling for !CONFIG_VGA_CONSOLE.

For this v1, I think the entire workaround can be removed. Sending it
for CI while I look into the other cases.

Get some initial tests running to see if it breaks the world before
ICL, particularly before gen7 where unclaimed accesses for non-display-engine
registers worked, systems booted without EFI, etc. If this is not an
issue anymore, a patch completely dropping the has_vga could follow
since this is the only user.
---
 .../gpu/drm/i915/display/intel_display_power_well.c   |  3 ---
 drivers/gpu/drm/i915/display/intel_vga.c              | 19 -------------------
 2 files changed, 22 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power_well.c b/drivers/gpu/drm/i915/display/intel_display_power_well.c
index f4f7e73acc874..01213f7d1c9ef 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power_well.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power_well.c
@@ -205,9 +205,6 @@ int intel_power_well_refcount(struct i915_power_well *power_well)
 static void hsw_power_well_post_enable(struct intel_display *display,
 				       u8 irq_pipe_mask, bool has_vga)
 {
-	if (has_vga)
-		intel_vga_reset_io_mem(display);
-
 	if (irq_pipe_mask)
 		gen8_irq_power_well_post_enable(display, irq_pipe_mask);
 }
diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
index 6e125564db34c..97d4c06c2e2fd 100644
--- a/drivers/gpu/drm/i915/display/intel_vga.c
+++ b/drivers/gpu/drm/i915/display/intel_vga.c
@@ -76,25 +76,6 @@ void intel_vga_disable(struct intel_display *display)
 	intel_de_posting_read(display, vga_reg);
 }
 
-void intel_vga_reset_io_mem(struct intel_display *display)
-{
-	struct pci_dev *pdev = to_pci_dev(display->drm->dev);
-
-	/*
-	 * After we re-enable the power well, if we touch VGA register 0x3d5
-	 * we'll get unclaimed register interrupts. This stops after we write
-	 * anything to the VGA MSR register. The vgacon module uses this
-	 * register all the time, so if we unbind our driver and, as a
-	 * consequence, bind vgacon, we'll get stuck in an infinite loop at
-	 * console_unlock(). So make here we touch the VGA MSR register, making
-	 * sure vgacon can keep working normally without triggering interrupts
-	 * and error messages.
-	 */
-	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
-	outb(inb(VGA_MIS_R), VGA_MIS_W);
-	vga_put(pdev, VGA_RSRC_LEGACY_IO);
-}
-
 int intel_vga_register(struct intel_display *display)
 {
 




             reply	other threads:[~2025-11-19 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19 20:04 Lucas De Marchi [this message]
2025-11-19 23:36 ` ✓ CI.KUnit: success for drm/i915/display: Stop touching vga on post enable Patchwork
2025-11-20  0:41 ` [PATCH] " Ville Syrjälä
2025-11-20  4:28   ` Lucas De Marchi
2025-11-20  0:43 ` ✓ Xe.CI.BAT: success for " Patchwork
2025-11-20  6:02 ` ✓ Xe.CI.Full: " 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=20251119-ioport-v1-1-ec43f1e12c49@intel.com \
    --to=lucas.demarchi@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;
as well as URLs for NNTP newsgroup(s).