mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-29 02:36:29 +00:00
gem_ring_sync_loop: test the new ring
The code is surround by a #ifdef...#endif to avoid to break compiling against the current libdrm release v2 (Ben): Use VEBOX get param. Thankfully Daniel let us carve this out way back when. Spacing cleanups Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> Signed-off-by: Zhong Li <zhong.li@intel.com> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
This commit is contained in:
parent
0a413cd8a9
commit
f187990bbf
@ -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)
|
||||
{
|
||||
@ -81,6 +82,15 @@ get_num_rings(int fd)
|
||||
else
|
||||
goto skip;
|
||||
|
||||
gp.param = LOCAL_I915_PARAM_HAS_VEBOX;
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GETPARAM, &gp);
|
||||
|
||||
if ((ret == 0) & (*gp.value > 0))
|
||||
num_rings++;
|
||||
else
|
||||
goto skip;
|
||||
|
||||
|
||||
skip:
|
||||
return num_rings;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user