From b7a6a80e6c66b8bb91dcadd9a868c46fc138b26b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 11 Jan 2019 10:55:15 -0800 Subject: [PATCH] turnip: constify tu_device in tu_gem_* --- src/freedreno/vulkan/tu_drm.c | 10 +++++----- src/freedreno/vulkan/tu_private.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index b86520b0f37..c103561ef1a 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -108,7 +108,7 @@ tu_drm_submitqueue_close(const struct tu_device *dev, uint32_t queue_id) * Return gem handle on success. Return 0 on failure. */ uint32_t -tu_gem_new(struct tu_device *dev, uint64_t size, uint32_t flags) +tu_gem_new(const struct tu_device *dev, uint64_t size, uint32_t flags) { struct drm_msm_gem_new req = { .size = size, @@ -124,7 +124,7 @@ tu_gem_new(struct tu_device *dev, uint64_t size, uint32_t flags) } void -tu_gem_close(struct tu_device *dev, uint32_t gem_handle) +tu_gem_close(const struct tu_device *dev, uint32_t gem_handle) { struct drm_gem_close req = { .handle = gem_handle, @@ -135,7 +135,7 @@ tu_gem_close(struct tu_device *dev, uint32_t gem_handle) /** Return UINT64_MAX on error. */ static uint64_t -tu_gem_info(struct tu_device *dev, uint32_t gem_handle, uint32_t info) +tu_gem_info(const struct tu_device *dev, uint32_t gem_handle, uint32_t info) { struct drm_msm_gem_info req = { .handle = gem_handle, @@ -152,14 +152,14 @@ tu_gem_info(struct tu_device *dev, uint32_t gem_handle, uint32_t info) /** Return UINT64_MAX on error. */ uint64_t -tu_gem_info_offset(struct tu_device *dev, uint32_t gem_handle) +tu_gem_info_offset(const struct tu_device *dev, uint32_t gem_handle) { return tu_gem_info(dev, gem_handle, MSM_INFO_GET_OFFSET); } /** Return UINT64_MAX on error. */ uint64_t -tu_gem_info_iova(struct tu_device *dev, uint32_t gem_handle) +tu_gem_info_iova(const struct tu_device *dev, uint32_t gem_handle) { return tu_gem_info(dev, gem_handle, MSM_INFO_GET_IOVA); } diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index c37920c5779..4602628169e 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -1204,13 +1204,13 @@ void tu_drm_submitqueue_close(const struct tu_device *dev, uint32_t queue_id); uint32_t -tu_gem_new(struct tu_device *dev, uint64_t size, uint32_t flags); +tu_gem_new(const struct tu_device *dev, uint64_t size, uint32_t flags); void -tu_gem_close(struct tu_device *dev, uint32_t gem_handle); +tu_gem_close(const struct tu_device *dev, uint32_t gem_handle); uint64_t -tu_gem_info_offset(struct tu_device *dev, uint32_t gem_handle); +tu_gem_info_offset(const struct tu_device *dev, uint32_t gem_handle); uint64_t -tu_gem_info_iova(struct tu_device *dev, uint32_t gem_handle); +tu_gem_info_iova(const struct tu_device *dev, uint32_t gem_handle); #define TU_DEFINE_HANDLE_CASTS(__tu_type, __VkType) \ \ -- 2.30.2