From patchwork Thu Sep 4 01:30:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 4842071 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 C8FB2C033C for ; Thu, 4 Sep 2014 01:30:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD36720222 for ; Thu, 4 Sep 2014 01:30:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D8F732022A for ; Thu, 4 Sep 2014 01:30:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 418636E617; Wed, 3 Sep 2014 18:30:12 -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 2B6F26E5F4 for ; Wed, 3 Sep 2014 18:30:09 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 03 Sep 2014 18:30:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,462,1406617200"; d="scan'208";a="568049935" Received: from rdvivi-bratislava.jf.intel.com ([10.7.196.74]) by orsmga001.jf.intel.com with ESMTP; 03 Sep 2014 18:30:07 -0700 From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Wed, 3 Sep 2014 21:30:00 -0400 Message-Id: <1409794206-2126-6-git-send-email-rodrigo.vivi@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1409794206-2126-1-git-send-email-rodrigo.vivi@intel.com> References: <1409794206-2126-1-git-send-email-rodrigo.vivi@intel.com> Cc: Rodrigo Vivi Subject: [Intel-gfx] [PATCH 06/12] tests/kms_psr_sink_crc: Removing context tests. 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=-5.9 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 This tests are unecessary. Mainly now with the software tracking for PSR. Signed-off-by: Rodrigo Vivi --- tests/kms_psr_sink_crc.c | 69 +++--------------------------------------------- 1 file changed, 3 insertions(+), 66 deletions(-) diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c index 01521bb..ee5ad81 100644 --- a/tests/kms_psr_sink_crc.c +++ b/tests/kms_psr_sink_crc.c @@ -47,12 +47,10 @@ enum tests { TEST_SETDOMAIN_WAIT_WRITE_CPU, TEST_BLT, TEST_RENDER, - TEST_CONTEXT, TEST_PAGE_FLIP_AND_MMAP_CPU, TEST_PAGE_FLIP_AND_MMAP_GTT, TEST_PAGE_FLIP_AND_BLT, TEST_PAGE_FLIP_AND_RENDER, - TEST_PAGE_FLIP_AND_CONTEXT, TEST_CURSOR_MOVE, TEST_SPRITE, }; @@ -67,7 +65,6 @@ typedef struct { enum tests test; drmModeRes *resources; drm_intel_bufmgr *bufmgr; - drm_intel_context *ctx[2]; uint32_t devid; uint32_t handle[2]; uint32_t crtc_id; @@ -91,12 +88,10 @@ static const char *tests_str(enum tests test) [TEST_SETDOMAIN_WAIT_WRITE_CPU] = "setdomain_wait_write_cpu", [TEST_BLT] = "blt", [TEST_RENDER] = "render", - [TEST_CONTEXT] = "context", [TEST_PAGE_FLIP_AND_MMAP_CPU] = "page_flip_and_mmap_cpu", [TEST_PAGE_FLIP_AND_MMAP_GTT] = "page_flip_and_mmap_gtt", [TEST_PAGE_FLIP_AND_BLT] = "page_flip_and_blt", [TEST_PAGE_FLIP_AND_RENDER] = "page_flip_and_render", - [TEST_PAGE_FLIP_AND_CONTEXT] = "page_flip_and_context", [TEST_CURSOR_MOVE] = "cursor_move", [TEST_SPRITE] = "sprite", }; @@ -206,31 +201,7 @@ static void scratch_buf_init(struct igt_buf *buf, drm_intel_bo *bo) buf->size = 4096; } -static void exec_nop(data_t *data, uint32_t handle, drm_intel_context *context) -{ - drm_intel_bo *dst; - struct intel_batchbuffer *batch; - - dst = gem_handle_to_libdrm_bo(data->bufmgr, data->drm_fd, "", handle); - igt_assert(dst); - - batch = intel_batchbuffer_alloc(data->bufmgr, data->devid); - igt_assert(batch); - - /* add the reloc to make sure the kernel will think we write to dst */ - BEGIN_BATCH(4, 1); - OUT_BATCH(MI_BATCH_BUFFER_END); - OUT_BATCH(MI_NOOP); - OUT_RELOC(dst, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH(MI_NOOP); - ADVANCE_BATCH(); - - intel_batchbuffer_flush_with_context(batch, context); - intel_batchbuffer_free(batch); -} - -static void fill_render(data_t *data, uint32_t handle, - drm_intel_context *context, unsigned char color) +static void fill_render(data_t *data, uint32_t handle, unsigned char color) { drm_intel_bo *src, *dst; struct intel_batchbuffer *batch; @@ -254,7 +225,7 @@ static void fill_render(data_t *data, uint32_t handle, batch = intel_batchbuffer_alloc(data->bufmgr, data->devid); igt_assert(batch); - rendercopy(batch, context, + rendercopy(batch, NULL, &src_buf, 0, 0, 1, 1, &dst_buf, 0, 0); @@ -444,13 +415,8 @@ static void test_crc(data_t *data) fill_blt(data, handle, 0xff); break; case TEST_RENDER: - case TEST_CONTEXT: case TEST_PAGE_FLIP_AND_RENDER: - case TEST_PAGE_FLIP_AND_CONTEXT: - fill_render(data, handle, - (data->test == TEST_CONTEXT || - data->test == TEST_PAGE_FLIP_AND_CONTEXT) ? - data->ctx[1] : NULL, 0xff); + fill_render(data, handle, 0xff); break; case TEST_CURSOR_MOVE: igt_assert(drmModeMoveCursor(data->drm_fd, data->crtc_id, 1, 2) == 0); @@ -499,42 +465,15 @@ static bool prepare_crtc(data_t *data, uint32_t connector_id) connector_set_mode(data, &data->config.default_mode, data->fb_id[1]); - if (data->test == TEST_CONTEXT || - data->test == TEST_PAGE_FLIP_AND_CONTEXT) { - data->ctx[0] = drm_intel_gem_context_create(data->bufmgr); - igt_require(data->ctx[0]); - data->ctx[1] = drm_intel_gem_context_create(data->bufmgr); - igt_require(data->ctx[1]); - - exec_nop(data, data->handle[0], data->ctx[1]); - exec_nop(data, data->handle[0], data->ctx[0]); - exec_nop(data, data->handle[0], data->ctx[1]); - exec_nop(data, data->handle[0], data->ctx[0]); - } - /* scanout = fb[0] */ connector_set_mode(data, &data->config.default_mode, data->fb_id[0]); - if (data->test == TEST_CONTEXT || - data->test == TEST_PAGE_FLIP_AND_CONTEXT) { - exec_nop(data, data->fb[0].gem_handle, data->ctx[0]); - } - kmstest_free_connector_config(&data->config); return true; } -static void finish_crtc(data_t *data) -{ - if (data->test == TEST_CONTEXT || - data->test == TEST_PAGE_FLIP_AND_CONTEXT) { - drm_intel_gem_context_destroy(data->ctx[0]); - drm_intel_gem_context_destroy(data->ctx[1]); - } -} - static void test_sprite(data_t *data) { igt_display_t *display = &data->display; @@ -600,8 +539,6 @@ static void run_test(data_t *data) continue; test_crc(data); - - finish_crtc(data); } } }