mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-22 22:02:57 +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:
+17
-4
@@ -30,20 +30,23 @@
|
||||
#ifndef IOCTL_WRAPPERS_H
|
||||
#define IOCTL_WRAPPERS_H
|
||||
|
||||
/* libdrm interfacing */
|
||||
drm_intel_bo * gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd,
|
||||
const char *name, uint32_t handle);
|
||||
|
||||
/* ioctl_wrappers.c:
|
||||
*
|
||||
* ioctl wrappers and similar stuff for bare metal testing */
|
||||
void gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride);
|
||||
int __gem_set_tiling(int fd, uint32_t handle, uint32_t tiling, uint32_t stride);
|
||||
int gem_get_num_rings(int fd);
|
||||
|
||||
void gem_set_caching(int fd, uint32_t handle, int caching);
|
||||
void gem_set_caching(int fd, uint32_t handle, uint32_t caching);
|
||||
uint32_t gem_get_caching(int fd, uint32_t handle);
|
||||
uint32_t gem_flink(int fd, uint32_t handle);
|
||||
uint32_t gem_open(int fd, uint32_t name);
|
||||
void gem_close(int fd, uint32_t handle);
|
||||
void gem_write(int fd, uint32_t handle, uint32_t offset, const void *buf, uint32_t size);
|
||||
void gem_read(int fd, uint32_t handle, uint32_t offset, void *buf, uint32_t size);
|
||||
void gem_write(int fd, uint32_t handle, uint32_t offset, const void *buf, uint32_t length);
|
||||
void gem_read(int fd, uint32_t handle, uint32_t offset, void *buf, uint32_t length);
|
||||
void gem_set_domain(int fd, uint32_t handle,
|
||||
uint32_t read_domains, uint32_t write_domain);
|
||||
void gem_sync(int fd, uint32_t handle);
|
||||
@@ -53,6 +56,11 @@ void gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf);
|
||||
|
||||
void *gem_mmap__gtt(int fd, uint32_t handle, int size, int prot);
|
||||
void *gem_mmap__cpu(int fd, uint32_t handle, int size, int prot);
|
||||
/**
|
||||
* gem_mmap:
|
||||
*
|
||||
* This is a simple convenience alias to gem_mmap__gtt()
|
||||
*/
|
||||
#define gem_mmap gem_mmap__gtt
|
||||
|
||||
int gem_madvise(int fd, uint32_t handle, int state);
|
||||
@@ -64,6 +72,7 @@ void gem_sw_finish(int fd, uint32_t handle);
|
||||
bool gem_bo_busy(int fd, uint32_t handle);
|
||||
|
||||
/* feature test helpers */
|
||||
int gem_get_num_rings(int fd);
|
||||
bool gem_has_enable_ring(int fd,int param);
|
||||
bool gem_has_bsd(int fd);
|
||||
bool gem_has_blt(int fd);
|
||||
@@ -74,6 +83,10 @@ uint64_t gem_available_aperture_size(int fd);
|
||||
uint64_t gem_aperture_size(int fd);
|
||||
uint64_t gem_mappable_aperture_size(void);
|
||||
|
||||
/* check functions which auto-skip tests by calling igt_skip() */
|
||||
void gem_require_caching(int fd);
|
||||
void gem_require_ring(int fd, int ring_id);
|
||||
|
||||
/* prime */
|
||||
int prime_handle_to_fd(int fd, uint32_t handle);
|
||||
uint32_t prime_fd_to_handle(int fd, int dma_buf_fd);
|
||||
|
||||
Reference in New Issue
Block a user