From 9694c18659adede6a4d0ecdcdaec9e3f12a120e1 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Tue, 10 Oct 2017 13:56:06 +0900 Subject: nexell: add gem buffer type 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 --- nexell/nexell_drm.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) 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 -- cgit v1.2.3