diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-12-31 18:51:04 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-07-22 00:13:40 +0200 |
commit | ef43072730557b6af2c8c09686b2f3c5ceac6f1f (patch) | |
tree | aa444febad4856258f01508bee7469c1e57fe80c | |
parent | 3e9160f602fb2a819a046ecb5e1320369e2a7b7e (diff) | |
download | hardware_libhardware-ef43072730557b6af2c8c09686b2f3c5ceac6f1f.tar.gz hardware_libhardware-ef43072730557b6af2c8c09686b2f3c5ceac6f1f.tar.bz2 hardware_libhardware-ef43072730557b6af2c8c09686b2f3c5ceac6f1f.zip |
gralloc: Correct stride for maguroHEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004-rc4replicant-6.0-0004-rc3replicant-6.0-0004-rc2replicant-6.0-0004-rc1replicant-6.0-0004replicant-6.0
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | modules/gralloc/Android.mk | 4 | ||||
-rw-r--r-- | modules/gralloc/gralloc.cpp | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/modules/gralloc/Android.mk b/modules/gralloc/Android.mk index 092e851..727c99a 100644 --- a/modules/gralloc/Android.mk +++ b/modules/gralloc/Android.mk @@ -33,4 +33,8 @@ ifeq ($(TARGET_USE_PAN_DISPLAY),true) LOCAL_CFLAGS += -DUSE_PAN_DISPLAY=1 endif +ifeq ($(TARGET_DEVICE),maguro) + LOCAL_CFLAGS += -DTARGET_DEVICE_MAGURO +endif + include $(BUILD_SHARED_LIBRARY) diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index a9fbc80..892265c 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -230,6 +230,15 @@ static int gralloc_alloc(alloc_device_t* dev, int err; if (usage & GRALLOC_USAGE_HW_FB) { err = gralloc_alloc_framebuffer(dev, size, usage, pHandle); + +#ifdef TARGET_DEVICE_MAGURO + // PVR requires stride to be a multiple of 32 + // omap kernel drivers set line_length accordingly + // so we need to correct the stride here + // in case framebuffer width is not a multiple of 32 + stride += (31); + stride &= ~(31); +#endif } else { err = gralloc_alloc_buffer(dev, size, usage, pHandle); } |