[Intel-gfx] [PATCH i-g-t 3/3] kms_flip: Reduce dmesg spam by not calling drmModeGetResources too much

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Apr 27 15:12:36 UTC 2016


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Configuration reported in drmModeGetResources is static - pass it
into kmstest_get_connector_config so it can be reused there.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
 tests/kms_flip.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index fec69254e4da..a85153fa3d52 100644
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1042,7 +1042,7 @@ static void connector_find_preferred_mode(uint32_t connector_id, int crtc_idx,
 {
 	struct kmstest_connector_config config;
 
-	if (!kmstest_get_connector_config(drm_fd, NULL,
+	if (!kmstest_get_connector_config(drm_fd, resources,
 					  connector_id, 1 << crtc_idx,
 					  &config)) {
 		o->mode_valid = 0;
@@ -1087,11 +1087,11 @@ static void connector_find_compatible_mode(int crtc_idx0, int crtc_idx1,
 	drmModeModeInfo *mode[2];
 	int n, m;
 
-	if (!kmstest_get_connector_config(drm_fd, NULL, o->_connector[0],
+	if (!kmstest_get_connector_config(drm_fd, resources, o->_connector[0],
 					  1 << crtc_idx0, &config[0]))
 		return;
 
-	if (!kmstest_get_connector_config(drm_fd, NULL, o->_connector[1],
+	if (!kmstest_get_connector_config(drm_fd, resources, o->_connector[1],
 					  1 << crtc_idx1, &config[1])) {
 		kmstest_free_connector_config(&config[0]);
 		return;
-- 
1.9.1



More information about the Intel-gfx mailing list