From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xiang, Haihao" Subject: [PATCH 2/2] gem_ring_sync_loop: test the new ring Date: Thu, 15 Nov 2012 15:58:10 +0800 Message-ID: <1352966290-25762-2-git-send-email-haihao.xiang@intel.com> References: <1352966290-25762-1-git-send-email-haihao.xiang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: 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) In-Reply-To: <1352966290-25762-1-git-send-email-haihao.xiang@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@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; } -- 1.7.9.5