Add tiled capability. 24/202024/3
authorXuelian Bai <xuelian.bai@samsung.com>
Fri, 22 Mar 2019 12:33:41 +0000 (20:33 +0800)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 11 Jun 2019 02:13:52 +0000 (02:13 +0000)
Change-Id: I6756effbfce23d390e87b1bbca271e8d12cd25c8

src/tbm_bufmgr_vc4.c

index 6dc364b..58f78b3 100644 (file)
@@ -84,6 +84,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define S5P_FIMV_NV12MT_HALIGN                  128
 #define S5P_FIMV_NV12MT_VALIGN                  64
 
+//#define VC4_TILED_FORMAT 1
+
 struct dma_buf_info {
        unsigned long   size;
        unsigned int    fence_supported;
@@ -954,7 +956,11 @@ tbm_vc4_bufmgr_get_capabilities(tbm_backend_bufmgr_data *bufmgr_data, tbm_error_
 {
        tbm_bufmgr_capability capabilities = TBM_BUFMGR_CAPABILITY_NONE;
 
+#ifdef VC4_TILED_FORMAT
+       capabilities = TBM_BUFMGR_CAPABILITY_SHARE_KEY|TBM_BUFMGR_CAPABILITY_SHARE_FD|TBM_BUFMGR_CAPABILITY_TILED_MEMORY;
+#else
        capabilities = TBM_BUFMGR_CAPABILITY_SHARE_KEY|TBM_BUFMGR_CAPABILITY_SHARE_FD;
+#endif
 
        if (error)
                *error = TBM_ERROR_NONE;
@@ -1001,7 +1007,6 @@ tbm_vc4_bufmgr_get_supported_formats(tbm_backend_bufmgr_data *bufmgr_data,
        return TBM_ERROR_NONE;
 }
 
-//#define VC4_TILED_FORMAT 1
 
 #ifdef VC4_TILED_FORMAT
 #include <drm_fourcc.h>