From patchwork Tue Apr 7 08:29:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sonika.jindal@intel.com X-Patchwork-Id: 6167741 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B3A0D9F389 for ; Tue, 7 Apr 2015 08:37:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA7D720353 for ; Tue, 7 Apr 2015 08:37:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D57D920268 for ; Tue, 7 Apr 2015 08:37:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6E16D6E528; Tue, 7 Apr 2015 01:37:31 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id D47586E528 for ; Tue, 7 Apr 2015 01:37:29 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 07 Apr 2015 01:37:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,536,1422950400"; d="scan'208";a="709780844" Received: from sonikaji-desktop.iind.intel.com ([10.223.25.81]) by orsmga002.jf.intel.com with ESMTP; 07 Apr 2015 01:37:28 -0700 From: Sonika Jindal To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Apr 2015 13:59:03 +0530 Message-Id: <1428395344-12303-1-git-send-email-sonika.jindal@intel.com> X-Mailer: git-send-email 1.7.10.4 Subject: [Intel-gfx] [PATCH 1/2] lib/igt_kms: Let set_property return the result X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Return the return value of the set_property ioctl and add check for the failure. Signed-off-by: Sonika Jindal Reviewed-by: Tvrtko Ursulin --- 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;