diff options
author | Jani Nikula <jani.nikula@intel.com> | 2022-02-02 13:25:08 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2022-02-02 17:14:40 +0200 |
commit | f0bb41fad02e0310fa7b222c7254a3603ecaca1b (patch) | |
tree | 6b0004575cc7379db11cea5d913ac0108a1c4f27 | |
parent | 657b15d672f4d89cf0750793473b8963429f8ae3 (diff) | |
download | lwn-f0bb41fad02e0310fa7b222c7254a3603ecaca1b.tar.gz lwn-f0bb41fad02e0310fa7b222c7254a3603ecaca1b.zip |
drm/i915/vga: switch to use VGA definitions from video/vga.h
The video/vga.h has macros for the VGA registers. Switch to use them.
v2: Use direct 0x01 instead of the confusing VGA_SEQ_CLOCK_MODE (Ville)
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220202112509.1886660-1-jani.nikula@intel.com
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_vga.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c index fa779f7ea415..b5d058404c14 100644 --- a/drivers/gpu/drm/i915/display/intel_vga.c +++ b/drivers/gpu/drm/i915/display/intel_vga.c @@ -7,6 +7,7 @@ #include <linux/vgaarb.h> #include <drm/i915_drm.h> +#include <video/vga.h> #include "i915_drv.h" #include "intel_de.h" @@ -34,9 +35,9 @@ 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); - outb(SR01, VGA_SR_INDEX); - sr1 = inb(VGA_SR_DATA); - outb(sr1 | 1 << 5, VGA_SR_DATA); + outb(0x01, VGA_SEQ_I); + sr1 = inb(VGA_SEQ_D); + outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D); vga_put(pdev, VGA_RSRC_LEGACY_IO); udelay(300); @@ -92,7 +93,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915) * and error messages. */ vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO); - outb(inb(VGA_MSR_READ), VGA_MSR_WRITE); + outb(inb(VGA_MIS_R), VGA_MIS_W); vga_put(pdev, VGA_RSRC_LEGACY_IO); } |