Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Casey Bowman <casey.g.bowman@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: lucas.demarchi@intel.com, daniel.vetter@intel.com
Subject: [Intel-gfx] [PATCH v4 1/1] i915/drm: Split run_as_guest into x86 and non-x86
Date: Tue, 22 Mar 2022 11:42:37 -0700	[thread overview]
Message-ID: <20220322184237.397484-2-casey.g.bowman@intel.com> (raw)
In-Reply-To: <20220322184237.397484-1-casey.g.bowman@intel.com>

Splitting run_as_guest into a more arch-friendly function
as non-x86 builds do not support this functionality.

Signed-off-by: Casey Bowman <casey.g.bowman@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 3c85dc8c1f04..76f0e47e3186 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1366,7 +1366,12 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 
 static inline bool run_as_guest(void)
 {
+#if IS_ENABLED(CONFIG_X86)
 	return !hypervisor_is_type(X86_HYPER_NATIVE);
+#else
+	/* Not supported yet  */
+	return false;
+#endif
 }
 
 #define HAS_D12_PLANE_MINIMIZATION(dev_priv) (IS_ROCKETLAKE(dev_priv) || \
-- 
2.25.1


  reply	other threads:[~2022-03-22 18:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-22 18:42 [Intel-gfx] [PATCH v4 0/1] Splitting up platform-specific calls Casey Bowman
2022-03-22 18:42 ` Casey Bowman [this message]
2022-03-22 19:18 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Splitting up platform-specific calls (rev4) Patchwork
2022-03-22 19:22 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-03-22 19:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-23  4:33 ` [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=20220322184237.397484-2-casey.g.bowman@intel.com \
    --to=casey.g.bowman@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@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