All of 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 v6 1/1] Split i915_run_as_guest into x86 and non-x86
Date: Thu, 31 Mar 2022 13:43:43 -0700	[thread overview]
Message-ID: <20220331204343.1256150-2-casey.g.bowman@intel.com> (raw)
In-Reply-To: <20220331204343.1256150-1-casey.g.bowman@intel.com>

Splitting i915_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>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_utils.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_utils.h b/drivers/gpu/drm/i915/i915_utils.h
index b2d89c43f24d..ea7648e3aa0e 100644
--- a/drivers/gpu/drm/i915/i915_utils.h
+++ b/drivers/gpu/drm/i915/i915_utils.h
@@ -32,7 +32,10 @@
 #include <linux/types.h>
 #include <linux/workqueue.h>
 #include <linux/sched/clock.h>
+
+#ifdef CONFIG_X86
 #include <asm/hypervisor.h>
+#endif
 
 struct drm_i915_private;
 struct timer_list;
@@ -428,7 +431,12 @@ static inline bool timer_expired(const struct timer_list *t)
 
 static inline bool i915_run_as_guest(void)
 {
+#if IS_ENABLED(CONFIG_X86)
 	return !hypervisor_is_type(X86_HYPER_NATIVE);
+#else
+	/* Not supported yet */
+	return false;
+#endif
 }
 
 bool i915_vtd_active(struct drm_i915_private *i915);
-- 
2.25.1


  reply	other threads:[~2022-03-31 20:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 20:43 [Intel-gfx] [PATCH v6 0/1] Splitting up platform-specific calls Casey Bowman
2022-03-31 20:43 ` Casey Bowman [this message]
2022-04-05 18:04   ` [Intel-gfx] [PATCH v6 1/1] Split i915_run_as_guest into x86 and non-x86 Casey Bowman
2022-04-05 20:06     ` Lucas De Marchi
2022-04-06 16:24   ` Lucas De Marchi
2022-03-31 22:30 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Splitting up platform-specific calls Patchwork
2022-03-31 23:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-04-06  0:41 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Splitting up platform-specific calls (rev2) Patchwork
2022-04-06  0:45 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2022-04-06  1:10 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-06  6:21 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20220331204343.1256150-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 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.