summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSonika Jindal <sonika.jindal@intel.com>2015-04-07 13:59:03 +0530
committerThomas Wood <thomas.wood@intel.com>2015-04-22 18:00:42 +0100
commit7ef80c0a980bc6b2cb58de7aec443b343ac0d33e (patch)
treec124ef76d3c93651dae06a6b3941f9676c22719f /lib
parent7aeecc197bcf586fe5b8e2091cf3e647991382f9 (diff)
lib/igt_kms: Let set_property return the result
Return the return value of the set_property ioctl and add check for the failure. Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_kms.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 78918dd2..b7d1e904 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -930,13 +930,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);
}
@@ -1390,10 +1390,11 @@ static int igt_drm_plane_commit(igt_plane_t *plane,
plane->size_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;