public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <przanoni@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: [PATCH 1/6] igt_kms: don't get drmModeRes just to free it later
Date: Thu,  7 Aug 2014 10:09:02 -0300	[thread overview]
Message-ID: <1407416947-2282-1-git-send-email-przanoni@gmail.com> (raw)

From: Paulo Zanoni <paulo.r.zanoni@intel.com>

Stress testing malloc is not our goal :)

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@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

             reply	other threads:[~2014-08-07 13:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07 13:09 Paulo Zanoni [this message]
2014-08-07 13:09 ` [PATCH 2/6] igt_kms: pass drm_fd instead of igt_display_t on some functions Paulo Zanoni
2014-08-07 13:09 ` [PATCH 3/6] igt_kms: optionally return the property from get_property Paulo Zanoni
2014-08-07 13:09 ` [PATCH 4/6] igt_kms: document and export igt_get_property() Paulo Zanoni
2014-08-07 14:43   ` Daniel Vetter
2014-08-07 13:09 ` [PATCH 5/6] tests/pm_rpm: use igt_get_property() Paulo Zanoni
2014-08-07 13:09 ` [PATCH 6/6] igt_kms: add igt_unset_all_crtcs() Paulo Zanoni
2014-08-07 14:45   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1407416947-2282-1-git-send-email-przanoni@gmail.com \
    --to=przanoni@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox