From patchwork Mon Sep 8 11:12:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 4861291 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 889C5C0338 for ; Mon, 8 Sep 2014 11:12:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 416DE20117 for ; Mon, 8 Sep 2014 11:12:25 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D6CF8200E5 for ; Mon, 8 Sep 2014 11:12:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E2AC6E279; Mon, 8 Sep 2014 04:12:23 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 18F496E279 for ; Mon, 8 Sep 2014 04:12:21 -0700 (PDT) Received: by mail-wg0-f52.google.com with SMTP id x13so1698126wgg.23 for ; Mon, 08 Sep 2014 04:12:21 -0700 (PDT) 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; bh=r06Ij+5QK+FjatF965lqUmEQ7ITrnnaFnJ9AdUuK1bM=; b=NWbevlXh28wvdoFBrt0UUsSqnnQpE0uRcZjf3toaONktQ60DSeF26TM+UA91D5mVeR qi9PK7ZHP+Uq2OW3KdOuVNQDca5ZGFtUIGMBH9BTlve1FavFOCxT7Pr/XHh36W+2zhIv 4zVoJrTiJPDevb8TQrI6mgSctgVIBDDVDrb9r0WNSQcf32H6YDEnX3hBQY4YViBDzEyG FKo11ujrc5vunTtlnCxo8XEOkBe9pSCoa/t0pI/Kdoh9cKBHW7Ge1fg/VTiYqmnZBYe+ wdhyWz5+xZErAA0O7a0SrOWu7QiUoVFbWHo935XVpoLz1m6xwRUh73rFI0HtgKXD0/d+ U3yQ== X-Gm-Message-State: ALoCoQkK6v852O2485aFqHneFvbZ7Z2tlqMEHzRht+2vW4TgmclyoR6Fn67jvKbkKAt3G2g5v16A X-Received: by 10.180.218.99 with SMTP id pf3mr8243006wic.19.1410174741031; Mon, 08 Sep 2014 04:12:21 -0700 (PDT) Received: from pistachio.icx.intel.com ([83.217.123.106]) by mx.google.com with ESMTPSA id a5sm10751211wje.17.2014.09.08.04.12.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Sep 2014 04:12:20 -0700 (PDT) From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Mon, 8 Sep 2014 12:12:21 +0100 Message-Id: <1410174741-13649-1-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [Intel-gfx] [PATCH i-g-t] lib: included igt_edid.h in igt_kms.c X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 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=-6.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Include the generic_edid array inside igt_kms.c to avoid having to include it separately in tests. This also means it can be included in the i-g-t kms section of the documentation. Signed-off-by: Thomas Wood --- docs/reference/intel-gpu-tools/Makefile.am | 3 ++- docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml | 1 - lib/igt_edid.h | 2 +- lib/igt_kms.c | 2 ++ lib/igt_kms.h | 17 +++++++++++++++++ tests/kms_3d.c | 1 - tests/kms_force_connector.c | 1 - 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/docs/reference/intel-gpu-tools/Makefile.am b/docs/reference/intel-gpu-tools/Makefile.am index 3368e3e..05f604f 100644 --- a/docs/reference/intel-gpu-tools/Makefile.am +++ b/docs/reference/intel-gpu-tools/Makefile.am @@ -60,7 +60,8 @@ EXTRA_HFILES= # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code IGNORE_HFILES=gen6_render.h gen7_media.h gen7_render.h gen8_media.h \ gen8_render.h i830_reg.h i915_3d.h i915_pciids.h i915_reg.h \ - intel_reg.h debug.h instdone.h media_fill.h rendercopy.h + igt_edid.h intel_reg.h debug.h instdone.h media_fill.h \ + rendercopy.h # Images to copy into HTML directory. # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png diff --git a/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml b/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml index 3d9caf8..68ca8d4 100644 --- a/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml +++ b/docs/reference/intel-gpu-tools/intel-gpu-tools-docs.xml @@ -25,7 +25,6 @@ - diff --git a/lib/igt_edid.h b/lib/igt_edid.h index 27373b7..7711841 100644 --- a/lib/igt_edid.h +++ b/lib/igt_edid.h @@ -29,7 +29,7 @@ #define EDID_LENGTH 128 -static const unsigned char generic_edid[MAX_EDIDS][EDID_LENGTH] = { +const unsigned char generic_edid[MAX_EDIDS][EDID_LENGTH] = { { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x31, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 3a850f1..26794f2 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -43,6 +43,8 @@ #include "igt_aux.h" #include "intel_chipset.h" +#include "igt_edid.h" + /* * There hasn't been a release of libdrm containing these #define's yet, so * copy them here to allow compilation to succeed in the mean time. diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 921afef..23f73b1 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -127,6 +127,12 @@ enum kmstest_force_connector_state { FORCE_CONNECTOR_OFF }; +/** + * EDID_LENGTH: + * + * Length of an EDID block, in bytes. + */ +#define EDID_LENGTH 128 /** * kmstest_generic_edid: @@ -136,6 +142,8 @@ enum kmstest_force_connector_state { * @EDID_WSXGA: 1680x1050 * @EDID_FHD: 1920x1080 * @MAX_EDIDS: Size of #generic_edid array + * + * Index of items in the #generic_edid array. */ enum kmstest_generic_edid { EDID_XGA, /* 1024x768 */ @@ -147,6 +155,15 @@ enum kmstest_generic_edid { MAX_EDIDS }; +/** + * generic_edid: + * + * An array of generic EDID blocks, with each item corresponding to the entries + * in #kmstest_generic_edid. + */ +const unsigned char generic_edid[MAX_EDIDS][EDID_LENGTH]; + + bool kmstest_force_connector(int fd, drmModeConnector *connector, enum kmstest_force_connector_state state); void kmstest_edid_add_3d(const unsigned char *edid, size_t length, unsigned char *new_edid_ptr[], size_t *new_length); diff --git a/tests/kms_3d.c b/tests/kms_3d.c index c11873b..9bf252c 100644 --- a/tests/kms_3d.c +++ b/tests/kms_3d.c @@ -25,7 +25,6 @@ #include "igt_core.h" #include "igt_kms.h" #include "drmtest.h" -#include "igt_edid.h" igt_simple_main { diff --git a/tests/kms_force_connector.c b/tests/kms_force_connector.c index 7dba68a..adb73a0 100644 --- a/tests/kms_force_connector.c +++ b/tests/kms_force_connector.c @@ -25,7 +25,6 @@ #include "igt_core.h" #include "igt_kms.h" #include "drmtest.h" -#include "igt_edid.h" int main (int argc, char **argv)