summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2026-09-28 21:19:31 -0300
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2026-09-29 10:52:40 +0000
commit3bd965d1bebb894efb805f451c19a3187f6dff07 (patch)
treeb13256c759fc4dcb9370163b1267008b7a78f1ea
parent61449d50ea3b7b65f21f365e97220cbf0af13d7c (diff)
downloadmeta-freescale-3bd965d1bebb894efb805f451c19a3187f6dff07.tar.gz
opencv: Follow IMXGPU_OPENCL_PROVIDER for OpenCL support
OpenCL was enabled for every i.MX GPU but i.MX 8M Mini. On i.MX 7ULP the Vivante driver has no OpenCL either, and on i.MX 95 the Mali GPU relies on the standard ICD loader, which requires the opencl distro feature; without it virtual/libopencl1 has no provider and opencv cannot be built. Enable OpenCL on Vivante GPUs only when IMXGPU_OPENCL_PROVIDER is set, which covers the i.MX 8M Mini case without a SoC-specific override, and on other GPUs only when the opencl distro feature is enabled. Tested with 'bitbake -n opencv' for imx7ulpevk, imx8mm-lpddr4-evk, imx8mp-lpddr4-evk, imx8mq-evk and imx95-19x19-verdin, with and without the opencl distro feature. Reported-by: Francesco Dolcini <francesco.dolcini@toradex.com> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> (cherry picked from commit 6fba0d2cc3f6142d13ecc98ac443a83cbf674dc6)
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.inc b/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.inc
index 10d7fccfd..9e74337f9 100644
--- a/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.inc
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/opencv_4.13.0.imx.inc
@@ -61,9 +61,12 @@ PACKAGECONFIG:append = " \
61 ${PACKAGECONFIG_OPENCL} \ 61 ${PACKAGECONFIG_OPENCL} \
62" 62"
63 63
64# Vivante GPUs use OpenCL only when their driver provides it (see
65# IMXGPU_OPENCL_PROVIDER), other GPUs rely on the standard ICD loader, which
66# needs the opencl distro feature.
64PACKAGECONFIG_OPENCL = "" 67PACKAGECONFIG_OPENCL = ""
65PACKAGECONFIG_OPENCL:imxgpu = "opencl" 68PACKAGECONFIG_OPENCL:imxgpu = "${@bb.utils.filter('DISTRO_FEATURES', 'opencl', d)}"
66PACKAGECONFIG_OPENCL:mx8mm-nxp-bsp = "" 69PACKAGECONFIG_OPENCL:imxviv = "${@oe.utils.ifelse(d.getVar('IMXGPU_OPENCL_PROVIDER'), 'opencl', '')}"
67 70
68PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx," 71PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx,"
69PACKAGECONFIG[qt5] = "-DWITH_QT=ON -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native," 72PACKAGECONFIG[qt5] = "-DWITH_QT=ON -DOE_QMAKE_PATH_EXTERNAL_HOST_BINS=${STAGING_BINDIR_NATIVE} -DCMAKE_PREFIX_PATH=${STAGING_BINDIR_NATIVE}/cmake,-DWITH_QT=OFF,qtbase qtbase-native,"