From patchwork Fri Nov 28 16:22:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 5404931 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8900BBEEBA for ; Fri, 28 Nov 2014 16:22:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A9EB7201C0 for ; Fri, 28 Nov 2014 16:22:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C4E3F2011B for ; Fri, 28 Nov 2014 16:22:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDF8A6EF0A; Fri, 28 Nov 2014 08:22:30 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DE9E6EF0A for ; Fri, 28 Nov 2014 08:22:29 -0800 (PST) Received: by mail-wg0-f51.google.com with SMTP id k14so9117505wgh.38 for ; Fri, 28 Nov 2014 08:22:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=gdQcSZno5rf9grUzMbK5zxxjRdvWddPZ7zMZP+4xKk8=; b=WSXS63ahsnkDCasBW9/nJE1Kwuipbmq6jbt43wHGMDdhIhRwVjr7SQ7vQj9xhEarCE H10JtOsiHC/ZWD9z/8IZdI8PYnngByQ2M1L0uqiyHCg7GcxgTVW12CXb7RxXBC2u5MJm qdJRdxMjfluzyz1NZClc+XOP9tb9/3qCKz9lrwsEaYRKHdWpWlTsaIWODA/EqY2j2HGk fgy34TfhjkcDlIYDHsERMBrp1l9XVbxLINWrBmG2moPaMauJglqOnRHmrVi5Pa2yOm+X D9S4w3Lr1/k1CIJ6okE9HM07LzKUWZ34EBr8d+aX4pOVobuhxWqFoXIxYAyz2KGok4iT TutQ== X-Gm-Message-State: ALoCoQm0bAkzNj44jtCh8Mpm+Q1FH88OO1UohO6mCWiNRljCzmtpnPuPMMR9RI7JiVIr1cKXG/27 X-Received: by 10.194.222.98 with SMTP id ql2mr2503141wjc.36.1417191749055; Fri, 28 Nov 2014 08:22:29 -0800 (PST) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id gy8sm30170135wib.3.2014.11.28.08.22.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Nov 2014 08:22:28 -0800 (PST) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Fri, 28 Nov 2014 16:22:23 +0000 Message-Id: <1417191744-5767-3-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1417191744-5767-1-git-send-email-thomas.wood@intel.com> References: <1417191744-5767-1-git-send-email-thomas.wood@intel.com> Subject: [Intel-gfx] [PATCH i-g-t 3/4] tests: use base edid 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 Use the base edid for testing, which includes several different display modes. Signed-off-by: Thomas Wood --- tests/kms_3d.c | 4 ++-- tests/kms_force_connector.c | 31 ++++++++++++------------------- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/tests/kms_3d.c b/tests/kms_3d.c index b1712b2..6b1c1b3 100644 --- a/tests/kms_3d.c +++ b/tests/kms_3d.c @@ -58,7 +58,7 @@ igt_simple_main } igt_require(connector); - kmstest_edid_add_3d(generic_edid[EDID_FHD], EDID_LENGTH, &edid, + kmstest_edid_add_3d(igt_kms_get_base_edid(), EDID_LENGTH, &edid, &length); kmstest_force_edid(drm_fd, connector, edid, length); @@ -75,7 +75,7 @@ igt_simple_main mode_count++; } - igt_assert(mode_count == 13); + igt_assert(mode_count == 15); /* set 3D modes */ igt_info("Testing:\n"); diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c index d446eaa..4a50791 100644 --- a/tests/kms_force_connector.c +++ b/tests/kms_force_connector.c @@ -27,6 +27,9 @@ #include "drmtest.h" #include "igt_edid.h" +#define CHECK_MODE(m, h, w, r) igt_assert(m.hdisplay == h && m.vdisplay == w \ + && m.vrefresh == r) + igt_main { /* force the VGA output and test that it worked */ @@ -93,25 +96,15 @@ igt_main /* test edid forcing */ kmstest_force_edid(drm_fd, vga_connector, - generic_edid[EDID_FHD], EDID_LENGTH); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - - igt_assert(temp->count_modes == 1); - igt_assert(temp->modes[0].vrefresh == 60 - && temp->modes[0].hdisplay == 1920 - && temp->modes[0].vdisplay == 1080); - - drmModeFreeConnector(temp); - - /* custom edid */ - kmstest_force_edid(drm_fd, vga_connector, - generic_edid[EDID_WSXGA], EDID_LENGTH); - temp = drmModeGetConnector(drm_fd, vga_connector->connector_id); - - igt_assert(temp->count_modes == 1); - igt_assert(temp->modes[0].vrefresh == 60 - && temp->modes[0].hdisplay == 1680 - && temp->modes[0].vdisplay == 1050); + igt_kms_get_base_edid(), EDID_LENGTH); + temp = drmModeGetConnector(drm_fd, + vga_connector->connector_id); + + CHECK_MODE(temp->modes[0], 1920, 1080, 60); + CHECK_MODE(temp->modes[1], 1280, 720, 60); + CHECK_MODE(temp->modes[2], 1024, 768, 60); + CHECK_MODE(temp->modes[3], 800, 600, 60); + CHECK_MODE(temp->modes[4], 640, 480, 60); drmModeFreeConnector(temp);