gralloc: Store aligned width in pvt handle for TP10

- For TP10 Venus UBWC format, the Venus macro returns the
  stride, which is 4/3 times the width.
- Need to store the pixel width instead of stride
  in the private handle hence * 3/4

Change-Id: I2c1348c6b90f141ecef6cabf493780325f17db77
Crs-fixed: 1059165
This commit is contained in:
Arun Kumar K.R
2016-09-07 18:59:46 -07:00
parent e06d05ab98
commit fc2a27f237
2 changed files with 7 additions and 1 deletions

View File

@@ -989,7 +989,8 @@ static void getYuvUBwcWidthHeight(int width, int height, int format,
aligned_h = VENUS_Y_SCANLINES(COLOR_FMT_NV12_UBWC, height);
break;
case HAL_PIXEL_FORMAT_YCbCr_420_TP10_UBWC:
aligned_w = VENUS_Y_STRIDE(COLOR_FMT_NV12_BPP10_UBWC, width);
// The macro returns the stride which is 4/3 times the width, hence * 3/4
aligned_w = (VENUS_Y_STRIDE(COLOR_FMT_NV12_BPP10_UBWC, width) * 3) / 4;
aligned_h = VENUS_Y_SCANLINES(COLOR_FMT_NV12_BPP10_UBWC, height);
break;
default: