aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-12-06 18:20:40 -0500
committerDave Airlie <airlied@redhat.com>2011-01-04 22:45:30 -0500
commit5bcf719b7db0f9366cedaf102b081f99b1c325ae (patch)
tree6929d42e1d61a3b1bd7b130a37a80b99718e14aa /include/drm/drmP.h
parent8d608aa6295242fe4c4b6105b8c59c6a5b232d89 (diff)
drm/switcheroo: track state of switch in drivers.
We need to track the state of the switch in drivers, so that after s/r we don't resume the card we've explicitly switched off before. Also don't allow a userspace open to occur if we've switched the gpu off. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r--include/drm/drmP.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 0f14f94ed8f4..a4694c610330 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1121,9 +1121,13 @@ struct drm_device {
1121 spinlock_t object_name_lock; 1121 spinlock_t object_name_lock;
1122 struct idr object_name_idr; 1122 struct idr object_name_idr;
1123 /*@} */ 1123 /*@} */
1124 1124 int switch_power_state;
1125}; 1125};
1126 1126
1127#define DRM_SWITCH_POWER_ON 0
1128#define DRM_SWITCH_POWER_OFF 1
1129#define DRM_SWITCH_POWER_CHANGING 2
1130
1127static __inline__ int drm_core_check_feature(struct drm_device *dev, 1131static __inline__ int drm_core_check_feature(struct drm_device *dev,
1128 int feature) 1132 int feature)
1129{ 1133{