summaryrefslogtreecommitdiff
path: root/vmeta_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'vmeta_lib.c')
-rw-r--r--vmeta_lib.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/vmeta_lib.c b/vmeta_lib.c
index 9fccd3c..01ae124 100644
--- a/vmeta_lib.c
+++ b/vmeta_lib.c
@@ -49,7 +49,6 @@
#define MAP_IO_MEM 0
#define MAP_IO_HW_CONTEXT 1
-#define MAP_IO_VMETA_OBJ 2
#define VMETA_KERN_MIN_VER 104
#define VMETA_USER_VER "build-004"
@@ -520,6 +519,7 @@ static void dbg_printf(UNSG32 dbglevel, const char* format, ...)
SIGN32 vdec_os_api_get_hw_obj_addr(UNSG32* vaddr,UNSG32 size)
{
vdec_os_driver_cb_t *vdec = vdec_iface;
+ struct vmeta_mmap arg;
void *addr;
int ret;
@@ -529,12 +529,17 @@ SIGN32 vdec_os_api_get_hw_obj_addr(UNSG32* vaddr,UNSG32 size)
return VDEC_OS_DRIVER_OK;
}
- ret = vmeta_get_map(vdec, MAP_IO_VMETA_OBJ, size, &addr, NULL);
+ memset(&arg, 0, sizeof(arg));
+ arg.size = size;
+
+ ret = ioctl(vdec->fd, VMETA_CMD_MAP_SW_CONTEXT, &arg);
if (ret < 0)
return ret;
- dbg_printf(VDEC_DEBUG_MEM, "MAP_IO_VMETA_OBJ virtual 0x%p size=%d\n",
- addr, size);
+ addr = (void *)(uintptr_t)arg.addr;
+
+ dbg_printf(VDEC_DEBUG_MEM, "%s: virtual %p size=%d\n",
+ __FUNCTION__, addr, size);
*vaddr = (UNSG32)addr;
vdec->vdec_obj_va = addr;