From patchwork Thu Nov 15 07:58:10 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 1747421 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 92FAE3FC64 for ; Thu, 15 Nov 2012 08:06:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8D7409E85E for ; Thu, 15 Nov 2012 00:06:25 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 039139E849 for ; Thu, 15 Nov 2012 00:05:53 -0800 (PST) Received: from azsmga002.ch.intel.com ([10.2.17.35]) by azsmga102.ch.intel.com with ESMTP; 15 Nov 2012 00:05:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.83,255,1352102400"; d="scan'208";a="168644852" Received: from xhh-hsw32.sh.intel.com ([10.239.36.99]) by AZSMGA002.ch.intel.com with ESMTP; 15 Nov 2012 00:05:52 -0800 From: "Xiang, Haihao" To: intel-gfx@lists.freedesktop.org Date: Thu, 15 Nov 2012 15:58:10 +0800 Message-Id: <1352966290-25762-2-git-send-email-haihao.xiang@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1352966290-25762-1-git-send-email-haihao.xiang@intel.com> References: <1352966290-25762-1-git-send-email-haihao.xiang@intel.com> Subject: [Intel-gfx] [PATCH 2/2] gem_ring_sync_loop: test the new ring 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: , MIME-Version: 1.0 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 From: "Xiang, Haihao" The code is surround by a #ifdef...#endif to avoid to break compiling against the current libdrm release Signed-off-by: Xiang, Haihao --- tests/gem_ring_sync_loop.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/gem_ring_sync_loop.c b/tests/gem_ring_sync_loop.c index 2875cf3..955bf34 100644 --- a/tests/gem_ring_sync_loop.c +++ b/tests/gem_ring_sync_loop.c @@ -81,6 +81,18 @@ 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; + ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp); + + if ((ret == 0) & (*gp.value > 0)) + num_rings++; + else + goto skip; + +#endif + skip: return num_rings; }