summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r--sys/dev/pci/drm/i915/display/intel_vga.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_vga.c b/sys/dev/pci/drm/i915/display/intel_vga.c
index b3ff889aa19..efef499747d 100644
--- a/sys/dev/pci/drm/i915/display/intel_vga.c
+++ b/sys/dev/pci/drm/i915/display/intel_vga.c
@@ -31,9 +31,15 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
+#ifdef __linux__
outb(SR01, VGA_SR_INDEX);
sr1 = inb(VGA_SR_DATA);
outb(sr1 | 1 << 5, VGA_SR_DATA);
+#else
+ outb(VGA_SR_INDEX, SR01);
+ sr1 = inb(VGA_SR_DATA);
+ outb(VGA_SR_DATA, sr1 | 1 << 5);
+#endif
vga_put(pdev, VGA_RSRC_LEGACY_IO);
udelay(300);