Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
@ 2025-07-15  6:18 zhangzhijie
  2025-07-15 20:42 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: zhangzhijie @ 2025-07-15  6:18 UTC (permalink / raw)
  To: zhangzhijie, wangran, zhangjian, daniel, jani.nikula,
	rodrigo.vivi, joonas.lahtinen, tursulin, airlied, intel-gfx,
	intel-xe, dri-devel, linux-kernel

    inb/outb speccial wire not support on other ARCH.
Should detect whether arch platform support or not.

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

diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
index 4b98833bfa8c..5e48e3282670 100644
--- a/drivers/gpu/drm/i915/display/intel_vga.c
+++ b/drivers/gpu/drm/i915/display/intel_vga.c
@@ -33,6 +33,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
 	if (intel_de_read(dev_priv, vga_reg) & VGA_DISP_DISABLE)
 		return;
 
+#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
 	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
 	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
 	outb(0x01, VGA_SEQ_I);
@@ -40,6 +41,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
 	outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D);
 	vga_put(pdev, VGA_RSRC_LEGACY_IO);
 	udelay(300);
+#endif
 
 	intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
 	intel_de_posting_read(dev_priv, vga_reg);
@@ -80,6 +82,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)
 
 void intel_vga_reset_io_mem(struct drm_i915_private *i915)
 {
+#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
 	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
 
 	/*
@@ -95,6 +98,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
 	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
 	outb(inb(VGA_MIS_R), VGA_MIS_W);
 	vga_put(pdev, VGA_RSRC_LEGACY_IO);
+#endif
 }
 
 int intel_vga_register(struct drm_i915_private *i915)
-- 
2.34.1


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

* ✗ LGCI.VerificationFailed: failure for Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
@ 2025-07-15 20:42 ` Patchwork
  2025-07-16  4:19 ` [PATCH v1] " Simon Richter
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2025-07-15 20:42 UTC (permalink / raw)
  To: zhangzhijie; +Cc: intel-xe

== Series Details ==

Series: Support Intel Xe GPU dirver Porting on RISC-V Architecture
URL   : https://patchwork.freedesktop.org/series/151665/
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] 10+ messages in thread

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
  2025-07-15 20:42 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
@ 2025-07-16  4:19 ` Simon Richter
  2025-07-16  7:00   ` zhangzhijie
  2025-10-30  1:50 ` Jeff Geerling
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Simon Richter @ 2025-07-16  4:19 UTC (permalink / raw)
  To: zhangzhijie, wangran, zhangjian, intel-xe

Hi,

On 7/15/25 15:18, zhangzhijie wrote:

>      inb/outb speccial wire not support on other ARCH.
> Should detect whether arch platform support or not.

Are you sure these aren't memory mapped?

E.g. POWER defines a global variable with the base of the PCI mapped 
area, uses that in the inb/outb macros to generate loads/stores, and 
configures the root complex to forward accesses to the first 256 bytes 
as I/O TLPs.

Bridges have special handling for VGA addresses, so they can be 
forwarded even if no I/O ranges exist.

Also, this code is probably not used in the Xe driver -- the only VGA 
accesses performed here are a palette read and subsequent write of the 
same value, which is needed for some reason after turning off a voltage 
regulator[1]. If the legacy ports in your system are mapped properly, 
then you might not even run into that problem.

    Simon

[1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1824

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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-16  4:19 ` [PATCH v1] " Simon Richter
@ 2025-07-16  7:00   ` zhangzhijie
  2025-07-17  5:14     ` Simon Richter
  0 siblings, 1 reply; 10+ messages in thread
From: zhangzhijie @ 2025-07-16  7:00 UTC (permalink / raw)
  To: Simon Richter, wangran, zhangjian, intel-xe



在 2025/7/16 12:19, Simon Richter 写道:
> Hi,
> 
> On 7/15/25 15:18, zhangzhijie wrote:
> 
>>      inb/outb speccial wire not support on other ARCH.
>> Should detect whether arch platform support or not.
> 
> Are you sure these aren't memory mapped?
Hi, Simon
	yes, few arch not has this memory map(SVGAlib.) on .
> 
> E.g. POWER defines a global variable with the base of the PCI mapped 
> area, uses that in the inb/outb macros to generate loads/stores, and 
> configures the root complex to forward accesses to the first 256 bytes 
> as I/O TLPs.
> 
> Bridges have special handling for VGA addresses, so they can be 
> forwarded even if no I/O ranges exist.
> 
> Also, this code is probably not used in the Xe driver -- the only VGA 
> accesses performed here are a palette read and subsequent write of the 
> same value, which is needed for some reason after turning off a voltage 
> regulator[1]. If the legacy ports in your system are mapped properly, 
> then you might not even run into that problem.
> 
>     Simon
> 
> [1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1824
	Got that same with issue link. thanks
	I have question that will VGA_CONSOLE support on non-x64 architecture? 
using CONFIG_X86/X86_64 means only support for X86 archtecture

Regards.
ZhiJie

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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-16  7:00   ` zhangzhijie
@ 2025-07-17  5:14     ` Simon Richter
  0 siblings, 0 replies; 10+ messages in thread
From: Simon Richter @ 2025-07-17  5:14 UTC (permalink / raw)
  To: zhangzhijie, wangran, zhangjian, intel-xe

Hi,

On 7/16/25 16:00, zhangzhijie wrote:

>>>      inb/outb speccial wire not support on other ARCH.
>> Are you sure these aren't memory mapped?

>      yes, few arch not has this memory map(SVGAlib.) on .

Is it missing from the root complex IP instantation, so the logic does 
not exist, or just not enabled, which could be fixed by doing the same 
thing as POWER?

The fewer differences there are between platforms, the better.

>> [1] https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/1824
>      Got that same with issue link. thanks

That is also an inb/outb pair. If you got it to compile, then you have a 
definition of inb/outb for your platform, and the next step is checking 
where that came from and how it is supposed to work, and the same 
definition can be used to compile the code you proposed to make conditional.

That is a question for the people building your PCIe interface though.

>      I have question that will VGA_CONSOLE support on non-x64 
> architecture? using CONFIG_X86/X86_64 means only support for X86 
> archtecture

VGA_CONSOLE is text mode, with font rendering done by the graphics card.

That requires that the I/O ports in the ranges 0x3bb0 to 0x3bb and 0x3c0 
to 0x3df and memory accesses from 0xa0000 to 0xbffff are forwarded to 
the card (i.e. all PCI(e) bridges above the card need to have the VGA 
bit set, and the root complex needs to generate these accesses -- so 
there needs to be memory mappings in the root complex for legacy I/O 
ports (so working inb/outb) and for the 128kB VGA aperture.

Pretty much nobody on x86 uses VGA_CONSOLE these days, instead they use 
kernel modesetting to switch to a graphical mode, and render into the 
framebuffer with whatever method is available -- CPU and maybe some 
device specific acceleration in the kernel, or Mesa and full 3D 
acceleration in X and Wayland.

So I'd turn off VGA_CONSOLE, that also seems to avoid issues when the 
non-generic drivers take over (that is what the code in the linked issue 
does -- I haven't fully understood the problem there, but someone 
deliberately added this, and I'd expect that they understood it enough 
to say that this was necessary.

If someone from Intel knows more, this information would be great to 
have, so I can tell how much time to invest on fixing this for the 
various platforms (if that is the source of the 400,000 interrupts per 
second I'm seeing, then it gets higher priority than if it is only 
relevant if someone activated text mode before).

    Simon

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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
  2025-07-15 20:42 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
  2025-07-16  4:19 ` [PATCH v1] " Simon Richter
@ 2025-10-30  1:50 ` Jeff Geerling
  2025-10-30  1:51 ` Jeff Geerling
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Jeff Geerling @ 2025-10-30  1:50 UTC (permalink / raw)
  To: zhangzhijie
  Cc: wangran, zhangjian, daniel, jani.nikula, rodrigo.vivi,
	joonas.lahtinen, tursulin, airlied, intel-gfx, intel-xe,
	dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]

+1 for this patch, as it would enable Xe on any non-x86 system.

I've successfully tested this change on Ampere and Broadcom (Raspberry Pi) systems.

We've been using the flag `CONFIG_VGA_CONSOLE` instead of `CONFIG_X86` but either should achieve the same goal. See: https://github.com/6by9/linux/commit/6bd4cfe79b5111986dd11a5c6e48d4a963fd7740

With some OSes a later Mesa version needs to be compiled to support newer Xe/Xe2 cards, however I've successfully tested a number of Intel dGPUs at this point. Sometimes setting force probe to '*' (or the particular GPU ID) is required, but otherwise stability is good.

For example, the A750: https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/510#issuecomment-3383284831

> On Jul 15, 2025, at 1:18 AM, zhangzhijie <zhangzhijie@bosc.ac.cn> wrote:
> 
>    inb/outb speccial wire not support on other ARCH.
> Should detect whether arch platform support or not.
> 
> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
> ---
> drivers/gpu/drm/i915/display/intel_vga.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index 4b98833bfa8c..5e48e3282670 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -33,6 +33,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
> 	if (intel_de_read(dev_priv, vga_reg) & VGA_DISP_DISABLE)
> 		return;
> 
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> 	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
> 	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> 	outb(0x01, VGA_SEQ_I);
> @@ -40,6 +41,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
> 	outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D);
> 	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> 	udelay(300);
> +#endif
> 
> 	intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
> 	intel_de_posting_read(dev_priv, vga_reg);
> @@ -80,6 +82,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)
> 
> void intel_vga_reset_io_mem(struct drm_i915_private *i915)
> {
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> 	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
> 
> 	/*
> @@ -95,6 +98,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
> 	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> 	outb(inb(VGA_MIS_R), VGA_MIS_W);
> 	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +#endif
> }
> 
> int intel_vga_register(struct drm_i915_private *i915)
> -- 
> 2.34.1
> 
> 


[-- Attachment #2: Type: text/html, Size: 4315 bytes --]

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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
                   ` (2 preceding siblings ...)
  2025-10-30  1:50 ` Jeff Geerling
@ 2025-10-30  1:51 ` Jeff Geerling
  2025-10-30  1:55 ` Jeff Geerling
  2025-10-30 13:34 ` Jani Nikula
  5 siblings, 0 replies; 10+ messages in thread
From: Jeff Geerling @ 2025-10-30  1:51 UTC (permalink / raw)
  To: zhangzhijie
  Cc: wangran, zhangjian, daniel, jani.nikula, rodrigo.vivi,
	joonas.lahtinen, tursulin, airlied, intel-gfx, intel-xe,
	dri-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]

+1 for this patch, as it would enable Xe on any non-x86 system.

I've successfully tested this change on Ampere and Broadcom (Raspberry Pi) systems.

We've been using the flag `CONFIG_VGA_CONSOLE` instead of `CONFIG_X86` but either should achieve the same goal. See: https://github.com/6by9/linux/commit/6bd4cfe79b5111986dd11a5c6e48d4a963fd7740

With some OSes a later Mesa version needs to be compiled to support newer Xe/Xe2 cards, however I've successfully tested a number of Intel dGPUs at this point. Sometimes setting force probe to '*' (or the particular GPU ID) is required, but otherwise stability is good.

For example, the A750: https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/510#issuecomment-3383284831

> On Jul 15, 2025, at 1:18 AM, zhangzhijie <zhangzhijie@bosc.ac.cn> wrote:
> 
>    inb/outb speccial wire not support on other ARCH.
> Should detect whether arch platform support or not.
> 
> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
> ---
> drivers/gpu/drm/i915/display/intel_vga.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index 4b98833bfa8c..5e48e3282670 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -33,6 +33,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
> 	if (intel_de_read(dev_priv, vga_reg) & VGA_DISP_DISABLE)
> 		return;
> 
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> 	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
> 	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> 	outb(0x01, VGA_SEQ_I);
> @@ -40,6 +41,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
> 	outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D);
> 	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> 	udelay(300);
> +#endif
> 
> 	intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
> 	intel_de_posting_read(dev_priv, vga_reg);
> @@ -80,6 +82,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)
> 
> void intel_vga_reset_io_mem(struct drm_i915_private *i915)
> {
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> 	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
> 
> 	/*
> @@ -95,6 +98,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
> 	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> 	outb(inb(VGA_MIS_R), VGA_MIS_W);
> 	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +#endif
> }
> 
> int intel_vga_register(struct drm_i915_private *i915)
> -- 
> 2.34.1
> 
> 


[-- Attachment #2: Type: text/html, Size: 4304 bytes --]

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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
                   ` (3 preceding siblings ...)
  2025-10-30  1:51 ` Jeff Geerling
@ 2025-10-30  1:55 ` Jeff Geerling
  2025-10-30  3:28   ` ZhangZhiJie
  2025-10-30 13:34 ` Jani Nikula
  5 siblings, 1 reply; 10+ messages in thread
From: Jeff Geerling @ 2025-10-30  1:55 UTC (permalink / raw)
  To: zhangzhijie
  Cc: wangran, zhangjian, daniel, jani.nikula, rodrigo.vivi,
	joonas.lahtinen, tursulin, airlied, intel-gfx, intel-xe,
	dri-devel, linux-kernel

+1 for this patch, as it would enable Xe on any non-x86 system.

I've successfully tested this change on Ampere and Broadcom (Raspberry Pi) systems.

We've been using the flag `CONFIG_VGA_CONSOLE` instead of `CONFIG_X86` but either should achieve the same goal. See: https://github.com/6by9/linux/commit/6bd4cfe79b5111986dd11a5c6e48d4a963fd7740

With some OSes a later Mesa version needs to be compiled to support newer Xe/Xe2 cards, however I've successfully tested a number of Intel dGPUs at this point. Sometimes setting force probe to '*' (or the particular GPU ID) is required, but otherwise stability is good.

For example, the A750: https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/510#issuecomment-3383284831

> On Jul 15, 2025, at 1:18 AM, zhangzhijie <zhangzhijie@bosc.ac.cn> wrote:
> 
>    inb/outb speccial wire not support on other ARCH.
> Should detect whether arch platform support or not.
> 
> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
> ---
> drivers/gpu/drm/i915/display/intel_vga.c | 4 ++++
> 1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index 4b98833bfa8c..5e48e3282670 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -33,6 +33,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
> if (intel_de_read(dev_priv, vga_reg) & VGA_DISP_DISABLE)
> return;
> 
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> /* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
> vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> outb(0x01, VGA_SEQ_I);
> @@ -40,6 +41,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
> outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D);
> vga_put(pdev, VGA_RSRC_LEGACY_IO);
> udelay(300);
> +#endif
> 
> intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
> intel_de_posting_read(dev_priv, vga_reg);
> @@ -80,6 +82,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)
> 
> void intel_vga_reset_io_mem(struct drm_i915_private *i915)
> {
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
> struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
> 
> /*
> @@ -95,6 +98,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
> vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
> outb(inb(VGA_MIS_R), VGA_MIS_W);
> vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +#endif
> }
> 
> int intel_vga_register(struct drm_i915_private *i915)
> -- 
> 2.34.1
> 
> 


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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-10-30  1:55 ` Jeff Geerling
@ 2025-10-30  3:28   ` ZhangZhiJie
  0 siblings, 0 replies; 10+ messages in thread
From: ZhangZhiJie @ 2025-10-30  3:28 UTC (permalink / raw)
  To: Jeff Geerling
  Cc: wangran, zhangjian, daniel, jani.nikula, rodrigo.vivi,
	joonas.lahtinen, tursulin, airlied, intel-gfx, intel-xe,
	dri-devel, linux-kernel



On 2025/10/30 09:55, Jeff Geerling wrote:
> +1 for this patch, as it would enable Xe on any non-x86 system.
> 
> I've successfully tested this change on Ampere and Broadcom (Raspberry Pi) systems.
> 
> We've been using the flag `CONFIG_VGA_CONSOLE` instead of `CONFIG_X86` but either should achieve the same goal. See: https://github.com/6by9/linux/commit/6bd4cfe79b5111986dd11a5c6e48d4a963fd7740
> 
> With some OSes a later Mesa version needs to be compiled to support newer Xe/Xe2 cards, however I've successfully tested a number of Intel dGPUs at this point. Sometimes setting force probe to '*' (or the particular GPU ID) is required, but otherwise stability is good.
> 
> For example, the A750: https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/510#issuecomment-3383284831
> 
>> On Jul 15, 2025, at 1:18 AM, zhangzhijie <zhangzhijie@bosc.ac.cn> wrote:
>>
>>     inb/outb speccial wire not support on other ARCH.
>> Should detect whether arch platform support or not.
>>
>> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
>> ---
>> drivers/gpu/drm/i915/display/intel_vga.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
>> index 4b98833bfa8c..5e48e3282670 100644
>> --- a/drivers/gpu/drm/i915/display/intel_vga.c
>> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
>> @@ -33,6 +33,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
>> if (intel_de_read(dev_priv, vga_reg) & VGA_DISP_DISABLE)
>> return;
>>
>> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
>> /* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
>> vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
>> outb(0x01, VGA_SEQ_I);
>> @@ -40,6 +41,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
>> outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D);
>> vga_put(pdev, VGA_RSRC_LEGACY_IO);
>> udelay(300);
>> +#endif
>>
>> intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
>> intel_de_posting_read(dev_priv, vga_reg);
>> @@ -80,6 +82,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)
>>
>> void intel_vga_reset_io_mem(struct drm_i915_private *i915)
>> {
>> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
>> struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
>>
>> /*
>> @@ -95,6 +98,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
>> vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
>> outb(inb(VGA_MIS_R), VGA_MIS_W);
>> vga_put(pdev, VGA_RSRC_LEGACY_IO);
>> +#endif
>> }
>>
>> int intel_vga_register(struct drm_i915_private *i915)
>> -- 
>> 2.34.1
>>
>>
Congratulation! . So I think shoule be disable this ops or take other 
ways to instead this code, Like None IO soc/ARCH

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

* Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
  2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
                   ` (4 preceding siblings ...)
  2025-10-30  1:55 ` Jeff Geerling
@ 2025-10-30 13:34 ` Jani Nikula
  5 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2025-10-30 13:34 UTC (permalink / raw)
  To: zhangzhijie, zhangzhijie, wangran, zhangjian, daniel,
	rodrigo.vivi, joonas.lahtinen, tursulin, airlied, intel-gfx,
	intel-xe, dri-devel, linux-kernel

On Tue, 15 Jul 2025, zhangzhijie <zhangzhijie@bosc.ac.cn> wrote:
>     inb/outb speccial wire not support on other ARCH.
> Should detect whether arch platform support or not.
>
> Signed-off-by: zhangzhijie <zhangzhijie@bosc.ac.cn>
> ---
>  drivers/gpu/drm/i915/display/intel_vga.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_vga.c b/drivers/gpu/drm/i915/display/intel_vga.c
> index 4b98833bfa8c..5e48e3282670 100644
> --- a/drivers/gpu/drm/i915/display/intel_vga.c
> +++ b/drivers/gpu/drm/i915/display/intel_vga.c
> @@ -33,6 +33,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
>  	if (intel_de_read(dev_priv, vga_reg) & VGA_DISP_DISABLE)
>  		return;
>  
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
>  	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
>  	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
>  	outb(0x01, VGA_SEQ_I);
> @@ -40,6 +41,7 @@ void intel_vga_disable(struct drm_i915_private *dev_priv)
>  	outb(sr1 | VGA_SR01_SCREEN_OFF, VGA_SEQ_D);
>  	vga_put(pdev, VGA_RSRC_LEGACY_IO);
>  	udelay(300);
> +#endif

This should be abstracted to a separate function with the
#if/#else/#endif choosing a different implementation of the function
(empty stub in the else branch).

>  
>  	intel_de_write(dev_priv, vga_reg, VGA_DISP_DISABLE);
>  	intel_de_posting_read(dev_priv, vga_reg);
> @@ -80,6 +82,7 @@ void intel_vga_redisable(struct drm_i915_private *i915)
>  
>  void intel_vga_reset_io_mem(struct drm_i915_private *i915)
>  {
> +#if defined(CONFIG_X86) || defined(CONFIG_X86_64)
>  	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
>  
>  	/*
> @@ -95,6 +98,7 @@ void intel_vga_reset_io_mem(struct drm_i915_private *i915)
>  	vga_get_uninterruptible(pdev, VGA_RSRC_LEGACY_IO);
>  	outb(inb(VGA_MIS_R), VGA_MIS_W);
>  	vga_put(pdev, VGA_RSRC_LEGACY_IO);
> +#endif

Ditto, but you have the function already.

>  }
>  
>  int intel_vga_register(struct drm_i915_private *i915)

-- 
Jani Nikula, Intel

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

end of thread, other threads:[~2025-10-30 13:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15  6:18 [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture zhangzhijie
2025-07-15 20:42 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
2025-07-16  4:19 ` [PATCH v1] " Simon Richter
2025-07-16  7:00   ` zhangzhijie
2025-07-17  5:14     ` Simon Richter
2025-10-30  1:50 ` Jeff Geerling
2025-10-30  1:51 ` Jeff Geerling
2025-10-30  1:55 ` Jeff Geerling
2025-10-30  3:28   ` ZhangZhiJie
2025-10-30 13:34 ` Jani Nikula

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