[Intel-gfx] [PATCH i-g-t] lib/kms: Pass fb_id=0 to setcrtc in kmstest_unset_all_crtcs()

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Wed Nov 11 10:51:07 PST 2015


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

The setcrtc ioctl ignores the fb_id when there's no mode specified.
So passing -1 doens't make much sense. When there is a more, -1 means
to preserve the current fb.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/igt_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 51d735d..d6c65f0 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -824,7 +824,7 @@ void kmstest_unset_all_crtcs(int drm_fd, drmModeResPtr resources)
 	int i, rc;
 
 	for (i = 0; i < resources->count_crtcs; i++) {
-		rc = drmModeSetCrtc(drm_fd, resources->crtcs[i], -1, 0, 0, NULL,
+		rc = drmModeSetCrtc(drm_fd, resources->crtcs[i], 0, 0, 0, NULL,
 				    0, NULL);
 		igt_assert(rc == 0);
 	}
-- 
2.4.10



More information about the Intel-gfx mailing list