Mesa (main): anv: Pull aperture size from devinfo
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Nov 9 03:12:53 UTC 2021
Module: Mesa
Branch: main
Commit: 0b2b9b49afd2bbd9f65b8b132ecbf6674c72d226
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b2b9b49afd2bbd9f65b8b132ecbf6674c72d226
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Sat Oct 30 14:04:30 2021 -0500
anv: Pull aperture size from devinfo
Reviwed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13610>
---
src/intel/dev/intel_device_info.c | 2 +-
src/intel/dev/intel_device_info.h | 1 -
src/intel/vulkan/anv_device.c | 3 ++-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/intel/dev/intel_device_info.c b/src/intel/dev/intel_device_info.c
index 46c9803ad14..fc2d0d09719 100644
--- a/src/intel/dev/intel_device_info.c
+++ b/src/intel/dev/intel_device_info.c
@@ -1372,7 +1372,7 @@ query_topology(struct intel_device_info *devinfo, int fd)
}
-int
+static int
intel_get_aperture_size(int fd, uint64_t *size)
{
struct drm_i915_gem_get_aperture aperture = { 0 };
diff --git a/src/intel/dev/intel_device_info.h b/src/intel/dev/intel_device_info.h
index cdf499dc003..d94e9e703a8 100644
--- a/src/intel/dev/intel_device_info.h
+++ b/src/intel/dev/intel_device_info.h
@@ -428,7 +428,6 @@ intel_device_info_timebase_scale(const struct intel_device_info *devinfo,
bool intel_get_device_info_from_fd(int fh, struct intel_device_info *devinfo);
bool intel_get_device_info_from_pci_id(int pci_id,
struct intel_device_info *devinfo);
-int intel_get_aperture_size(int fd, uint64_t *size);
#ifdef __cplusplus
}
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index af6e261cc9e..65211db1fed 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -441,10 +441,11 @@ anv_physical_device_init_heaps(struct anv_physical_device *device, int fd)
anv_perf_warn(VK_LOG_NO_OBJS(&device->instance->vk),
"Failed to get I915_CONTEXT_PARAM_GTT_SIZE: %m");
- if (intel_get_aperture_size(fd, &device->gtt_size) == -1) {
+ if (device->info.aperture_bytes == 0) {
return vk_errorf(device, VK_ERROR_INITIALIZATION_FAILED,
"failed to get aperture size: %m");
}
+ device->gtt_size = device->info.aperture_bytes;
}
/* We only allow 48-bit addresses with softpin because knowing the actual
More information about the mesa-commit
mailing list