common : Enable ubwc based on hardware support

Some target may or may not have support for ubwc.
Hence based on support available enabling the ubwc.

Change-Id: I46a901228dba9c9aef26283ce97cd5f425a9cdb8
This commit is contained in:
Ramakant Singh 2016-01-14 13:38:29 +05:30
parent 290bd8443a
commit 185405f559
1 changed files with 16 additions and 0 deletions

View File

@ -270,6 +270,22 @@ do
fi
done
# check for mdp caps
setprop debug.gralloc.gfx_ubwc_disable 1
file=/sys/class/graphics/fb0/mdp/caps
if [ -f "$file" ]
then
cat $file | while read line; do
case "$line" in
*"ubwc"*)
setprop debug.gralloc.enable_fb_ubwc 1
setprop debug.gralloc.gfx_ubwc_disable 0
esac
done
fi
file=/sys/class/graphics/fb0
if [ -d "$file" ]
then