[Intel-gfx] [PATCH 1/6] igt_kms: don't get drmModeRes just to free it later
Paulo Zanoni
przanoni at gmail.com
Thu Aug 7 15:09:02 CEST 2014
From: Paulo Zanoni <paulo.r.zanoni at intel.com>
Stress testing malloc is not our goal :)
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
---
lib/igt_kms.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 740b5dd..8ab729b 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -276,21 +276,11 @@ void igt_set_vt_graphics_mode(void)
int kmstest_get_connector_default_mode(int drm_fd, drmModeConnector *connector,
drmModeModeInfo *mode)
{
- drmModeRes *resources;
int i;
- resources = drmModeGetResources(drm_fd);
- if (!resources) {
- perror("drmModeGetResources failed");
-
- return -1;
- }
-
if (!connector->count_modes) {
fprintf(stderr, "no modes for connector %d\n",
connector->connector_id);
- drmModeFreeResources(resources);
-
return -1;
}
@@ -303,8 +293,6 @@ int kmstest_get_connector_default_mode(int drm_fd, drmModeConnector *connector,
}
}
- drmModeFreeResources(resources);
-
return 0;
}
--
2.0.1
More information about the Intel-gfx
mailing list