All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sonika Jindal <sonika.jindal@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] lib/igt_kms: Let set_property return the result
Date: Tue,  7 Apr 2015 13:59:03 +0530	[thread overview]
Message-ID: <1428395344-12303-1-git-send-email-sonika.jindal@intel.com> (raw)

Return the return value of the set_property ioctl and add check for
the failure.

Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
 lib/igt_kms.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 6cb1f08..14abae8 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -927,13 +927,13 @@ get_plane_property(int drm_fd, uint32_t plane_id, const char *name,
 				    name, prop_id, value, prop);
 }
 
-static void
+static int
 igt_plane_set_property(igt_plane_t *plane, uint32_t prop_id, uint64_t value)
 {
 	igt_pipe_t *pipe = plane->pipe;
 	igt_display_t *display = pipe->display;
 
-	drmModeObjectSetProperty(display->drm_fd, plane->drm_plane->plane_id,
+	return drmModeObjectSetProperty(display->drm_fd, plane->drm_plane->plane_id,
 				 DRM_MODE_OBJECT_PLANE, prop_id, value);
 }
 
@@ -1338,10 +1338,11 @@ static int igt_drm_plane_commit(igt_plane_t *plane,
 	plane->position_changed = false;
 
 	if (plane->rotation_changed) {
-		igt_plane_set_property(plane, plane->rotation_property,
+		ret = igt_plane_set_property(plane, plane->rotation_property,
 				       plane->rotation);
 
 		plane->rotation_changed = false;
+		CHECK_RETURN(ret, fail_on_error);
 	}
 
 	return 0;
-- 
1.7.10.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2015-04-07  8:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07  8:29 Sonika Jindal [this message]
2015-04-07  8:29 ` [PATCH 2/2] kms_rotation_crc: Adding test for 90/270 rotation Sonika Jindal
2015-04-21 11:54   ` Tvrtko Ursulin
2015-04-22  4:51     ` Jindal, Sonika
2015-04-22  9:34       ` Tvrtko Ursulin
2015-04-22 11:14         ` [PATCH] " Sonika Jindal
2015-04-22 13:37           ` Tvrtko Ursulin
2015-04-22 17:20             ` Thomas Wood
2015-04-21 10:40 ` [PATCH 1/2] lib/igt_kms: Let set_property return the result Tvrtko Ursulin

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=1428395344-12303-1-git-send-email-sonika.jindal@intel.com \
    --to=sonika.jindal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.