summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-11-17 04:21:21 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-11-17 04:21:21 +0000
commitc7ed651bae3d6e49213a1fe4f93e1c846ba6e52d (patch)
treea852a743b0ddb5db893464a0e62351edfbfb8ce6 /sys
parent75d1c1ed412e4c32e83d4dcdfeed45cc8ab682a6 (diff)
adjust for reversed outb arguments linux uses
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915/display/intel_vga.c4
1 files changed, 4 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 efef499747d..eed3fe0bfb2 100644
--- a/sys/dev/pci/drm/i915/display/intel_vga.c
+++ b/sys/dev/pci/drm/i915/display/intel_vga.c
@@ -95,7 +95,11 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
* and error messages.
*/
vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
+#ifdef __linux__
outb(inb(VGA_MSR_READ), VGA_MSR_WRITE);
+#else
+ outb(VGA_MSR_WRITE, inb(VGA_MSR_READ));
+#endif
vga_put(pdev, VGA_RSRC_LEGACY_IO);
}