mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 21:02:59 +00:00
lib/ioctl_wrappers: api doc
Also some tiny polish to function interface: - @caching in gem_set_tiling should be uint32_t to match the ioctl struct. - s/size/length/ for gem_write/read. - move gem_get_num_rings to the other ring feature helpers. v2: Also demote gem_require_ring from static inline and move it, too. v3: Also move gem_handle_to_libdrm_bo. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -59,23 +59,6 @@
|
||||
/* This file contains a bunch of wrapper functions to directly use gem ioctls.
|
||||
* Mostly useful to write kernel tests. */
|
||||
|
||||
drm_intel_bo *
|
||||
gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd, const char *name, uint32_t handle)
|
||||
{
|
||||
struct drm_gem_flink flink;
|
||||
int ret;
|
||||
drm_intel_bo *bo;
|
||||
|
||||
flink.handle = handle;
|
||||
ret = ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink);
|
||||
igt_assert(ret == 0);
|
||||
|
||||
bo = drm_intel_bo_gem_create_from_name(bufmgr, name, flink.name);
|
||||
igt_assert(bo);
|
||||
|
||||
return bo;
|
||||
}
|
||||
|
||||
static int
|
||||
is_intel(int fd)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user