diff options
Diffstat (limited to 'recipes/powervr-drivers')
9 files changed, 147 insertions, 10 deletions
diff --git a/recipes/powervr-drivers/libgles-omap3-3.00.00.09/rc.pvr b/recipes/powervr-drivers/libgles-omap3-3.00.00.09/rc.pvr new file mode 100755 index 0000000000..69c9f81c1c --- /dev/null +++ b/recipes/powervr-drivers/libgles-omap3-3.00.00.09/rc.pvr @@ -0,0 +1,54 @@ +#!/bin/sh + +if [ "$1" = "" ]; then + echo PVR-INIT: Please use start, stop, or restart. + exit 1 +fi + +if [ "$1" = "stop" -o "$1" = "restart" ]; then + echo Stopping PVR + #rmmod bc_example + rmmod omaplfb 2>/dev/null + rmmod pvrsrvkm 2>/dev/null +fi + +if [ "$1" = "stop" ]; then + exit 0 +fi + +echo Starting PVR +insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") +#modprobe bc_example +modprobe omaplfb + +pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` + +if [ -e /dev/pvrsrvkm ] ; then + rm -f /dev/pvrsrvkm +fi + +mknod /dev/pvrsrvkm c $pvr_maj 0 +chmod 666 /dev/pvrsrvkm + +touch /etc/powervr-esrev + +SAVED_ESREVISION="$(cat /etc/powervr-esrev)" +ES_REVISION="$(cat /proc/cpuinfo | grep "CPU revision" | awk -F: '{print $2}')" + +if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then + echo -n "Starting SGX fixup for" + if [ "${ES_REVISION}" = " 3" ] ; then + echo " ES3.x" + cp -a /usr/lib/ES3.0/* /usr/lib + cp -a /usr/bin/ES3.0/* /usr/bin + else + echo "ES 2.x" + cp -a /usr/lib/ES2.0/* /usr/lib + cp -a /usr/bin/ES2.0/* /usr/bin + fi + + echo "${ES_REVISION}" > /etc/powervr-esrev +fi + +/usr/bin/pvrsrvinit + diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc index 6813b71aab..789632237b 100644 --- a/recipes/powervr-drivers/libgles-omap3.inc +++ b/recipes/powervr-drivers/libgles-omap3.inc @@ -66,15 +66,7 @@ inherit update-rc.d INITSCRIPT_NAME = "pvr-init" INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." -do_accept_license() { - export HOME="${WORKDIR}" - echo "Y -q -Y -${S}" | ${WORKDIR}/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin --mode console -} - -addtask accept_license after do_unpack before do_configure +require ../dvsdk/ti-dspbios.inc do_compile() { for sofile in $(find ${S} -name "lib*Open*.so") $(find ${S} -name "lib*srv*.so") $(find ${S} -name "lib*gl*.so") $(find ${S} -name "libpvr*.so") $(find ${S} -name "lib*GL*.so"); do @@ -96,7 +88,7 @@ do_install () { cp -pP ${BINLOCATION}/gles1test1 ${D}${bindir}/ cp -pP ${BINLOCATION}/gles1_texture_stream ${D}${bindir}/ cp -pP ${BINLOCATION}/gles2test1 ${D}${bindir}/ - cp -pP ${BINLOCATION}/pvrsrvinit ${D}${bindir}/ + cp -pP ${BINLOCATION}/p[dv]* ${D}${bindir}/ cp -pP ${BINLOCATION}/xgles1test1 ${D}${bindir}/ cp -pP ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true @@ -106,6 +98,7 @@ do_install () { cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/ cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/ cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES2/ + cp -PPr ${S}/include/*.h ${D}${includedir} || true install -d ${D}${sysconfdir}/init.d/ cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init @@ -134,6 +127,7 @@ do_stage () { cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${STAGING_INCDIR}/ cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${STAGING_INCDIR}/GLES/ cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${STAGING_INCDIR}/GLES2/ + cp -PPr ${S}/include/*.h ${STAGING_INCDIR} || true } pkg_postinst() { diff --git a/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb b/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb index a5c0d99143..2256c5b032 100644 --- a/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb +++ b/recipes/powervr-drivers/libgles-omap3_3.00.00.08.bb @@ -4,6 +4,7 @@ DEFAULT_PREFERENCE = "1" SGXPV = "3_00_00_08" IMGPV = "1.3.13.1607" +BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin" # Quality control is really poor on these SDKs, so hack around the latest madness: FILES_${PN} += "${libdir}/*.so" diff --git a/recipes/powervr-drivers/libgles-omap3_3.00.00.09.bb b/recipes/powervr-drivers/libgles-omap3_3.00.00.09.bb new file mode 100644 index 0000000000..6a04e8359b --- /dev/null +++ b/recipes/powervr-drivers/libgles-omap3_3.00.00.09.bb @@ -0,0 +1,26 @@ +require libgles-omap3.inc + +DEFAULT_PREFERENCE = "-1" + +SGXPV = "3_00_00_09" +IMGPV = "1.3.13.1832" +BINFILE := "OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin" + +# The ES2.x and ES3.x CPUs have different SGX hardware, so we need to install 2 sets of userspace +do_install_append() { + install -d ${D}${libdir}/ES3.0 + install -d ${D}${libdir}/ES2.0 + install -d ${D}${bindir}/ES3.0 + install -d ${D}${bindir}/ES2.0 + + cp ${S}/gfx_rel_es2.x/lib* ${D}${libdir}/ES2.0/ + cp ${S}/gfx_rel_es2.x/p[dv]* ${D}${bindir}/ES2.0/ + + cp ${D}${libdir}/lib*${IMGPV} ${D}${libdir}/ES3.0/ + cp ${D}${bindir}/p[dv]* ${D}${bindir}/ES3.0 +} + +# Quality control is really poor on these SDKs, so hack around the latest madness: +FILES_${PN} += "${libdir}/*.so" +FILES_${PN}-dev = "${includedir}" + diff --git a/recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-DSS2.patch b/recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-DSS2.patch new file mode 100644 index 0000000000..c319ac57a9 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/0002-Compile-fixes-for-DSS2.patch @@ -0,0 +1,11 @@ +--- a/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c ++++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c +@@ -171,7 +171,7 @@ + #if !defined (CONFIG_OMAP2_DSS) + omap_dispc_free_irq(DISPC_IRQ_VSYNC, OMAPLFBVSyncISR, psSwapChain); + #else +- omap_dispc_unregister_isr(OMAPLFBVSyncISR); ++ omap_dispc_unregister_isr(OMAPLFBVSyncISR, psSwapChain, DISPC_IRQ_VSYNC); + #endif + return PVRSRV_OK; + } diff --git a/recipes/powervr-drivers/omap3-sgx-modules/build_es3.x_sgx.patch b/recipes/powervr-drivers/omap3-sgx-modules/build_es3.x_sgx.patch new file mode 100644 index 0000000000..93df6b3da5 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/build_es3.x_sgx.patch @@ -0,0 +1,11 @@ +--- /tmp/Makefile 2009-05-04 01:14:25.000000000 +0530 ++++ omap3-sgx-modules-1.3.13.1607/Makefile 2009-05-04 01:14:36.000000000 +0530 +@@ -10,7 +10,7 @@ export BUILD = debug + export KBUILD_EXTRA_SYMBOLS = `pwd`/services4/srvkm/env/linux/kbuild/Module.symvers + + SGXCORE = 530 +-CORE = -DSGX530 -DSUPPORT_SGX530 -DSGX_CORE_REV=103 ++CORE = -DSGX530 -DSUPPORT_SGX530 -DSGX_CORE_REV=121 + + SUPPORT_SGX = 1 + SUPPORT_HW_RECOVERY = 1 diff --git a/recipes/powervr-drivers/omap3-sgx-modules/omap3-sgx-modules-1.3.13.1607.tar.bz2 b/recipes/powervr-drivers/omap3-sgx-modules/omap3-sgx-modules-1.3.13.1607.tar.bz2 Binary files differnew file mode 100644 index 0000000000..5c2fd6a0ab --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/omap3-sgx-modules-1.3.13.1607.tar.bz2 diff --git a/recipes/powervr-drivers/omap3-sgx-modules/rotation-dss2.patch b/recipes/powervr-drivers/omap3-sgx-modules/rotation-dss2.patch new file mode 100644 index 0000000000..ea4a6a10c6 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/rotation-dss2.patch @@ -0,0 +1,21 @@ +--- a/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2009-01-22 17:08:25.000000000 +0530 ++++ b/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2009-04-25 16:43:22.000000000 +0530 +@@ -1014,8 +1014,16 @@ + psPVRFBInfo->sSysAddr.uiAddr = psLINFBInfo->fix.smem_start; + psPVRFBInfo->sCPUVAddr = psLINFBInfo->screen_base; + +- psPVRFBInfo->ui32Width = psLINFBInfo->var.xres; +- psPVRFBInfo->ui32Height = psLINFBInfo->var.yres; ++ if ((psLINFBInfo->var.rotate == FB_ROTATE_CW) ++ || (psLINFBInfo->var.rotate == FB_ROTATE_CCW) ) { ++ ++ psPVRFBInfo->ui32Width = psLINFBInfo->var.yres; ++ psPVRFBInfo->ui32Height = psLINFBInfo->var.xres; ++ ++ } else { ++ psPVRFBInfo->ui32Width = psLINFBInfo->var.xres; ++ psPVRFBInfo->ui32Height = psLINFBInfo->var.yres; ++ } + psPVRFBInfo->ui32ByteStride = psLINFBInfo->fix.line_length; + psPVRFBInfo->ui32FBSize = FBSize; + psPVRFBInfo->ui32BufferSize = psPVRFBInfo->ui32Height * psPVRFBInfo->ui32ByteStride; diff --git a/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1607.bb b/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1607.bb new file mode 100644 index 0000000000..8e4d2a25bd --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules_1.3.13.1607.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs" +LICENSE = "GPLv2" + +inherit module + +SRC_URI = "file://omap3-sgx-modules-${PV}.tar.bz2 \ + file://0002-Compile-fixes-for-DSS2.patch;patch=1 \ + file://rotation-dss2.patch;patch=1 \ + file://build_es3.x_sgx.patch;patch=1 \ +" + +PVRBUILD = "release" + +MAKE_TARGETS = " BUILD=${PVRBUILD}" + +do_install() { + mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr + cp ${S}/pvrsrvkm.ko ${S}/services4/3rdparty/dc_omap3430_linux/omaplfb.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr +} |