mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 21:02:59 +00:00
lib: Extract gem_get_tiling() from a couple of tests.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
@@ -60,22 +60,6 @@ static int tile_width;
|
||||
static int tile_height;
|
||||
static int tile_size;
|
||||
|
||||
static void
|
||||
gem_get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
|
||||
{
|
||||
struct drm_i915_gem_get_tiling get_tiling;
|
||||
int ret;
|
||||
|
||||
memset(&get_tiling, 0, sizeof(get_tiling));
|
||||
get_tiling.handle = handle;
|
||||
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_GET_TILING, &get_tiling);
|
||||
igt_assert(ret == 0);
|
||||
|
||||
*tiling = get_tiling.tiling_mode;
|
||||
*swizzle = get_tiling.swizzle_mode;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
create_bo(int fd)
|
||||
{
|
||||
|
||||
@@ -68,22 +68,6 @@ static uint32_t current_tiling_mode;
|
||||
|
||||
#define PAGE_SIZE 4096
|
||||
|
||||
static void
|
||||
gem_get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle)
|
||||
{
|
||||
struct drm_i915_gem_get_tiling get_tiling;
|
||||
int ret;
|
||||
|
||||
memset(&get_tiling, 0, sizeof(get_tiling));
|
||||
get_tiling.handle = handle;
|
||||
|
||||
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_GET_TILING, &get_tiling);
|
||||
igt_assert(ret == 0);
|
||||
|
||||
*tiling = get_tiling.tiling_mode;
|
||||
*swizzle = get_tiling.swizzle_mode;
|
||||
}
|
||||
|
||||
static uint32_t
|
||||
create_bo_and_fill(int fd)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user