mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-09 17:06:14 +00:00
tests/gem_mmap_gtt: clarify BO domain setting functions
Add suffix and complementary function for CPU domain. v2: - Change function signatures to be consistent with the rest Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
parent
629759c2d1
commit
577fb75ed8
@ -43,11 +43,18 @@
|
|||||||
|
|
||||||
static int OBJECT_SIZE = 16*1024*1024;
|
static int OBJECT_SIZE = 16*1024*1024;
|
||||||
|
|
||||||
static void set_domain(int fd, uint32_t handle)
|
static void
|
||||||
|
set_domain_gtt(int fd, uint32_t handle)
|
||||||
{
|
{
|
||||||
gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
|
gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_domain_cpu(int fd, uint32_t handle)
|
||||||
|
{
|
||||||
|
gem_set_domain(fd, handle, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU);
|
||||||
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
mmap_bo(int fd, uint32_t handle)
|
mmap_bo(int fd, uint32_t handle)
|
||||||
{
|
{
|
||||||
@ -245,7 +252,7 @@ test_write_gtt(int fd)
|
|||||||
|
|
||||||
/* prefault object into gtt */
|
/* prefault object into gtt */
|
||||||
dst_gtt = mmap_bo(fd, dst);
|
dst_gtt = mmap_bo(fd, dst);
|
||||||
set_domain(fd, dst);
|
set_domain_gtt(fd, dst);
|
||||||
memset(dst_gtt, 0, OBJECT_SIZE);
|
memset(dst_gtt, 0, OBJECT_SIZE);
|
||||||
munmap(dst_gtt, OBJECT_SIZE);
|
munmap(dst_gtt, OBJECT_SIZE);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user