diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2018-03-22 12:26:37 +0300 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2018-03-22 14:08:23 +0300 |
commit | c3b9b165734492b7e42bdd898aba93e1120f9084 (patch) | |
tree | 580fb2c15ca29c31102048751608974fa01ecacb /drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | |
parent | bf833fd36f9bdc2c86e1fdc90318e4c99b452472 (diff) | |
download | linux-c3b9b165734492b7e42bdd898aba93e1120f9084.tar.xz |
drm/vmwgfx: Improve on hibernation
Make it possible to hibernate also with masters that don't switch VT at
hibernation time. We save and restore modesetting state unless fbdev is
active and enabled at hibernation time.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.h')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h index 5c2a36ae1bbe..0bf28a6528bf 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h @@ -425,6 +425,7 @@ struct vmw_private { struct vmw_framebuffer *implicit_fb; struct mutex global_kms_state_mutex; spinlock_t cursor_lock; + struct drm_atomic_state *suspend_state; /* * Context and surface management. @@ -498,6 +499,7 @@ struct vmw_private { struct notifier_block pm_nb; bool suspended; bool refuse_hibernation; + bool suspend_locked; struct mutex release_mutex; atomic_t num_fifo_resources; @@ -909,6 +911,7 @@ int vmw_fb_init(struct vmw_private *vmw_priv); int vmw_fb_close(struct vmw_private *dev_priv); int vmw_fb_off(struct vmw_private *vmw_priv); int vmw_fb_on(struct vmw_private *vmw_priv); +void vmw_fb_refresh(struct vmw_private *vmw_priv); /** * Kernel modesetting - vmwgfx_kms.c @@ -945,6 +948,8 @@ int vmw_kms_present(struct vmw_private *dev_priv, int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); void vmw_kms_legacy_hotspot_clear(struct vmw_private *dev_priv); +int vmw_kms_suspend(struct drm_device *dev); +int vmw_kms_resume(struct drm_device *dev); int vmw_dumb_create(struct drm_file *file_priv, struct drm_device *dev, |