mirror of
https://github.com/tsukumijima/libmali-rockchip.git
synced 2026-01-23 16:00:49 +01:00
overlay: Fix rk3288 libmali selecting
Change-Id: I8dd7bde9fffd7b5245e6f571b7867319d6d96a3f Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
This commit is contained in:
parent
17dd6012f3
commit
53201e4131
1 changed files with 16 additions and 16 deletions
|
|
@ -5,24 +5,24 @@
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
|
GPUINFO=/sys/devices/platform/*gpu/gpuinfo
|
||||||
|
|
||||||
# create libmali.so link depend on chips type in the runtime
|
# filter out non-rk3288 devices
|
||||||
GPU_VERSION=$(cat /sys/devices/platform/*gpu/gpuinfo)
|
grep -q "Mali-T76x.*0x0750" $GPUINFO || exit 0
|
||||||
if [ -f "/usr/lib/libmali.so" ]; then
|
|
||||||
cd /usr/lib
|
LIBMALI=$(find /usr/lib -maxdepth 2 -name libmali.so)
|
||||||
else
|
cd ${LIBMALI%/*}
|
||||||
cd /usr/lib/arm-linux-gnueabihf
|
|
||||||
fi
|
# find the correct libmali for the gpu chip
|
||||||
if [ "$GPU_VERSION" = 'Mali-T76x MP4 r1p0 0x0750' -o "$GPU_VERSION" = 'Mali-T76x 4 cores r1p0 0x0750' ];
|
SUBVER=$(grep -o "r[01]p0" $GPUINFO)
|
||||||
then
|
LIBMALI=$(ls libmali-midgard-t76x-*-$SUBVER-*.so | head -1)
|
||||||
#rk3288W, r1 version gpu chip
|
[ -z "$LIBMALI" ] && exit 1
|
||||||
mount --bind libmali-midgard-t76x-r18p0-r1p0-wayland.so libmali.so
|
|
||||||
fi
|
# bind with the new libmali
|
||||||
cd -
|
echo "Using $LIBMALI"
|
||||||
|
mount --bind $LIBMALI libmali.so
|
||||||
;;
|
;;
|
||||||
stop)
|
stop) ;;
|
||||||
printf "stop finished"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop}"
|
echo "Usage: $0 {start|stop}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue