summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-07-23 21:43:02 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-07-23 21:43:02 +0100
commitbc50dff844b97e655483c9eaf0effeec6a9ab4dd (patch)
tree56618342d09263801cd342c3d033710682e7e78d /src/sna/kgem.h
parent8d95e90b7b4bf5d6bae5443f92d77d30f4443f24 (diff)
sna: Disable rendering with the DRM device whilst away from VT
As root, X gets away with many things, including submitting commands to the DRM device whilst it is no longer authorised (i.e. when it has relinquished master to another client across a VT switch). In the non-root future, if we attempt to use the device whilst unauthorized the rendering will be lost and we will mark the device as unusable. So flush our render queue to the device around a VT switch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index be9b7e88..8cf596c1 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -121,7 +121,7 @@ enum {
struct kgem {
int fd;
- int wedged;
+ unsigned wedged;
unsigned gen;
uint32_t unique_id;
@@ -761,6 +761,7 @@ struct kgem_bo *kgem_create_buffer_2d(struct kgem *kgem,
bool kgem_buffer_is_inplace(struct kgem_bo *bo);
void kgem_buffer_read_sync(struct kgem *kgem, struct kgem_bo *bo);
+int kgem_is_wedged(struct kgem *kgem);
void kgem_throttle(struct kgem *kgem);
#define MAX_INACTIVE_TIME 10
bool kgem_expire_cache(struct kgem *kgem);