diff options
author | Rafael Antognolli <[email protected]> | 2020-05-14 11:44:29 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-15 16:57:04 +0000 |
commit | bb3545a6ee419c4802ac4153eb690a93dc2f339d (patch) | |
tree | 3f4e34cf6f129675028c2f151de9ffa285dc8052 /src/intel/vulkan | |
parent | a887ad7c84e14fdad7907037a39e9fee9d504bf3 (diff) |
intel: Store the aperture size in devinfo.
We will later use the devinfo from iris_bufmgr, where we don't have
access to the screen pointer. And since we are moving it, we can reuse
it in Anv and i965.
v2: return error code and check for it on Anv (Lionel).
v3: Remove anv_gem_get_aperture() from anv_private.h and stubs (Lionel).
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5043>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_gem.c | 14 | ||||
-rw-r--r-- | src/intel/vulkan/anv_gem_stubs.c | 6 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 1 |
4 files changed, 1 insertions, 22 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index ba0b14ac714..71fc427aa92 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -136,7 +136,7 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd) anv_perf_warn(NULL, NULL, "Failed to get I915_CONTEXT_PARAM_GTT_SIZE: %m"); - if (anv_gem_get_aperture(fd, &device->gtt_size) == -1) { + if (gen_get_aperture_size(fd, &device->gtt_size) == -1) { return vk_errorfi(device->instance, NULL, VK_ERROR_INITIALIZATION_FAILED, "failed to get aperture size: %m"); diff --git a/src/intel/vulkan/anv_gem.c b/src/intel/vulkan/anv_gem.c index bea6a6803c4..30774292b15 100644 --- a/src/intel/vulkan/anv_gem.c +++ b/src/intel/vulkan/anv_gem.c @@ -390,20 +390,6 @@ anv_gem_get_context_param(int fd, int context, uint32_t param, uint64_t *value) } int -anv_gem_get_aperture(int fd, uint64_t *size) -{ - struct drm_i915_gem_get_aperture aperture = { 0 }; - - int ret = gen_ioctl(fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture); - if (ret == -1) - return -1; - - *size = aperture.aper_available_size; - - return 0; -} - -int anv_gem_gpu_get_reset_stats(struct anv_device *device, uint32_t *active, uint32_t *pending) { diff --git a/src/intel/vulkan/anv_gem_stubs.c b/src/intel/vulkan/anv_gem_stubs.c index c4d1c87b75a..aca54e64152 100644 --- a/src/intel/vulkan/anv_gem_stubs.c +++ b/src/intel/vulkan/anv_gem_stubs.c @@ -160,12 +160,6 @@ anv_gem_has_context_priority(int fd) } int -anv_gem_get_aperture(int fd, uint64_t *size) -{ - unreachable("Unused"); -} - -int anv_gem_gpu_get_reset_stats(struct anv_device *device, uint32_t *active, uint32_t *pending) { diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 5e3724534c3..28c2aa5633a 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1530,7 +1530,6 @@ int anv_gem_get_context_param(int fd, int context, uint32_t param, int anv_gem_get_param(int fd, uint32_t param); int anv_gem_get_tiling(struct anv_device *device, uint32_t gem_handle); bool anv_gem_get_bit6_swizzle(int fd, uint32_t tiling); -int anv_gem_get_aperture(int fd, uint64_t *size); int anv_gem_gpu_get_reset_stats(struct anv_device *device, uint32_t *active, uint32_t *pending); int anv_gem_handle_to_fd(struct anv_device *device, uint32_t gem_handle); |