From add2b44ab69719e3f01184980a05559883bc44bf Mon Sep 17 00:00:00 2001 From: "Kristian H. Kristensen" Date: Tue, 4 Aug 2020 17:24:03 -0700 Subject: [PATCH] turnip: Only include msm_drm in tu_drm.c We copy the definition for struct drm_msm_gem_submit_bo and flags to keep the bo list code working for now. Part-of: --- src/freedreno/vulkan/tu_device.c | 3 --- src/freedreno/vulkan/tu_drm.c | 4 ++-- src/freedreno/vulkan/tu_private.h | 13 ++++++++++++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index ddc4db143d5..9dd95ce62bb 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -33,7 +33,6 @@ #include #include #include -#include #include "compiler/glsl_types.h" #include "util/debug.h" @@ -42,8 +41,6 @@ #include "vk_format.h" #include "vk_util.h" -#include "drm-uapi/msm_drm.h" - /* for fd_get_driver/device_uuid() */ #include "freedreno/common/freedreno_uuid.h" diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index 339a72ad6d5..50bca53fb98 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -22,8 +22,6 @@ * DEALINGS IN THE SOFTWARE. */ -#include "tu_private.h" - #include #include #include @@ -35,6 +33,8 @@ #include "drm-uapi/msm_drm.h" +#include "tu_private.h" + static int tu_drm_get_param(const struct tu_physical_device *dev, uint32_t param, diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h index 40c2fb092a3..3d1ed0fe5f4 100644 --- a/src/freedreno/vulkan/tu_private.h +++ b/src/freedreno/vulkan/tu_private.h @@ -53,7 +53,6 @@ #include "vk_debug_report.h" #include "wsi_common.h" -#include "drm-uapi/msm_drm.h" #include "ir3/ir3_compiler.h" #include "ir3/ir3_shader.h" @@ -955,6 +954,18 @@ enum tu_cmd_buffer_status TU_CMD_BUFFER_STATUS_PENDING, }; +#ifndef MSM_SUBMIT_BO_READ +#define MSM_SUBMIT_BO_READ 0x0001 +#define MSM_SUBMIT_BO_WRITE 0x0002 +#define MSM_SUBMIT_BO_DUMP 0x0004 + +struct drm_msm_gem_submit_bo { + uint32_t flags; /* in, mask of MSM_SUBMIT_BO_x */ + uint32_t handle; /* in, GEM handle */ + uint64_t presumed; /* in/out, presumed buffer address */ +}; +#endif + struct tu_bo_list { uint32_t count; -- 2.30.2