diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-12-31 18:51:04 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-12-31 18:51:04 +0100 |
commit | 9367509c6c4d8e83cdb62b53dca701f2592cecfa (patch) | |
tree | 6b2fa7eb43a47588c21a62a44495a0c538726616 /modules/gralloc/gralloc.cpp | |
parent | 9e5b89e2de3eab473bcab0133c969493c42e5c11 (diff) | |
download | hardware_libhardware-9367509c6c4d8e83cdb62b53dca701f2592cecfa.zip hardware_libhardware-9367509c6c4d8e83cdb62b53dca701f2592cecfa.tar.gz hardware_libhardware-9367509c6c4d8e83cdb62b53dca701f2592cecfa.tar.bz2 |
gralloc: Correct stride for maguroreplicant-4.2-0004replicant-4.2-0003replicant-4.2-0002replicant-4.2-0001replicant-4.2
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'modules/gralloc/gralloc.cpp')
-rw-r--r-- | modules/gralloc/gralloc.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index 796948d..730c040 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -237,6 +237,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); } |