All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	kernel@collabora.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915: only disable default vga device
Date: Mon, 17 May 2021 20:24:01 +0300	[thread overview]
Message-ID: <YKKmsbvTZBwCUiRu@intel.com> (raw)
In-Reply-To: <20210516171432.1734268-1-emil.l.velikov@gmail.com>

On Sun, May 16, 2021 at 06:14:32PM +0100, Emil Velikov wrote:
> From: Vivek Das Mohapatra <vivek@collabora.com>
> 
> This patch is to do with seamless handover, eg when the sequence is
> bootloader → plymouth → desktop.
> 
> It switches the vga arbiter from the "other" GPU to the default one
> (intel in this case), so the driver can issue some io().

I don't understand what this commit message is trying to say.

> 
> Signed-off-by: Vivek Das Mohapatra <vivek@collabora.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
> Greetings all,
> 
> This patch has been downstream for a while now yet it seems perfectly
> reasonable thing to have in the Linux kernel.
> 
> https://github.com/ValveSoftware/steamos_kernel/commit/5431b5b1999c3d3b5efee817fb3373fbbd473063
> 
> 
>  drivers/gpu/drm/i915/display/intel_vga.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index be333699c515..4f07b5ad5fa0 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -30,12 +30,14 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
>  	u8 sr1;
>  
>  	/* 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);
> -	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> -	udelay(300);
> +	if (pdev == vga_default_device()) {
> +		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);
> +		vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +		udelay(300);
> +	}
>  
>  	intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
>  	intel_de_posting_read(dev_priv, vga_reg);
> -- 
> 2.27.0

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	kernel@collabora.com
Subject: Re: [PATCH] drm/i915: only disable default vga device
Date: Mon, 17 May 2021 20:24:01 +0300	[thread overview]
Message-ID: <YKKmsbvTZBwCUiRu@intel.com> (raw)
In-Reply-To: <20210516171432.1734268-1-emil.l.velikov@gmail.com>

On Sun, May 16, 2021 at 06:14:32PM +0100, Emil Velikov wrote:
> From: Vivek Das Mohapatra <vivek@collabora.com>
> 
> This patch is to do with seamless handover, eg when the sequence is
> bootloader → plymouth → desktop.
> 
> It switches the vga arbiter from the "other" GPU to the default one
> (intel in this case), so the driver can issue some io().

I don't understand what this commit message is trying to say.

> 
> Signed-off-by: Vivek Das Mohapatra <vivek@collabora.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
> Greetings all,
> 
> This patch has been downstream for a while now yet it seems perfectly
> reasonable thing to have in the Linux kernel.
> 
> https://github.com/ValveSoftware/steamos_kernel/commit/5431b5b1999c3d3b5efee817fb3373fbbd473063
> 
> 
>  drivers/gpu/drm/i915/display/intel_vga.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index be333699c515..4f07b5ad5fa0 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -30,12 +30,14 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
>  	u8 sr1;
>  
>  	/* 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);
> -	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> -	udelay(300);
> +	if (pdev == vga_default_device()) {
> +		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);
> +		vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +		udelay(300);
> +	}
>  
>  	intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
>  	intel_de_posting_read(dev_priv, vga_reg);
> -- 
> 2.27.0

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2021-05-17 17:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 17:14 [Intel-gfx] [PATCH] drm/i915: only disable default vga device Emil Velikov
2021-05-16 17:14 ` Emil Velikov
2021-05-17 10:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-05-17 11:22 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-05-17 16:11 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-05-17 17:24 ` Ville Syrjälä [this message]
2021-05-17 17:24   ` [PATCH] " Ville Syrjälä
2021-05-18 11:09   ` [Intel-gfx] " Emil Velikov
2021-05-18 11:09     ` Emil Velikov
2021-05-18 11:17     ` [Intel-gfx] " Ville Syrjälä
2021-05-18 11:17       ` Ville Syrjälä
2021-05-18 12:39       ` [Intel-gfx] " Emil Velikov
2021-05-18 12:39         ` Emil Velikov
2021-05-26 16:21       ` [Intel-gfx] " Emil Velikov
2021-05-26 16:21         ` Emil Velikov
2021-06-04 13:47         ` [Intel-gfx] " Emil Velikov
2021-06-04 13:47           ` Emil Velikov
2021-06-04 14:08           ` [Intel-gfx] " Ville Syrjälä
2021-06-04 14:08             ` Ville Syrjälä
2021-06-04 15:53             ` [Intel-gfx] " Emil Velikov
2021-06-04 15:53               ` Emil Velikov

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=YKKmsbvTZBwCUiRu@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=kernel@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.