From a444f3041b3e18d17462147e21235b8604a8d3ac Mon Sep 17 00:00:00 2001 From: KalimochoAz Date: Thu, 17 Feb 2011 00:45:16 +0100 Subject: [PATCH] Modified more libs and creation for blobs Change-Id: Ie94e2f2f512c399959636eacc16e43ae1ec4dfee --- click.mk | 8 +------- init.bahamas.rc | 3 +++ libcopybit/copybit.cpp | 6 +++--- libgralloc/framebuffer.cpp | 3 --- setup-makefiles.sh | 7 ------- 5 files changed, 7 insertions(+), 20 deletions(-) diff --git a/click.mk b/click.mk index b1ab5b8..0d5e144 100644 --- a/click.mk +++ b/click.mk @@ -16,14 +16,8 @@ DEVICE_PACKAGE_OVERLAYS += device/htc/click/overlay -# Live wallpaper packages -PRODUCT_PACKAGES += \ - LiveWallpapersPicker \ - librs_jni - -# Publish that we support the live wallpaper feature. +# Defines for Vold to config fstab defs PRODUCT_COPY_FILES += \ - packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml \ device/htc/click/vold.fstab:system/etc/vold.fstab PRODUCT_PACKAGES += \ diff --git a/init.bahamas.rc b/init.bahamas.rc index 642968d..3219b0b 100644 --- a/init.bahamas.rc +++ b/init.bahamas.rc @@ -40,6 +40,9 @@ on boot # Revise su permisions to ensure all users can use it chmod 06755 /system/xbin/su + # revise fb0 permission for copybit + chmod 0666 /dev/graphics/fb0 + # cpufreq configurations write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 40000 write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 85 diff --git a/libcopybit/copybit.cpp b/libcopybit/copybit.cpp index 7130ca7..228deaa 100644 --- a/libcopybit/copybit.cpp +++ b/libcopybit/copybit.cpp @@ -41,7 +41,7 @@ /******************************************************************************/ #if defined(COPYBIT_MSM7K) -#define MAX_SCALE_FACTOR (4) +#define MAX_SCALE_FACTOR (3) #define MAX_DIMENSION (4096) #elif defined(COPYBIT_QSD8K) #define MAX_SCALE_FACTOR (8) @@ -453,7 +453,7 @@ static int open_copybit(const struct hw_module_t* module, const char* name, ctx->mAlpha = MDP_ALPHA_NOP; ctx->mFlags = 0; ctx->mFD = open("/dev/graphics/fb0", O_RDWR, 0); - + if (ctx->mFD < 0) { status = errno; LOGE("Error opening frame buffer errno=%d (%s)", @@ -462,7 +462,7 @@ static int open_copybit(const struct hw_module_t* module, const char* name, } else { struct fb_fix_screeninfo finfo; if (ioctl(ctx->mFD, FBIOGET_FSCREENINFO, &finfo) == 0) { - if (strcmp(finfo.id, "msmfb") == 0) { + if (strncmp(finfo.id, "msmfb", 5) == 0) { /* Success */ status = 0; } else { diff --git a/libgralloc/framebuffer.cpp b/libgralloc/framebuffer.cpp index 46627f3..7587858 100644 --- a/libgralloc/framebuffer.cpp +++ b/libgralloc/framebuffer.cpp @@ -372,9 +372,6 @@ int fb_device_open(hw_module_t const* module, const char* name, *device = &dev->device.common; } - - // Close the gralloc module - gralloc_close(gralloc_device); } return status; } diff --git a/setup-makefiles.sh b/setup-makefiles.sh index 2dcd98f..a9ab1c3 100755 --- a/setup-makefiles.sh +++ b/setup-makefiles.sh @@ -39,15 +39,8 @@ mkdir -p ../../../vendor/$MANUFACTURER/$DEVICE # Live wallpaper packages PRODUCT_PACKAGES := \\ LiveWallpapers \\ - LiveWallpapersPicker \\ - MagicSmokeWallpapers \\ - VisualizationWallpapers \\ librs_jni -# Publish that we support the live wallpaper feature. -PRODUCT_COPY_FILES := \\ - packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:/system/etc/permissions/android.software.live_wallpaper.xml - # Pick up overlay for features that depend on non-open-source files DEVICE_PACKAGE_OVERLAYS := vendor/__MANUFACTURER__/__DEVICE__/overlay