From patchwork Wed Apr 15 10:07:27 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: 6219791 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 C605FBF4A6 for ; Wed, 15 Apr 2015 10:16:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F0942034F for ; Wed, 15 Apr 2015 10:16:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 90DAF2035E for ; Wed, 15 Apr 2015 10:16:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BFB5872102; Wed, 15 Apr 2015 03:16:02 -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 28F6772102 for ; Wed, 15 Apr 2015 03:16:02 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 15 Apr 2015 03:16:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,581,1422950400"; d="scan'208";a="713987032" Received: from sonikaji-desktop.iind.intel.com ([10.223.25.81]) by orsmga002.jf.intel.com with ESMTP; 15 Apr 2015 03:16:00 -0700 From: Sonika Jindal To: intel-gfx@lists.freedesktop.org Date: Wed, 15 Apr 2015 15:37:27 +0530 Message-Id: <1429092447-4841-1-git-send-email-sonika.jindal@intel.com> X-Mailer: git-send-email 1.7.10.4 Subject: [Intel-gfx] [PATCH] kms_rotation_crc: Changing as per DRM rotation 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 DRM rotation is counter clockwise. So changing the test accordingly. Signed-off-by: Sonika Jindal --- tests/kms_rotation_crc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index 48afaa1..1054a75 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -81,19 +81,20 @@ paint_squares(data_t *data, struct igt_fb *fb, drmModeModeInfo *mode, * "rotation" is used for creating ref rotated fb and * "data->rotation" is used to determine the required size * while creating unrotated fb. + * Also, drm rotation is counter clockwise. */ - if (rotation == IGT_ROTATION_90) { + if (rotation == IGT_ROTATION_270) { /* Paint 4 squares with width == height in Blue, Red, - Green, White Clockwise order to look like 90 degree rotated*/ + Green, White Clockwise order to look like 270 degree rotated*/ w = h = mode->vdisplay; 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) { + } else if (rotation == IGT_ROTATION_90) { /* Paint 4 squares with width == height in Green, White, - Blue, Red Clockwise order to look like 270 degree rotated*/ + Blue, Red Clockwise order to look like 90 degree rotated*/ w = h = mode->vdisplay; 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); @@ -389,6 +390,7 @@ igt_main test_plane_rotation(&data, IGT_PLANE_CURSOR); } + /* Rotation is counter clockwise */ igt_subtest_f("primary-rotation-90") { igt_require(gen >= 9); data.rotation = IGT_ROTATION_90;