From patchwork Wed Mar 23 11:38:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lionel Landwerlin X-Patchwork-Id: 8649321 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 E21A09F36E for ; Wed, 23 Mar 2016 11:38:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1A02F203B0 for ; Wed, 23 Mar 2016 11:38:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1934920340 for ; Wed, 23 Mar 2016 11:38:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BFD56E845; Wed, 23 Mar 2016 11:38:20 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F6EB6E842 for ; Wed, 23 Mar 2016 11:38:17 +0000 (UTC) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP; 23 Mar 2016 04:38:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,382,1455004800"; d="scan'208";a="71754806" Received: from twilberg-mobl3.ger.corp.intel.com (HELO ivy.ger.corp.intel.com) ([10.252.35.168]) by fmsmga004.fm.intel.com with ESMTP; 23 Mar 2016 04:38:16 -0700 From: Lionel Landwerlin To: intel-gfx@lists.freedesktop.org Date: Wed, 23 Mar 2016 11:38:06 +0000 Message-Id: <1458733090-25768-4-git-send-email-lionel.g.landwerlin@intel.com> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1458733090-25768-1-git-send-email-lionel.g.landwerlin@intel.com> References: <1458733090-25768-1-git-send-email-lionel.g.landwerlin@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 3/7] lib/igt_kms: don't store rotation property id twice 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 Now that we load all properties regardless of atomic, the rotation property id is redundant. Signed-off-by: Lionel Landwerlin --- lib/igt_kms.c | 9 ++++----- lib/igt_kms.h | 4 +--- tests/kms_rotation_crc.c | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 3321738..c82ba3f 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1219,9 +1219,7 @@ void igt_display_init(igt_display_t *display, int drm_fd) get_plane_property(display->drm_fd, drm_plane->plane_id, "rotation", - &plane->rotation_property, - &prop_value, - NULL); + NULL, &prop_value, NULL); plane->rotation = (igt_rotation_t)prop_value; } @@ -1661,8 +1659,9 @@ static int igt_drm_plane_commit(igt_plane_t *plane, plane->size_changed = false; if (plane->rotation_changed) { - ret = igt_plane_set_property(plane, plane->rotation_property, - plane->rotation); + ret = igt_plane_set_property(plane, + plane->properties[IGT_PLANE_ROTATION], + plane->rotation); plane->rotation_changed = false; CHECK_RETURN(ret, fail_on_error); diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 9f04f72..ac2ca11 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -235,8 +235,6 @@ typedef struct { drmModePlane *drm_plane; struct igt_fb *fb; - uint32_t rotation_property; - /* position within pipe_src_w x pipe_src_h */ int crtc_x, crtc_y; /* size within pipe_src_w x pipe_src_h */ @@ -314,7 +312,7 @@ bool igt_pipe_get_property(igt_pipe_t *pipe, const char *name, static inline bool igt_plane_supports_rotation(igt_plane_t *plane) { - return plane->rotation_property != 0; + return plane->properties[IGT_PLANE_ROTATION] != 0; } void igt_pipe_set_degamma_lut(igt_pipe_t *pipe, void *ptr, size_t length); diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index f94f8f1..6a92d56 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -368,7 +368,7 @@ static void test_plane_rotation_ytiled_obj(data_t *data, enum igt_plane plane_ty drmModeObjectSetProperty(fd, plane->drm_plane->plane_id, DRM_MODE_OBJECT_PLANE, - plane->rotation_property, + plane->properties[IGT_PLANE_ROTATION], plane->rotation); ret = igt_display_try_commit2(display, commit); @@ -457,7 +457,7 @@ static void test_plane_rotation_exhaust_fences(data_t *data, enum igt_plane plan drmModeObjectSetProperty(fd, plane->drm_plane->plane_id, DRM_MODE_OBJECT_PLANE, - plane->rotation_property, + plane->properties[IGT_PLANE_ROTATION], plane->rotation); ret = igt_display_try_commit2(display, commit); if (ret) {