mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-07-24 02:16:03 +00:00
kms_flip: Set everything to zero to disable a CRTC
Just setting fb=0 is not enough as the kernel thinks userspace is insane. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
93550043ca
commit
a60f930018
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user