From patchwork Tue May 26 04:48:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: sonika.jindal@intel.com X-Patchwork-Id: 6477801 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 D518A9F1CC for ; Tue, 26 May 2015 04:48:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB741204D5 for ; Tue, 26 May 2015 04:48:48 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A4453204D3 for ; Tue, 26 May 2015 04:48:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B025F88C0A; Mon, 25 May 2015 21:48:45 -0700 (PDT) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id C312088C0A for ; Mon, 25 May 2015 21:48:44 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 25 May 2015 21:48:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,495,1427785200"; d="scan'208";a="731597896" Received: from pgsmsx102.gar.corp.intel.com ([10.221.44.80]) by fmsmga002.fm.intel.com with ESMTP; 25 May 2015 21:48:43 -0700 Received: from kmsmsx154.gar.corp.intel.com (172.21.73.14) by PGSMSX102.gar.corp.intel.com (10.221.44.80) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 26 May 2015 12:48:42 +0800 Received: from bgsmsx151.gar.corp.intel.com (10.224.48.42) by KMSMSX154.gar.corp.intel.com (172.21.73.14) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 26 May 2015 12:48:41 +0800 Received: from bgsmsx104.gar.corp.intel.com ([169.254.5.28]) by BGSMSX151.gar.corp.intel.com ([169.254.3.49]) with mapi id 14.03.0224.002; Tue, 26 May 2015 10:18:40 +0530 From: "Jindal, Sonika" To: Tvrtko Ursulin , "Intel-gfx@lists.freedesktop.org" Thread-Topic: [PATCH i-g-t] kms_rotation_crc: Update rotation direction for kernel changes Thread-Index: AQHQlHY5b/JFm/l1+kKxwllYQqv4Bp2NtAiQ Date: Tue, 26 May 2015 04:48:40 +0000 Message-ID: <000C66961D35964B9714611E548C10AD0C2073FB@BGSMSX104.gar.corp.intel.com> References: <1432288845-26160-1-git-send-email-tvrtko.ursulin@linux.intel.com> In-Reply-To: <1432288845-26160-1-git-send-email-tvrtko.ursulin@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.223.10.10] MIME-Version: 1.0 Subject: Re: [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=-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 Thanks for sending this.. I realized that I had a patch for this which I never sent :) Reviewed-by: Sonika Jindal -----Original Message----- From: Tvrtko Ursulin [mailto:tvrtko.ursulin@linux.intel.com] Sent: Friday, May 22, 2015 3:31 PM To: Intel-gfx@lists.freedesktop.org Cc: Ursulin, Tvrtko; Ville Syrjälä; Jindal, Sonika Subject: [PATCH i-g-t] kms_rotation_crc: Update rotation direction for kernel changes 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(-) -- 2.4.0 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);