diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-10-02 04:02:47 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2020-10-02 04:02:47 +0000 |
commit | 037f72446843540ab70e649ceae6eaa2cef2742c (patch) | |
tree | 38d492b2f36d5f7bfd7eb13c12ac8882eab56c7a /sys | |
parent | ce4b4b1baca67edfcfd15d3d90d381ccecbef5f2 (diff) |
adjust for reversed outb arguments linux uses
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915/display/intel_vga.c | 6 |
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); |