diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-07-21 13:09:25 -0700 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-08-10 17:18:55 -0700 |
commit | 9564dd37a00f642d2637ffa15c2f27fb8992aa50 (patch) | |
tree | 6fb869f4604f6c6c6fe1fb1e2c5d9766d477909a /src/vulkan/anv_gem.c | |
parent | 8605ee60e086ceb936000d3942a902239105637d (diff) |
vk: Query aperture size up front in anv_physical_device_init()
We already query the device in various ways here and we can just also
get the aperture size. This avoids keeping an extra drm fd open
during the life time of the driver.
Also, we need to use explicit 64 bit types for the aperture size, not
size_t.
Diffstat (limited to 'src/vulkan/anv_gem.c')
-rw-r--r-- | src/vulkan/anv_gem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vulkan/anv_gem.c b/src/vulkan/anv_gem.c index 4ce857e2a5f..01671d2ea50 100644 --- a/src/vulkan/anv_gem.c +++ b/src/vulkan/anv_gem.c @@ -230,13 +230,13 @@ anv_gem_destroy_context(struct anv_device *device, int context) } int -anv_gem_get_aperture(struct anv_physical_device *physical_dev, uint64_t *size) +anv_gem_get_aperture(int fd, uint64_t *size) { struct drm_i915_gem_get_aperture aperture; int ret; VG_CLEAR(aperture); - ret = anv_ioctl(physical_dev->fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture); + ret = anv_ioctl(fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture); if (ret == -1) return -1; |