mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-21 21:32:56 +00:00
lib: Share common __gem_execbuf()
An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
+1
-15
@@ -136,20 +136,6 @@ static int gem_reset_status(int fd, int ctx_id)
|
||||
return RS_NO_ERROR;
|
||||
}
|
||||
|
||||
static int gem_exec(int fd, struct drm_i915_gem_execbuffer2 *execbuf)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = ioctl(fd,
|
||||
DRM_IOCTL_I915_GEM_EXECBUFFER2,
|
||||
execbuf);
|
||||
|
||||
if (ret < 0)
|
||||
return -errno;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int exec_valid_ring(int fd, int ctx, int ring)
|
||||
{
|
||||
struct drm_i915_gem_execbuffer2 execbuf;
|
||||
@@ -180,7 +166,7 @@ static int exec_valid_ring(int fd, int ctx, int ring)
|
||||
i915_execbuffer2_set_context_id(execbuf, ctx);
|
||||
execbuf.rsvd2 = 0;
|
||||
|
||||
ret = gem_exec(fd, &execbuf);
|
||||
ret = __gem_execbuf(fd, &execbuf);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user