From patchwork Fri May 22 10:00:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 6463541 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 86DCAC0020 for ; Fri, 22 May 2015 10:00:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3BFD2041A for ; Fri, 22 May 2015 10:00:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A4711203ED for ; Fri, 22 May 2015 10:00:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE7656EA50; Fri, 22 May 2015 03:00:52 -0700 (PDT) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 454546EA50 for ; Fri, 22 May 2015 03:00:51 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP; 22 May 2015 03:00:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,474,1427785200"; d="scan'208";a="698811210" Received: from tursulin-linux.isw.intel.com ([10.102.226.59]) by orsmga001.jf.intel.com with ESMTP; 22 May 2015 03:00:47 -0700 From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Fri, 22 May 2015 11:00:45 +0100 Message-Id: <1432288845-26160-1-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.4.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH i-g-t] kms_rotation_crc: Update rotation direction for kernel changes 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: , 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 commit 1e8df16778b0d8fd8102b3ee799b028f8f961089 Author: Sonika Jindal Date: Wed May 20 13:40:48 2015 +0530 drm/i915/skl: Swapping 90 and 270 to be compliant with Xrand Changed the rotation direction so IGT needs to be told. Signed-off-by: Tvrtko Ursulin Cc: Ville Syrjälä Cc: Sonika Jindal --- tests/kms_rotation_crc.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index e16056d..3fd77c4 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -61,21 +61,19 @@ paint_squares(data_t *data, drmModeModeInfo *mode, igt_rotation_t rotation, } if (rotation == IGT_ROTATION_90) { - /* Paint 4 squares with width == height in Blue, Red, - Green, White Clockwise order to look like 90 degree rotated*/ - igt_paint_color(cr, 0, 0, w / 2, h / 2, 0.0, 0.0, 1.0); - igt_paint_color(cr, w / 2, 0, w / 2, h / 2, 1.0, 0.0, 0.0); - igt_paint_color(cr, 0, h / 2, w / 2, h / 2, 1.0, 1.0, 1.0); - igt_paint_color(cr, w / 2, h / 2, w / 2, h / 2, 0.0, 1.0, 0.0); - - } else if (rotation == IGT_ROTATION_270) { /* Paint 4 squares with width == height in Green, White, Blue, Red Clockwise order to look like 270 degree rotated*/ igt_paint_color(cr, 0, 0, w / 2, h / 2, 0.0, 1.0, 0.0); igt_paint_color(cr, w / 2, 0, w / 2, h / 2, 1.0, 1.0, 1.0); igt_paint_color(cr, 0, h / 2, w / 2, h / 2, 1.0, 0.0, 0.0); igt_paint_color(cr, w / 2, h / 2, w / 2, h / 2, 0.0, 0.0, 1.0); - + } else if (rotation == IGT_ROTATION_270) { + /* Paint 4 squares with width == height in Blue, Red, + Green, White Clockwise order to look like 90 degree rotated*/ + igt_paint_color(cr, 0, 0, w / 2, h / 2, 0.0, 0.0, 1.0); + igt_paint_color(cr, w / 2, 0, w / 2, h / 2, 1.0, 0.0, 0.0); + igt_paint_color(cr, 0, h / 2, w / 2, h / 2, 1.0, 1.0, 1.0); + igt_paint_color(cr, w / 2, h / 2, w / 2, h / 2, 0.0, 1.0, 0.0); } else { /* Paint with 4 squares of Red, Green, White, Blue Clockwise */ igt_paint_color(cr, 0, 0, w / 2, h / 2, 1.0, 0.0, 0.0);