public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/4] drm/i915/vga: switch to use VGA definitions from video/vga.h
Date: Wed, 12 Jan 2022 15:24:41 +0200	[thread overview]
Message-ID: <Yd7WmT4naDadKVoh@intel.com> (raw)
In-Reply-To: <87pmoy8xdb.fsf@intel.com>

On Tue, Jan 11, 2022 at 10:55:44AM +0200, Jani Nikula wrote:
> On Mon, 10 Jan 2022, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> > On Mon, Jan 10, 2022 at 11:57:39AM +0200, Jani Nikula wrote:
> >> The video/vga.h has macros for the VGA registers. Switch to use them.
> >> 
> >> Suggested-by: Matt Roper <matthew.d.roper@intel.com>
> >> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> >> ---
> >>  drivers/gpu/drm/i915/display/intel_vga.c | 9 +++++----
> >>  1 file 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..43c12036c1fa 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(VGA_SEQ_CLOCK_MODE, VGA_SEQ_I);
> >
> > Not a huge fan of some of these defines since now I have
> > no idea what register this is selecting.
> 
> It's a bit silly that we have our own macros for this stuff, but I get
> the point. Took me a while to figure the changes out because the macros
> in video/vga.h aren't even grouped in a helpful way.
> 
> I guess you'd prefer patch [1] over patches 3-4 in this series then? For
> me the main goal is to just reduce the size of i915_reg.h.

I guess another option is to go with this and just
s/VGA_SEQ_CLOCK_MODE/0x01/ or something. I think the rest
of the defines are probably clear enough.

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2022-01-12 13:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10  9:57 [Intel-gfx] [PATCH 1/4] drm/i915: split out PCI config space registers from i915_reg.h Jani Nikula
2022-01-10  9:57 ` [Intel-gfx] [PATCH 2/4] drm/i915: split out vlv sideband " Jani Nikula
2022-01-10 14:32   ` Jani Nikula
2022-01-10  9:57 ` [Intel-gfx] [PATCH 3/4] drm/i915/vga: switch to use VGA definitions from video/vga.h Jani Nikula
2022-01-10 16:03   ` Ville Syrjälä
2022-01-11  8:55     ` Jani Nikula
2022-01-11 16:14       ` Lucas De Marchi
2022-01-11 16:19         ` Jani Nikula
2022-01-11 16:37           ` Lucas De Marchi
2022-01-12 13:24       ` Ville Syrjälä [this message]
2022-02-02  9:17         ` Jani Nikula
2022-02-02 10:22           ` Ville Syrjälä
2022-02-02 11:25             ` Jani Nikula
2022-01-10  9:57 ` [Intel-gfx] [PATCH 4/4] drm/i915: remove VGA register definitions Jani Nikula
2022-01-10 10:30 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915: split out PCI config space registers from i915_reg.h Patchwork
2022-01-10 10:31 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-10 11:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-01-10 13:20 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=Yd7WmT4naDadKVoh@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /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