libgles-omap3-es23: avoid reloading the driver needlessly
authorGrazvydas Ignotas <notasas@gmail.com>
Mon, 8 Dec 2014 22:40:35 +0000 (00:40 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 8 Dec 2014 22:40:35 +0000 (00:40 +0200)
I've seen it to lock up SGX hardware on my CC unit.

recipes/powervr-drivers/files/rc.pvr
recipes/powervr-drivers/libgles-omap3-es23_4.00.00.01.bb
recipes/powervr-drivers/libgles-omap3.inc

index e0e3aa8..fe4bd4c 100755 (executable)
@@ -80,10 +80,7 @@ fbset -vyres $(expr $YRES \* 3)
 
        echo Starting PVR
 
-       load_driver
-
        touch /etc/powervr-esrev
-
        SAVED_ESREVISION="$(cat /etc/powervr-esrev)"
 
        devmem2 0x48004B48 w 0x2 > /dev/null
@@ -95,7 +92,7 @@ fbset -vyres $(expr $YRES \* 3)
        # enable hardware supervised domain power state transition - makes suspend work
        devmem2 0x48004B48 w 0x3 > /dev/null
 
-       if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then
+       if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" -o ! -e /etc/powervr-kmodver ] ; then
                sdkver=`echo /usr/lib/ES${ES_REVISION}.0/libGLESv2.so.1.* | sed -e 's:.*lib.*.so.\(.*\).*:\1:'`
                echo -n "Starting SGX fixup for"
                echo " ES${ES_REVISION}.x (${sdkver})"
@@ -110,10 +107,11 @@ fbset -vyres $(expr $YRES \* 3)
                if [ "${sdkver}" != "${oldkmod}" ]; then
                        echo "Switching driver to ${sdkver}"
                        echo "${sdkver}" > /etc/powervr-kmodver
-                       unload_driver
-                       load_driver
                fi
        fi
+
+       load_driver
+
        if test -x /usr/bin/pvrsrvinit; then
                /usr/bin/pvrsrvinit
        elif test -x /usr/bin/pvrsrvctl; then
index 6026d1b..b69e21f 100644 (file)
@@ -6,7 +6,7 @@ ES5LOCATION = "none"
 
 require libgles-omap3.inc
 
-PR = "r3"
+PR = "r4"
 
 SGXPV = "4_00_00_01"
 IMGPV = "1.4.14.2616"
index b0f8441..c9b9135 100644 (file)
@@ -45,7 +45,7 @@ do_configure() {
        done 
 
        # Attempt to create proper library softlinks
-       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
+       for sofile in $(find ${S} -name "lib*.so"); do
                if [ "$(readlink -n ${sofile})" = "" ] ; then
                        mv $sofile ${sofile}.${IMGPV}
                        ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}