diff options
author | Xiang, Haihao <haihao.xiang@intel.com> | 2012-11-14 12:46:39 +0800 |
---|---|---|
committer | Ben Widawsky <ben@bwidawsk.net> | 2013-04-27 11:31:22 -0700 |
commit | 011999927f76a7e9ba8f047fae4b4e084da6c2c3 (patch) | |
tree | a947d952f1046d95eeac283e64f7bb194563f4b0 /intel | |
parent | b3a3a77823ada2eb37233678b5a49efaec9b75cb (diff) |
intel: Add support for VEBOX ring (v2)
v2: Fix the test for has_vebox
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'intel')
-rw-r--r-- | intel/intel_bufmgr_gem.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index d21547ea..3c73068b 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -125,6 +125,7 @@ typedef struct _drm_intel_bufmgr_gem { unsigned int has_wait_timeout : 1; unsigned int bo_reuse : 1; unsigned int no_exec : 1; + unsigned int has_vebox : 1; bool fenced_relocs; FILE *aub_file; @@ -2213,6 +2214,10 @@ do_exec2(drm_intel_bo *bo, int used, drm_intel_context *ctx, if (!bufmgr_gem->has_bsd) return -EINVAL; break; + case I915_EXEC_VEBOX: + if (!bufmgr_gem->has_vebox) + return -EINVAL; + break; case I915_EXEC_RENDER: case I915_EXEC_DEFAULT: break; @@ -3126,6 +3131,10 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size) } else bufmgr_gem->has_llc = *gp.value; + gp.param = I915_PARAM_HAS_VEBOX; + ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GETPARAM, &gp); + bufmgr_gem->has_vebox = (ret == 0) & (*gp.value > 0); + if (bufmgr_gem->gen < 4) { gp.param = I915_PARAM_NUM_FENCES_AVAIL; gp.value = &bufmgr_gem->available_fences; |