OSDN Git Service

Add support to query tiling mode.
authorxue.yifei <yifei.xue@intel.com>
Wed, 15 Nov 2017 03:29:15 +0000 (11:29 +0800)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Thu, 30 Nov 2017 04:23:07 +0000 (20:23 -0800)
Jira: None.
Test: Build should pass
Signed-off-by: xue.yifei <yifei.xue@intel.com>
cros_gralloc/cros_gralloc_driver.cc
cros_gralloc/cros_gralloc_handle.h

index 28857c2..615cb61 100644 (file)
@@ -141,6 +141,7 @@ int32_t cros_gralloc_driver::allocate(const struct cros_gralloc_buffer_descripto
        hnd->width = drv_bo_get_width(bo);
        hnd->height = drv_bo_get_height(bo);
        hnd->format = drv_bo_get_format(bo);
+       hnd->tiling_mode = drv_bo_get_stride_or_tiling(bo);
        hnd->use_flags[0] = static_cast<uint32_t>(descriptor->use_flags >> 32);
        hnd->use_flags[1] = static_cast<uint32_t>(descriptor->use_flags);
        hnd->pixel_stride = drv_bo_get_stride_in_pixels(bo);
index 36b56a4..4759599 100644 (file)
@@ -27,6 +27,7 @@ struct cros_gralloc_handle {
        uint32_t width;
        uint32_t height;
        uint32_t format;       /* DRM format */
+       uint32_t tiling_mode;
        uint32_t use_flags[2]; /* Buffer creation flags */
        uint32_t magic;
        uint32_t pixel_stride;