Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] i915: Support Intel GPU porting on any non-x86 system.
@ 2025-11-25  9:36 zhangzhijie
  2025-11-25  9:47 ` Jani Nikula
  2025-11-26  4:18 ` ✗ LGCI.VerificationFailed: failure for i915: Support Intel GPU porting on any non-x86 system. (rev4) Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: zhangzhijie @ 2025-11-25  9:36 UTC (permalink / raw)
  To: jani.nikula, jeff, zhangzhijie, wangran, zhangjian, daniel,
	rodrigo.vivi, joonas.lahtinen, tursulin, airlied, intel-gfx,
	intel-xe, dri-devel, linux-kernel, guoyaxing, ville.syrjala

inb/outb VGA_SEQ_* not support on other ARCH (such as RISCV).
Should detect whether arch platform support or not.

Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>

Changes in v3:
    1.Rewrite Commit message.
    2. Remove likely/unlikely

Changes in v2:
	1. vga_get/put inside the branch.

Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
---
 drivers/gpu/drm/i915/display/intel_vga.c | 33 +++++++++++++++++-------
 1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
index 6e125564db34..fda4c2cfd7cf 100644
--- a/drivers/gpu/drm/i915/display/intel_vga.c
+++ b/drivers/gpu/drm/i915/display/intel_vga.c
@@ -41,6 +41,15 @@ static bool has_vga_pipe_sel(struct intel_display *display)
 	return DISPLAY_VER(display) < 7;
 }
 
+static bool intel_arch_support_vga_pm(struct intel_display *display)
+{
+#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
+	return true;
+#else
+	return false;
+#endif
+}
+
 /* Disable the VGA plane that we never use */
 void intel_vga_disable(struct intel_display *display)
 {
@@ -64,13 +73,15 @@ void intel_vga_disable(struct intel_display *display)
 	drm_dbg_kms(display->drm, "Disabling VGA plane on pipe %c\n",
 		    pipe_name(pipe));
 
-	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
-	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
-	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);
+	if (intel_arch_support_vga_pm(display)) {
+		/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
+		vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
+		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);
+	}
 
 	intel_de_write(display, vga_reg, VGA_DISP_DISABLE);
 	intel_de_posting_read(display, vga_reg);
@@ -90,9 +101,11 @@ void intel_vga_reset_io_mem(struct intel_display *display)
 	 * sure vgacon can keep working normally without triggering interrupts
 	 * and error messages.
 	 */
-	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
-	outb(inb(VGA_MIS_R), VGA_MIS_W);
-	vga_put(pdev, VGA_RSRC_LEGACY_IO);
+	if (intel_arch_support_vga_pm(display)) {
+		vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
+		outb(inb(VGA_MIS_R), VGA_MIS_W);
+		vga_put(pdev, VGA_RSRC_LEGACY_IO);
+	}
 }
 
 int intel_vga_register(struct intel_display *display)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] i915: Support Intel GPU porting on any non-x86 system.
  2025-11-25  9:36 [PATCH v3] i915: Support Intel GPU porting on any non-x86 system zhangzhijie
@ 2025-11-25  9:47 ` Jani Nikula
  2025-11-26  4:18 ` ✗ LGCI.VerificationFailed: failure for i915: Support Intel GPU porting on any non-x86 system. (rev4) Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2025-11-25  9:47 UTC (permalink / raw)
  To: zhangzhijie, jeff, zhangzhijie, wangran, zhangjian, daniel,
	rodrigo.vivi, joonas.lahtinen, tursulin, airlied, intel-gfx,
	intel-xe, dri-devel, linux-kernel, guoyaxing, ville.syrjala

On Tue, 25 Nov 2025, zhangzhijie <zhangzhijie@bosc.ac.cn> wrote:
> inb/outb VGA_SEQ_* not support on other ARCH (such as RISCV).
> Should detect whether arch platform support or not.
>
> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
>
> Changes in v3:
>     1.Rewrite Commit message.
>     2. Remove likely/unlikely
>
> Changes in v2:
> 	1. vga_get/put inside the branch.

Argh, I also said, "I would rather finish the discussion on the previous
version before seeing a new version."

Can you please stop sending new versions? It's not helping you get any
of this merged.


BR,
Jani.


>
> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
> ---
>  drivers/gpu/drm/i915/display/intel_vga.c | 33 +++++++++++++++++-------
>  1 file changed, 23 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index 6e125564db34..fda4c2cfd7cf 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -41,6 +41,15 @@ static bool has_vga_pipe_sel(struct intel_display *display)
>  	return DISPLAY_VER(display) < 7;
>  }
>  
> +static bool intel_arch_support_vga_pm(struct intel_display *display)
> +{
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> +	return true;
> +#else
> +	return false;
> +#endif
> +}
> +
>  /* Disable the VGA plane that we never use */
>  void intel_vga_disable(struct intel_display *display)
>  {
> @@ -64,13 +73,15 @@ void intel_vga_disable(struct intel_display *display)
>  	drm_dbg_kms(display->drm, "Disabling VGA plane on pipe %c\n",
>  		    pipe_name(pipe));
>  
> -	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
> -	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> -	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);
> +	if (intel_arch_support_vga_pm(display)) {
> +		/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
> +		vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> +		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);
> +	}
>  
>  	intel_de_write(display, vga_reg, VGA_DISP_DISABLE);
>  	intel_de_posting_read(display, vga_reg);
> @@ -90,9 +101,11 @@ void intel_vga_reset_io_mem(struct intel_display *display)
>  	 * sure vgacon can keep working normally without triggering interrupts
>  	 * and error messages.
>  	 */
> -	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> -	outb(inb(VGA_MIS_R), VGA_MIS_W);
> -	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +	if (intel_arch_support_vga_pm(display)) {
> +		vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> +		outb(inb(VGA_MIS_R), VGA_MIS_W);
> +		vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +	}
>  }
>  
>  int intel_vga_register(struct intel_display *display)

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* ✗ LGCI.VerificationFailed: failure for i915: Support Intel GPU porting on any non-x86 system. (rev4)
  2025-11-25  9:36 [PATCH v3] i915: Support Intel GPU porting on any non-x86 system zhangzhijie
  2025-11-25  9:47 ` Jani Nikula
@ 2025-11-26  4:18 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2025-11-26  4:18 UTC (permalink / raw)
  To: ZhangZhiJie; +Cc: intel-xe

== Series Details ==

Series: i915: Support Intel GPU porting on any non-x86 system. (rev4)
URL   : https://patchwork.freedesktop.org/series/157967/
State : failure

== Summary ==

Address 'zhangzhijie@bosc.ac.cn' is not on the allowlist, which prevents CI from being triggered for this patch.
If you want Intel GFX CI to accept this address, please contact the script maintainers at i915-ci-infra@lists.freedesktop.org.
Exception occurred during validation, bailing out!



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-11-26  4:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25  9:36 [PATCH v3] i915: Support Intel GPU porting on any non-x86 system zhangzhijie
2025-11-25  9:47 ` Jani Nikula
2025-11-26  4:18 ` ✗ LGCI.VerificationFailed: failure for i915: Support Intel GPU porting on any non-x86 system. (rev4) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox