summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew F. Davis2019-06-11 16:12:17 -0500
committerPraneeth Bajjuri2019-06-25 17:50:47 -0500
commitc712778bbe4f5c0d97c378dbf97897d40049f9ca (patch)
treef5ec59afa4c2d24971278fd29c3c66e5e44767f8
parent9426d6fd12f3c3cf91048861670154e14570606e (diff)
downloadhardware-ti-am57x-d-pie-core-release.tar.gz
hardware-ti-am57x-d-pie-core-release.tar.xz
hardware-ti-am57x-d-pie-core-release.zip
libhwcomposer: Remove reliance on shared header for stride alignmentd-pie-core-release
The allocated stride of graphics buffers is determined by many factors in a given system including requirements by various components that work with them. Because of this the buffer stride produced by gralloc may change even for single system given it's build time settings. Due to this, relying on a definition in a shared header file can be fragile. Luckily our Gralloc implementation has a way to share a given buffer's stride in the attached header information. Use this value instead of calculating it ourselves. Signed-off-by: Andrew F. Davis <afd@ti.com>
-rw-r--r--libhwcomposer/drmfb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhwcomposer/drmfb.cpp b/libhwcomposer/drmfb.cpp
index a368c10..8905ff6 100644
--- a/libhwcomposer/drmfb.cpp
+++ b/libhwcomposer/drmfb.cpp
@@ -43,7 +43,7 @@ DRMFramebuffer::DRMFramebuffer(int drm_fd, buffer_handle_t handle) :
43 this->height = img_hnd->iHeight; 43 this->height = img_hnd->iHeight;
44 this->format = convert_hal_to_drm_format(img_hnd->iFormat, true); 44 this->format = convert_hal_to_drm_format(img_hnd->iFormat, true);
45 this->bo[0] = gem_handle; 45 this->bo[0] = gem_handle;
46 this->pitches[0] = ALIGN(img_hnd->iWidth, HW_ALIGN) * get_format_bpp(img_hnd->iFormat) >> 3; 46 this->pitches[0] = img_hnd->aiStride[0] * get_format_bpp(img_hnd->iFormat) >> 3;
47 this->offsets[0] = 0; 47 this->offsets[0] = 0;
48 this->drm_fd = drm_fd; 48 this->drm_fd = drm_fd;
49 49