From: Chris Wilson Date: Thu, 29 Aug 2013 16:55:13 +0000 (+0100) Subject: kms_flip: Set everything to zero to disable a CRTC X-Git-Tag: intel-gpu-tools-1.4~62 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a60f9300181496e5539f6914c9074e6d1aed0fe3;p=platform%2Fupstream%2Fintel-gpu-tools.git 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 --- diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 0b8a0a8..9f02442 100644 --- 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;