From patchwork Mon Apr 18 11:42:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 8871611 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 7C7FABF29F for ; Mon, 18 Apr 2016 11:43:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E57020270 for ; Mon, 18 Apr 2016 11:43:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id B039E2012B for ; Mon, 18 Apr 2016 11:43:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02E816E5B0; Mon, 18 Apr 2016 11:43:32 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BE5F6E5AF for ; Mon, 18 Apr 2016 11:43:29 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id y144so23806296wmd.0 for ; Mon, 18 Apr 2016 04:43:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=Eii8A/qw+ZzYJJfMbARbvfHP/b5ui65MQ1CrQ7bTsqI=; b=OL/Nie4cAHKP6rX7QcEnPOxEfCJo8Ebw0dhzcH+VCnXOOdv+RRhx/7vRwSQhVvLHe5 418ZH5estttp6uIoNdG5nWeeWLkA21zUgeIp9Gpyv9xHiPxwwyUnfyLeLRQWs8/zcXZN ZPP718rNHbdGZ9YHqorzKB8Ygm9htUmYPkpc/W6eI9AzOBxY1n2SocD28lU5JI7dSPXk fRsph1NC1uywnkyieHRfa1mT2tgzWK3nGJ3VbChkS+yp0+iOTXV0OcvskRcRvUdeewqc OZlyHk85//anAsL+5hpDWyNdNCuY4zc9AH/spAmuWxbFx12nRjNqUpBG1EvowbHRQlsT 54Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=Eii8A/qw+ZzYJJfMbARbvfHP/b5ui65MQ1CrQ7bTsqI=; b=ll5s22TVaTTm+XXFPZEcQZ6qaVbPssuoKZ90bDwd7Ov29uMpZ0GbTgB7OO3M5uIqeG sgpVZhDbTZPzlcTc/y2T8gNYpi8Il+U1prcS63qWunPIA0OF1wxd3mwJL8w5uvOYmhp9 4fuej985/9Qz/9TU4hgFMvwpvKNPO1DUFHvYL/KIKjHlCT3OBBgk/7CuJVXzRW0vHSHP hX58wLNbhOAHZdW3BSh0jJqIw7c0FV+204xSzB1FFoE2ElItPrxT6VAvSS2w8f9NuHo2 DWh5SDfSNRt/rF03ddnGnWSKVwgFDhCO7TRbUnY8UrnCBixmwM9bArK/3LU8c+huDUXR t3bA== X-Gm-Message-State: AOPr4FXndzKLB0biijvkLEoCaOMHtAd4DvDf6pVrn8AUxT2i6uQgcon8JVx9sQ6uCQ0WIg== X-Received: by 10.194.142.147 with SMTP id rw19mr3147116wjb.31.1460979807986; Mon, 18 Apr 2016 04:43:27 -0700 (PDT) Received: from cizrna.lan ([109.72.12.68]) by smtp.gmail.com with ESMTPSA id a184sm26348430wma.3.2016.04.18.04.43.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Apr 2016 04:43:27 -0700 (PDT) From: Tomeu Vizoso To: Intel GFX discussion Date: Mon, 18 Apr 2016 13:42:50 +0200 Message-Id: <1460979775-21702-3-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1460979775-21702-1-git-send-email-tomeu.vizoso@collabora.com> References: <1460979775-21702-1-git-send-email-tomeu.vizoso@collabora.com> Cc: Daniel Stone , Tomeu Vizoso , Daniel Vetter , Micah Fedke , Gustavo Padovan , Emil Velikov Subject: [Intel-gfx] [i-g-t PATCH v1 2/7] tests/kms_render: Move dependency on i915 into subtest 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 Batchbuffers are only needed in the subtest that does the blit on the GPU, so move that dependency into it so the other subtest can be ran on !i915. Signed-off-by: Tomeu Vizoso --- tests/kms_render.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/kms_render.c b/tests/kms_render.c index e0a2b58f6b82..72da87f19af3 100644 --- a/tests/kms_render.c +++ b/tests/kms_render.c @@ -35,9 +35,6 @@ drmModeRes *resources; int drm_fd; -static drm_intel_bufmgr *bufmgr; -struct intel_batchbuffer *batch; -uint32_t devid; enum test_flags { TEST_DIRECT_RENDER = 0x01, @@ -70,6 +67,15 @@ static void gpu_blit(struct igt_fb *dst_fb, struct igt_fb *src_fb) drm_intel_bo *dst_bo; drm_intel_bo *src_bo; int bpp; + static drm_intel_bufmgr *bufmgr; + struct intel_batchbuffer *batch; + uint32_t devid; + + igt_require_intel(drm_fd); + + bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); + devid = intel_get_drm_devid(drm_fd); + batch = intel_batchbuffer_alloc(bufmgr, devid); igt_assert(dst_fb->drm_format == src_fb->drm_format); igt_assert(src_fb->drm_format == DRM_FORMAT_RGB565 || @@ -175,7 +181,8 @@ static void test_connector(const char *test_name, igt_get_all_cairo_formats(&formats, &format_count); for (i = 0; i < format_count; i++) { - if (intel_gen(intel_get_drm_devid(drm_fd)) < 4 + if (is_i915_device(drm_fd) + && intel_gen(intel_get_drm_devid(drm_fd)) < 4 && formats[i] == DRM_FORMAT_XRGB2101010) { igt_info("gen2/3 don't support 10bpc, skipping\n"); continue; @@ -232,11 +239,7 @@ igt_main igt_skip_on_simulation(); igt_fixture { - drm_fd = drm_open_driver_master(DRIVER_INTEL); - - bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096); - devid = intel_get_drm_devid(drm_fd); - batch = intel_batchbuffer_alloc(bufmgr, devid); + drm_fd = drm_open_driver_master(DRIVER_ANY); kmstest_set_vt_graphics_mode(); }