summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_vgpu.h
diff options
context:
space:
mode:
authorYu Zhang <yu.c.zhang@linux.intel.com>2015-02-10 19:05:51 +0800
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-02-13 23:28:24 +0100
commite21fd552ff068da4bcb1a0108e2933db52685f2c (patch)
tree2a7fed6ae807d73ddc774f8535f3ee5e9397fae8 /drivers/gpu/drm/i915/i915_vgpu.h
parentbd49234b6aa37fd32069e506c6997171afd326be (diff)
drm/i915: Add the display switch logic for vGPU in i915 driver
Display switch logic is added to notify the host side that current vGPU have a valid surface to show. It does so by writing the display_ready field in PV INFO page, and then will be handled in the host side. This is useful to avoid trickiness when the VM's framebuffer is being accessed in the middle of VM modesetting, e.g. compositing the framebuffer in the host side. v2: - move the notification code outside the 'else' in load sequence - remove the notification code in intel_crtc_set_config() v4: - code rebase, no need to define another dev_priv - use #define instead of enum for display readiness Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com> Signed-off-by: Jike Song <jike.song@intel.com> Signed-off-by: Zhiyuan Lv <zhiyuan.lv@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_vgpu.h')
-rw-r--r--drivers/gpu/drm/i915/i915_vgpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_vgpu.h b/drivers/gpu/drm/i915/i915_vgpu.h
index 3ed01a7ac48e..0db9ccf32605 100644
--- a/drivers/gpu/drm/i915/i915_vgpu.h
+++ b/drivers/gpu/drm/i915/i915_vgpu.h
@@ -80,6 +80,10 @@ struct vgt_if {
#define vgtif_reg(x) \
(VGT_PVINFO_PAGE + (long)&((struct vgt_if *)NULL)->x)
+/* vGPU display status to be used by the host side */
+#define VGT_DRV_DISPLAY_NOT_READY 0
+#define VGT_DRV_DISPLAY_READY 1 /* ready for display switch */
+
extern void i915_check_vgpu(struct drm_device *dev);
extern int intel_vgt_balloon(struct drm_device *dev);
extern void intel_vgt_deballoon(void);