turnip: Only include msm_drm in tu_drm.c
authorKristian H. Kristensen <hoegsberg@google.com>
Wed, 5 Aug 2020 00:24:03 +0000 (17:24 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 5 Aug 2020 01:19:22 +0000 (01:19 +0000)
We copy the definition for struct drm_msm_gem_submit_bo and flags to
keep the bo list code working for now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5999>

src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_drm.c
src/freedreno/vulkan/tu_private.h

index ddc4db1..9dd95ce 100644 (file)
@@ -33,7 +33,6 @@
 #include <string.h>
 #include <sys/sysinfo.h>
 #include <unistd.h>
-#include <xf86drm.h>
 
 #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"
 
index 339a72a..50bca53 100644 (file)
@@ -22,8 +22,6 @@
  * DEALINGS IN THE SOFTWARE.
  */
 
-#include "tu_private.h"
-
 #include <errno.h>
 #include <fcntl.h>
 #include <stdint.h>
@@ -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,
index 40c2fb0..3d1ed0f 100644 (file)
@@ -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;