summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2017-10-10 13:56:06 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2017-10-10 05:46:55 +0000
commit9694c18659adede6a4d0ecdcdaec9e3f12a120e1 (patch)
tree50e8fab67f2b3090160b9c6a0c384d7b1f5f07a7
parent22efc32fc5d9893fc5a5b7fe9c3e62b113178643 (diff)
downloadlibdrm-9694c18659adede6a4d0ecdcdaec9e3f12a120e1.tar.gz
libdrm-9694c18659adede6a4d0ecdcdaec9e3f12a120e1.tar.bz2
libdrm-9694c18659adede6a4d0ecdcdaec9e3f12a120e1.zip
Add gem buffer type to sync with kernel header. libtbm nexell backend refers to gem buffer type for cache control. So this patch adds the buffer type to identify if cache operation is required or not. Change-Id: I7760a54496a1a9e7c2f17f0a77e640e346d9b455 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--nexell/nexell_drm.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/nexell/nexell_drm.h b/nexell/nexell_drm.h
index f5ca7544..998f6fef 100644
--- a/nexell/nexell_drm.h
+++ b/nexell/nexell_drm.h
@@ -59,6 +59,55 @@ struct nx_drm_gem_info {
uint64_t size;
};
+/*
+ * nexell gem memory type
+ */
+enum nx_gem_type {
+ /*
+ * DMA continuous memory
+ * user : non-cacheable
+ * kernel : non-cacheable
+ */
+ NEXELL_BO_DMA,
+
+ /*
+ * DMA continuous memory, allocate from DMA,
+ * user : cacheable
+ * kernel : non-cacheable
+ */
+ NEXELL_BO_DMA_CACHEABLE,
+
+ /*
+ * System continuous memory, allocate from system
+ * user : non-cacheable
+ * kernel : non-cacheable
+ */
+ NEXELL_BO_SYSTEM,
+
+ /*
+ * System continuous memory, allocate from system
+ * user : cacheable
+ * kernel : cacheable
+ */
+ NEXELL_BO_SYSTEM_CACHEABLE,
+
+ /*
+ * System non-continuous memory, allocate from system
+ * user : non-cacheable
+ * kernel : non-cacheable
+ */
+ NEXELL_BO_SYSTEM_NONCONTIG,
+
+ /*
+ * System non-continuous memory, allocate from system
+ * user : cacheable
+ * kernel : cacheable
+ */
+ NEXELL_BO_SYSTEM_NONCONTIG_CACHEABLE,
+
+ NEXELL_BO_MAX,
+};
+
#define DRM_NX_GEM_CREATE 0x00
#define DRM_NX_GEM_GET 0x04
#define DRM_NX_GEM_SYNC 0x05