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: michael.cheng@intel.com, jani.nikula@intel.com,
	lucas.demarchi@intel.com, daniel.vetter@intel.com
Subject: [Intel-gfx] [RFC PATCH v3 1/1] i915/drm: Split out x86/arm64 for run_as_guest
Date: Tue, 15 Feb 2022 15:41:46 -0800	[thread overview]
Message-ID: <20220215234146.304035-2-casey.g.bowman@intel.com> (raw)
In-Reply-To: <20220215234146.304035-1-casey.g.bowman@intel.com>

Splitting out run_as_guest into platform-specific functions
as arm64 does not support this functionality.

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

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 1bca510a946d..fdec2b025540 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1381,10 +1381,18 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define INTEL_DISPLAY_ENABLED(dev_priv) \
 	(drm_WARN_ON(&(dev_priv)->drm, !HAS_DISPLAY(dev_priv)), !(dev_priv)->params.disable_display)
 
+#if IS_ENABLED(CONFIG_X86)
 static inline bool run_as_guest(void)
 {
 	return !hypervisor_is_type(X86_HYPER_NATIVE);
 }
+#elif IS_ENABLED(CONFIG_ARM64)
+static inline bool run_as_guest(void)
+{
+	/* Not supported for arm64, so we return false  */
+	return false;
+}
+#endif
 
 #define HAS_D12_PLANE_MINIMIZATION(dev_priv) (IS_ROCKETLAKE(dev_priv) || \
 					      IS_ALDERLAKE_S(dev_priv))
-- 
2.25.1


  reply	other threads:[~2022-02-15 23:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 23:41 [Intel-gfx] [RFC PATCH v3 0/1] Splitting up platform-specific calls Casey Bowman
2022-02-15 23:41 ` Casey Bowman [this message]
2022-03-21 23:34   ` [Intel-gfx] [RFC PATCH v3 1/1] i915/drm: Split out x86/arm64 for run_as_guest Casey Bowman
2022-03-22  2:01     ` Lucas De Marchi
2022-03-22 10:21       ` Jani Nikula
2022-03-22 14:27         ` Lucas De Marchi
2022-03-22 14:49           ` Jani Nikula
2022-03-22 15:18             ` Tvrtko Ursulin
2022-03-22 15:23               ` Tvrtko Ursulin
2022-03-22 15:26               ` Jani Nikula
2022-03-22 15:46                 ` Tvrtko Ursulin
2022-03-22 15:52                   ` Jani Nikula
2022-03-22 16:50             ` Lucas De Marchi
2022-02-17  2:12 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Splitting up platform-specific calls (rev3) 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=20220215234146.304035-2-casey.g.bowman@intel.com \
    --to=casey.g.bowman@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=michael.cheng@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.