diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-03 12:46:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-03 14:37:44 +0100 |
commit | 0045085c632a1cf5b4e9272304ee0e61ff9a7e6f (patch) | |
tree | b98c60b8ea7eaeba2af79c0f642ebd497c1dd7ed /lib/ioctl_wrappers.h | |
parent | 08a2f887b26c89cfb1e1b5715a23d561b75e0dab (diff) |
lib: Report the error from __gem_create()
We have two style of ioctl wrappers. The principle interface does error
checking on behalf of the caller (to avoid having lots of repetitious
code in each test), and for the few cases where the error is important
for the test, we also expose a double underscore version. Fix up
__gem_create() to follow this pattern and report the negative error code
returned by the kernel.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'lib/ioctl_wrappers.h')
-rw-r--r-- | lib/ioctl_wrappers.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h index 090c1251..6ed65fad 100644 --- a/lib/ioctl_wrappers.h +++ b/lib/ioctl_wrappers.h @@ -73,7 +73,7 @@ void gem_sync(int fd, uint32_t handle); bool gem_create__has_stolen_support(int fd); uint32_t __gem_create_stolen(int fd, uint64_t size); uint32_t gem_create_stolen(int fd, uint64_t size); -uint32_t __gem_create(int fd, int size); +int __gem_create(int fd, int size, uint32_t *handle); uint32_t gem_create(int fd, uint64_t size); void gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf); int __gem_execbuf_wr(int fd, struct drm_i915_gem_execbuffer2 *execbuf); |