diff options
| author | Otavio Salvador <otavio@ossystems.com.br> | 2026-09-28 21:19:31 -0300 |
|---|---|---|
| committer | github-actions[bot] <github-actions[bot]@users.noreply.github.com> | 2026-09-29 10:52:40 +0000 |
| commit | 3bd965d1bebb894efb805f451c19a3187f6dff07 (patch) | |
| tree | b13256c759fc4dcb9370163b1267008b7a78f1ea | |
| parent | 61449d50ea3b7b65f21f365e97220cbf0af13d7c (diff) | |
| download | meta-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.inc | 7 |
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. | ||
| 64 | PACKAGECONFIG_OPENCL = "" | 67 | PACKAGECONFIG_OPENCL = "" |
| 65 | PACKAGECONFIG_OPENCL:imxgpu = "opencl" | 68 | PACKAGECONFIG_OPENCL:imxgpu = "${@bb.utils.filter('DISTRO_FEATURES', 'opencl', d)}" |
| 66 | PACKAGECONFIG_OPENCL:mx8mm-nxp-bsp = "" | 69 | PACKAGECONFIG_OPENCL:imxviv = "${@oe.utils.ifelse(d.getVar('IMXGPU_OPENCL_PROVIDER'), 'opencl', '')}" |
| 67 | 70 | ||
| 68 | PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx," | 71 | PACKAGECONFIG[openvx] = "-DWITH_OPENVX=ON -DOPENVX_ROOT=${STAGING_LIBDIR} -DOPENVX_LIB_CANDIDATES='OpenVX;OpenVXU',-DWITH_OPENVX=OFF,virtual/libopenvx," |
| 69 | PACKAGECONFIG[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," | 72 | PACKAGECONFIG[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," |
