From patchwork Thu Apr 25 01:57:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Widawsky X-Patchwork-Id: 2486951 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 32347DF25A for ; Thu, 25 Apr 2013 01:02:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CD396E5EEE for ; Wed, 24 Apr 2013 18:02:40 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by gabe.freedesktop.org (Postfix) with ESMTP id F41F4E5CC2 for ; Wed, 24 Apr 2013 18:02:29 -0700 (PDT) Received: by mail-pd0-f172.google.com with SMTP id 4so1465528pdd.17 for ; Wed, 24 Apr 2013 18:02:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent:x-gm-message-state; bh=gUOcvVru7TXFlOBQVAJ9U1rmJxs29xqPB+u0NgwqTzk=; b=FoFvqKkswKpIkwO3+Hl95Yllir5/Yz4jI3ty+2N4o02ls4Z01pPxtyPX8O69ErvXcw agSjnW+JZhe/Irlv+ke5ru5RaSpAH0Erlw0KuNzA6t2eXLhfExMhuH2AqEZgsOB15P8U CNrHukrWMDvdrIbr+AKIy67ph88OuUdP6I0LQNtMZGZ4X+RVzYXVPYYc+ofbjfKz+wvX TgF9bxRgmNgadC71hF0pXxUaDYO7VBbkU7LcWEwPWX1YTLoE0pAwX5rR5ogWfasXLv0h c9D054IXj3FBXtdDFmlkHNusWS6TTLhe3Q8gygWMtQ5fdvHLujtdlK3U005oOP8dZyHS nelA== X-Received: by 10.66.233.34 with SMTP id tt2mr21928108pac.160.1366851749912; Wed, 24 Apr 2013 18:02:29 -0700 (PDT) Received: from intel.com (jfdmzpr01-ext.jf.intel.com. [134.134.139.70]) by mx.google.com with ESMTPSA id kd7sm4959557pbb.34.2013.04.24.18.02.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Apr 2013 18:02:29 -0700 (PDT) Date: Wed, 24 Apr 2013 18:57:46 -0700 From: Ben Widawsky To: Zhong Li Message-ID: <20130425015745.GA9316@intel.com> References: <1366700809-18143-1-git-send-email-zhong.li@intel.com> <1366700809-18143-4-git-send-email-zhong.li@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1366700809-18143-4-git-send-email-zhong.li@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQk2hnMrSzHcv9pXmWTvGebRdv1ETLZnmDFr9togJ6cQlToqcSNkRIkAUy8xLaxMAfO/WSGG Cc: daniel.vetter@intel.com, intel-gfx@lists.freedesktop.org Subject: Re: [Intel-gfx] [PATCH 3/8] tests: storedw on VEBOX X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org On Tue, Apr 23, 2013 at 03:06:43PM +0800, Zhong Li wrote: > From: "Xiang, Haihao" > > Signed-off-by: Xiang, Haihao > Signed-off-by: Zhong Li I've pushed up to here. With a couple of corrections to gem_ring_sync_loop: test the new ring: On top of this, I've pushed updates to make the test look more like modern tests. [snip] diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c index 955bf34..3607fca 100644 --- a/tests/gem_ring_sync_loop.c +++ b/tests/gem_ring_sync_loop.c @@ -55,6 +55,7 @@ static drm_intel_bo *target_buffer; #define MI_COND_BATCH_BUFFER_END (0x36<<23 | 1) #define MI_DO_COMPARE (1<<21) +#define LOCAL_I915_PARAM_HAS_VEBOX 22 static int get_num_rings(int fd) { @@ -67,12 +68,12 @@ get_num_rings(int fd) gp.param = I915_PARAM_HAS_BSD; ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); - + if ((ret == 0) & (*gp.value > 0)) num_rings++; else goto skip; - + gp.param = I915_PARAM_HAS_BLT; ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); @@ -81,9 +82,7 @@ get_num_rings(int fd) else goto skip; -#ifdef I915_PARAM_HAS_VEBOX /* remove it once the upstream libdrm support VEBOX */ - - gp.param = I915_PARAM_HAS_VEBOX; + gp.param = LOCAL_I915_PARAM_HAS_VEBOX; ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); if ((ret == 0) & (*gp.value > 0)) @@ -91,9 +90,8 @@ get_num_rings(int fd) else goto skip; -#endif -skip: +skip: return num_rings; } And with a couple of corrections to this file: diff --git a/tests/gem_storedw_loop_vebox.c b/tests/gem_storedw_loop_vebox.c index 3f06102..4593c3f 100644 --- a/tests/gem_storedw_loop_vebox.c +++ b/tests/gem_storedw_loop_vebox.c @@ -1,5 +1,5 @@ /* - * Copyright ? 2009 Intel Corporation + * Copyright ? 2012 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,9 +21,7 @@ * IN THE SOFTWARE. * * Authors: - * Xiang, Haihao - * Eric Anholt - * Jesse Barnes (based on gem_bad_blit.c) + * Xiang, Haihao (based on gem_store_dw_loop_*) * */ @@ -48,6 +46,8 @@ struct intel_batchbuffer *batch; static drm_intel_bo *target_buffer; static int has_ppgtt = 0; +#define LOCAL_I915_EXEC_VEBOX (4<<0) + /* * Testcase: Basic vebox MI check using MI_STORE_DATA_IMM */ @@ -71,7 +71,7 @@ store_dword_loop(void) OUT_BATCH(val); ADVANCE_BATCH(); - intel_batchbuffer_flush_on_ring(batch, I915_EXEC_VEBOX); + intel_batchbuffer_flush_on_ring(batch, LOCAL_I915_EXEC_VEBOX);