projects
/
platform
/
upstream
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9355004
)
kms_flip: Set everything to zero to disable a CRTC
author
Chris Wilson
<chris@chris-wilson.co.uk>
Thu, 29 Aug 2013 16:55:13 +0000
(17:55 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Thu, 29 Aug 2013 17:04:11 +0000
(18:04 +0100)
Just setting fb=0 is not enough as the kernel thinks userspace is
insane.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tests/kms_flip.c
patch
|
blob
|
history
diff --git
a/tests/kms_flip.c
b/tests/kms_flip.c
index
0b8a0a8
..
9f02442
100644
(file)
--- a/
tests/kms_flip.c
+++ b/
tests/kms_flip.c
@@
-718,9
+718,17
@@
static int set_mode(struct test_output *o, int fb, int x, int y)
int n;
for (n = 0; n < o->count; n++) {
- if (drmModeSetCrtc(drm_fd, o->_crtc[n], fb,
- x, y, &o->_connector[n], 1, &o->kmode[n]))
- return -1;
+ if (fb == 0) {
+ if (drmModeSetCrtc(drm_fd, o->_crtc[n],
+ 0, 0, 0,
+ 0, 0, 0))
+ return -1;
+ } else {
+ if (drmModeSetCrtc(drm_fd, o->_crtc[n],
+ fb, x, y,
+ &o->_connector[n], 1, &o->kmode[n]))
+ return -1;
+ }
}
return 0;