From: Jani Nikula <jani.nikula@linux.intel.com>
To: zhangzhijie <zhangzhijie@bosc.ac.cn>,
zhangzhijie@bosc.ac.cn, wangran@bosc.ac.cn, zhangjian@bosc.ac.cn,
daniel@ffwll.ch, rodrigo.vivi@intel.com,
joonas.lahtinen@linux.intel.com, tursulin@ursulin.net,
airlied@gmail.com, intel-gfx@lists.freedesktop.org,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] Support Intel Xe GPU dirver Porting on RISC-V Architecture
Date: Thu, 30 Oct 2025 15:34:59 +0200 [thread overview]
Message-ID: <08cc7457a13e434832389d63d73f1df804ae1a2c@intel.com> (raw)
In-Reply-To: <20250715061837.2144388-1-zhangzhijie@bosc.ac.cn>
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
prev parent reply other threads:[~2025-10-30 13:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=08cc7457a13e434832389d63d73f1df804ae1a2c@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tursulin@ursulin.net \
--cc=wangran@bosc.ac.cn \
--cc=zhangjian@bosc.ac.cn \
--cc=zhangzhijie@bosc.ac.cn \
/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