diff options
author | Chia-I Wu <[email protected]> | 2019-01-11 10:03:51 -0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2019-03-11 10:01:41 -0700 |
commit | 91232c52fe49848aa622a31e38e5ba0d008d08e0 (patch) | |
tree | ecc918999a15a93dcededd6501371ca2bb9547b1 /src/freedreno/vulkan/tu_drm.c | |
parent | 4f32869e3dcd70f25e828d1e337e027c5980032b (diff) |
turnip: use msm_drm.h from inc_freedreno
The recent change to msm_drm.h changed the APIs in an incompatible
way.
Diffstat (limited to 'src/freedreno/vulkan/tu_drm.c')
-rw-r--r-- | src/freedreno/vulkan/tu_drm.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index 88baf82adf2..d0d1cd8d4f6 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -24,11 +24,12 @@ #include "tu_private.h" -#include "xf86drm.h" #include <errno.h> -#include <msm_drm.h> #include <stdint.h> #include <sys/ioctl.h> +#include <xf86drm.h> + +#include "drm/msm_drm.h" /** * Return gem handle on success. Return 0 on failure. @@ -61,11 +62,11 @@ 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 flags) +tu_gem_info(struct tu_device *dev, uint32_t gem_handle, uint32_t info) { struct drm_msm_gem_info req = { .handle = gem_handle, - .flags = flags, + .info = info, }; int ret = drmCommandWriteRead(dev->physical_device->local_fd, @@ -73,21 +74,21 @@ tu_gem_info(struct tu_device *dev, uint32_t gem_handle, uint32_t flags) if (ret == -1) return UINT64_MAX; - return req.offset; + return req.value; } /** Return UINT64_MAX on error. */ uint64_t tu_gem_info_offset(struct tu_device *dev, uint32_t gem_handle) { - return tu_gem_info(dev, gem_handle, 0); + 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) { - return tu_gem_info(dev, gem_handle, MSM_INFO_IOVA); + return tu_gem_info(dev, gem_handle, MSM_INFO_GET_IOVA); } int |