From patchwork Fri Oct 16 10:59:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 7414161 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 4A4099F443 for ; Fri, 16 Oct 2015 11:00:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5EAE620715 for ; Fri, 16 Oct 2015 11:00:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B8334206EB for ; Fri, 16 Oct 2015 10:59:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88DBB6E9FC; Fri, 16 Oct 2015 03:59:58 -0700 (PDT) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id C32AF6E9E5 for ; Fri, 16 Oct 2015 03:59:55 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 16 Oct 2015 03:59:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,688,1437462000"; d="scan'208";a="828433425" Received: from tursulin-linux.isw.intel.com ([10.102.226.89]) by fmsmga002.fm.intel.com with ESMTP; 16 Oct 2015 03:59:54 -0700 From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 16 Oct 2015 11:59:48 +0100 Message-Id: <1444993189-18645-2-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1444993189-18645-1-git-send-email-tvrtko.ursulin@linux.intel.com> References: <1444993189-18645-1-git-send-email-tvrtko.ursulin@linux.intel.com> Cc: Vivek Kasireddy Subject: [Intel-gfx] [PATCH i-g-t 2/3] lib/igt_kms: Set new rotation property before displaying 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=-3.2 required=5.0 tests=BAYES_00,HK_RANDOM_FROM, 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 From: Tvrtko Ursulin This is not really tested that much apart that it doesn't break kms_rotation_crc and it makes one new test case work. It only serves as proof of concept to demonstrate a particular bug. Signed-off-by: Tvrtko Ursulin Cc: Vivek Kasireddy Cc: Damien Lespiau --- lib/igt_kms.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 51d735d29970..5c9b358ae23f 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1316,6 +1316,14 @@ static int igt_drm_plane_commit(igt_plane_t *plane, igt_assert(igt_plane_supports_rotation(plane) || !plane->rotation_changed); + if (plane->rotation_changed) { + ret = igt_plane_set_property(plane, plane->rotation_property, + plane->rotation); + + plane->rotation_changed = false; + CHECK_RETURN(ret, fail_on_error); + } + fb_id = igt_plane_get_fb_id(plane); crtc_id = output->config.crtc->crtc_id; @@ -1377,14 +1385,6 @@ static int igt_drm_plane_commit(igt_plane_t *plane, plane->position_changed = false; plane->size_changed = false; - if (plane->rotation_changed) { - ret = igt_plane_set_property(plane, plane->rotation_property, - plane->rotation); - - plane->rotation_changed = false; - CHECK_RETURN(ret, fail_on_error); - } - return 0; }