From f98b448ee835646be48f530b3e6fe13b32b093f5 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Fri, 10 Oct 2014 03:19:58 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- recipes-bsp/imx-vpu/imx-vpu.inc | 22 ++++++ ...etVirtMem-returns-1-MAP_FAILED-on-failure.patch | 83 ++++++++++++++++++++++ recipes-bsp/imx-vpu/imx-vpu_11.09.02.bb | 7 ++ recipes-bsp/imx-vpu/imx-vpu_3.10.17-1.0.0.bb | 12 ++++ 4 files changed, 124 insertions(+) create mode 100644 recipes-bsp/imx-vpu/imx-vpu.inc create mode 100644 recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch create mode 100644 recipes-bsp/imx-vpu/imx-vpu_11.09.02.bb create mode 100644 recipes-bsp/imx-vpu/imx-vpu_3.10.17-1.0.0.bb (limited to 'recipes-bsp/imx-vpu') diff --git a/recipes-bsp/imx-vpu/imx-vpu.inc b/recipes-bsp/imx-vpu/imx-vpu.inc new file mode 100644 index 0000000..fd59770 --- /dev/null +++ b/recipes-bsp/imx-vpu/imx-vpu.inc @@ -0,0 +1,22 @@ +# Copyright (C) 2013 Freescale Semiconductor +DESCRIPTION = "Freescale VPU library" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://vpu/EULA.txt;md5=b063366b066c9f10037c59756a9ced54" +DEPENDS = "virtual/kernel" +inherit fsl-eula-unpack + +PLATFORM_mx5 = "IMX51" +PLATFORM_mx6 = "IMX6Q" + +SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true" + +do_compile () { + INCLUDE_DIR="-I${STAGING_KERNEL_DIR}/include/uapi -I${STAGING_KERNEL_DIR}/include" + + oe_runmake CROSS_COMPILE="${HOST_PREFIX}" PLATFORM="${PLATFORM}" INCLUDE="${INCLUDE_DIR}" all +} + +do_install () { + oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install +} + diff --git a/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch b/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch new file mode 100644 index 0000000..348a536 --- /dev/null +++ b/recipes-bsp/imx-vpu/imx-vpu/0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch @@ -0,0 +1,83 @@ +From 3f3e374391ddc5e605f604e5bcdf95e29b1bcc39 Mon Sep 17 00:00:00 2001 +From: Eric Nelson +Date: Fri, 20 Jun 2014 19:42:38 -0700 +Subject: [PATCH] IOGetVirtMem returns -1 (MAP_FAILED) on failure + +Upstream-Status: Pending + +Signed-off-by: Eric Nelson +--- + vpu/vpu_io.c | 2 +- + vpu/vpu_io.h | 2 ++ + vpu/vpu_lib.c | 8 ++++---- + 3 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/vpu/vpu_io.c b/vpu/vpu_io.c +index 8cbb571..14759da 100644 +--- a/vpu/vpu_io.c ++++ b/vpu/vpu_io.c +@@ -265,7 +265,7 @@ int IOSystemInit(void *callback) + goto err; + } + +- if (IOGetVirtMem(&bit_work_addr) <= 0) ++ if (IOGetVirtMem(&bit_work_addr) == -1) + goto err; + #endif + UnlockVpu(vpu_semap); +diff --git a/vpu/vpu_io.h b/vpu/vpu_io.h +index 392e04a..1e6340d 100644 +--- a/vpu/vpu_io.h ++++ b/vpu/vpu_io.h +@@ -64,6 +64,8 @@ int IOSystemInit(void *callback); + int IOSystemShutdown(void); + int IOGetPhyMem(vpu_mem_desc * buff); + int IOFreePhyMem(vpu_mem_desc * buff); ++ ++/* returns -1 ((int)MAP_FAILED) on failure */ + int IOGetVirtMem(vpu_mem_desc * buff); + int IOFreeVirtMem(vpu_mem_desc * buff); + int IOGetVShareMem(int size); +diff --git a/vpu/vpu_lib.c b/vpu/vpu_lib.c +index 1fb731b..7a7f42d 100644 +--- a/vpu/vpu_lib.c ++++ b/vpu/vpu_lib.c +@@ -1764,7 +1764,7 @@ RetCode vpu_EncStartOneFrame(EncHandle handle, EncParam * param) + err_msg("Unable to obtain physical mem\n"); + return RETCODE_FAILURE; + } +- if (IOGetVirtMem(&pEncInfo->picParaBaseMem) <= 0) { ++ if (IOGetVirtMem(&pEncInfo->picParaBaseMem) == -1) { + IOFreePhyMem(&pEncInfo->picParaBaseMem); + pEncInfo->picParaBaseMem.phy_addr = 0; + err_msg("Unable to obtain virtual mem\n"); +@@ -2982,7 +2982,7 @@ RetCode vpu_DecGetInitialInfo(DecHandle handle, DecInitialInfo * info) + UnlockVpu(vpu_semap); + return RETCODE_FAILURE; + } +- if (IOGetVirtMem(&pDecInfo->userDataBufMem) <= 0) { ++ if (IOGetVirtMem(&pDecInfo->userDataBufMem) == -1) { + IOFreePhyMem(&pDecInfo->userDataBufMem); + pDecInfo->userDataBufMem.phy_addr = 0; + err_msg("Unable to obtain virtual mem\n"); +@@ -4017,7 +4017,7 @@ RetCode vpu_DecStartOneFrame(DecHandle handle, DecParam * param) + UnlockVpu(vpu_semap); + return RETCODE_FAILURE; + } +- if (IOGetVirtMem(&pDecInfo->picParaBaseMem) <= 0) { ++ if (IOGetVirtMem(&pDecInfo->picParaBaseMem) == -1) { + IOFreePhyMem(&pDecInfo->picParaBaseMem); + pDecInfo->picParaBaseMem.phy_addr = 0; + err_msg("Unable to obtain virtual mem\n"); +@@ -4057,7 +4057,7 @@ RetCode vpu_DecStartOneFrame(DecHandle handle, DecParam * param) + UnlockVpu(vpu_semap); + return RETCODE_FAILURE; + } +- if (IOGetVirtMem(&pDecInfo->userDataBufMem) <= 0) { ++ if (IOGetVirtMem(&pDecInfo->userDataBufMem) == -1) { + IOFreePhyMem(&pDecInfo->userDataBufMem); + pDecInfo->userDataBufMem.phy_addr = 0; + err_msg("Unable to obtain virtual mem\n"); +-- +1.9.1 + diff --git a/recipes-bsp/imx-vpu/imx-vpu_11.09.02.bb b/recipes-bsp/imx-vpu/imx-vpu_11.09.02.bb new file mode 100644 index 0000000..c40c703 --- /dev/null +++ b/recipes-bsp/imx-vpu/imx-vpu_11.09.02.bb @@ -0,0 +1,7 @@ +# Copyright (C) 2013 Freescale Semiconductor +require imx-vpu.inc + +SRC_URI[md5sum] = "1988a08687a09ef8590e66ff17ac6ed3" +SRC_URI[sha256sum] = "783f136aa9b9257d4bffbdaf05bdcb85d177c544c3f8a4674421ba7b065ed5c0" + +COMPATIBLE_MACHINE = "(mx5)" diff --git a/recipes-bsp/imx-vpu/imx-vpu_3.10.17-1.0.0.bb b/recipes-bsp/imx-vpu/imx-vpu_3.10.17-1.0.0.bb new file mode 100644 index 0000000..7ed9590 --- /dev/null +++ b/recipes-bsp/imx-vpu/imx-vpu_3.10.17-1.0.0.bb @@ -0,0 +1,12 @@ +# Copyright (C) 2013, 2014 Freescale Semiconductor + +require imx-vpu.inc + +PE = "1" + +SRC_URI[md5sum] = "71ea1b803864101ebf88a1bab45514d2" +SRC_URI[sha256sum] = "cd8a7bd50ff3274db76a331cc6622d3ba4bb7c790ce778f303e49187df2dfd72" + +SRC_URI_append = " file://0001-IOGetVirtMem-returns-1-MAP_FAILED-on-failure.patch" + +COMPATIBLE_MACHINE = "(mx6)" -- cgit v1.2.3-54-g00ecf