summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_vgpu.h
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@intel.com>2018-05-08 12:07:05 +0300
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>2018-06-05 16:57:01 +0300
commit52b2416ceb72e8f757eb56de5a98ade04d9b062d (patch)
tree7cb2033bcadfeb82d0cdc1bb1b7b05d26946b03e /drivers/gpu/drm/i915/i915_vgpu.h
parent6ceb7277173597eeed8d635e08db51e35235ab21 (diff)
downloadlinux-52b2416ceb72e8f757eb56de5a98ade04d9b062d.tar.xz
drm/i915: Add new vGPU cap info bit VGT_CAPS_HUGE_GTT
This adds a new vGPU cap info bit VGT_CAPS_HUGE_GTT, which is to detect whether the host supports shadowing of huge gtt pages. If host does support it, remove the page sizes restriction for vGPU. Signed-off-by: Changbin Du <changbin.du@intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/1525770425-5373-1-git-send-email-changbin.du@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vgpu.h')
-rw-r--r--drivers/gpu/drm/i915/i915_vgpu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vgpu.h b/drivers/gpu/drm/i915/i915_vgpu.h
index bb8338450dc1..551acc390046 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.h
+++ b/drivers/gpu/drm/i915/i915_vgpu.h
@@ -36,6 +36,12 @@ intel_vgpu_has_hwsp_emulation(struct drm_i915_private *dev_priv)
return dev_priv->vgpu.caps & VGT_CAPS_HWSP_EMULATION;
}
+static inline bool
+intel_vgpu_has_huge_gtt(struct drm_i915_private *dev_priv)
+{
+ return dev_priv->vgpu.caps & VGT_CAPS_HUGE_GTT;
+}
+
int intel_vgt_balloon(struct drm_i915_private *dev_priv);
void intel_vgt_deballoon(struct drm_i915_private *dev_priv);