summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXuelian Bai <xuelian.bai@samsung.com>2019-03-22 20:33:41 +0800
committerSooChan Lim <sc1.lim@samsung.com>2019-06-11 02:13:52 +0000
commit7f14742d7ec2feb220d3e555a23b742041650795 (patch)
treef3e416efdfeb0ca939f541354bbb01509a4e2d22
parente3680281fe46c813c52defa00a2de76dace2ead6 (diff)
downloadlibtbm-vc4-7f14742d7ec2feb220d3e555a23b742041650795.tar.gz
libtbm-vc4-7f14742d7ec2feb220d3e555a23b742041650795.tar.bz2
libtbm-vc4-7f14742d7ec2feb220d3e555a23b742041650795.zip
Add tiled capability.
Change-Id: I6756effbfce23d390e87b1bbca271e8d12cd25c8
-rw-r--r--src/tbm_bufmgr_vc4.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tbm_bufmgr_vc4.c b/src/tbm_bufmgr_vc4.c
index 6dc364b..58f78b3 100644
--- a/src/tbm_bufmgr_vc4.c
+++ b/src/tbm_bufmgr_vc4.c
@@ -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>