projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
805f04d
)
drm/i915: Split i915_run_as_guest into x86 and non-x86
author
Casey Bowman
<casey.g.bowman@intel.com>
Thu, 31 Mar 2022 20:43:43 +0000
(13:43 -0700)
committer
Lucas De Marchi
<lucas.demarchi@intel.com>
Wed, 6 Apr 2022 16:02:37 +0000
(09:02 -0700)
Split 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>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20220331204343.1256150-2-casey.g.bowman@intel.com
drivers/gpu/drm/i915/i915_utils.h
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_utils.h
b/drivers/gpu/drm/i915/i915_utils.h
index
b2d89c4
..
ea7648e
100644
(file)
--- 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);