diff options
| author | Ramkumar Radhakrishnan <ramkumar@codeaurora.org> | 2016-01-27 15:36:22 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:03:26 -0700 |
| commit | 397d4d4efcd1cab08fb5b9fcf2fed4687a5b4743 (patch) | |
| tree | 7c9bf781bbe268440a26a939a8ac9fbd83094161 | |
| parent | e45c9c3161d0ee24649bf85c62eda79eef689fef (diff) | |
msm: mdss: add support for 10 bit RGB/YUV formats
Define all supported 10 bit RGB/YUV formats for linear/UBWC and set
the appropriate parameters for register programming.
CRs-Fixed: 984465
Change-Id: I37f55f76802bf295f2c48040843637e37663ca41
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
[dkeitel@codeaurora.org: fixed minor whitespace conflict.]
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss.h | 1 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.c | 6 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp.h | 7 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_debug.c | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_formats.h | 93 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pipe.c | 11 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pp.c | 3 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_util.c | 95 |
9 files changed, 185 insertions, 35 deletions
diff --git a/drivers/video/fbdev/msm/mdss.h b/drivers/video/fbdev/msm/mdss.h index dcc5eee0d31a..447e42bbb253 100644 --- a/drivers/video/fbdev/msm/mdss.h +++ b/drivers/video/fbdev/msm/mdss.h @@ -168,6 +168,7 @@ enum mdss_hw_capabilities { MDSS_CAPS_MIXER_1_FOR_WB, MDSS_CAPS_QSEED3, MDSS_CAPS_DEST_SCALER, + MDSS_CAPS_10_BIT_SUPPORTED, MDSS_CAPS_MAX, }; diff --git a/drivers/video/fbdev/msm/mdss_mdp.c b/drivers/video/fbdev/msm/mdss_mdp.c index 216ed6b44ebc..45fbeef2cb55 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.c +++ b/drivers/video/fbdev/msm/mdss_mdp.c @@ -1399,6 +1399,8 @@ static void mdss_mdp_hw_rev_caps_init(struct mdss_data_type *mdata) mdss_mdp_init_default_prefill_factors(mdata); mdss_set_quirk(mdata, MDSS_QUIRK_DSC_RIGHT_ONLY_PU); mdss_set_quirk(mdata, MDSS_QUIRK_DSC_2SLICE_PU_THRPUT); + mdata->has_wb_ubwc = true; + set_bit(MDSS_CAPS_10_BIT_SUPPORTED, mdata->mdss_caps_map); break; default: mdata->max_target_zorder = 4; /* excluding base layer */ @@ -1778,7 +1780,7 @@ static void __update_sspp_info(struct mdss_mdp_pipe *pipe, int i; int j; size_t len = PAGE_SIZE; - int num_bytes = BITS_TO_BYTES(MDP_IMGTYPE_LIMIT); + int num_bytes = BITS_TO_BYTES(MDP_IMGTYPE_LIMIT1); #define SPRINT(fmt, ...) \ (*cnt += scnprintf(buf + *cnt, len - *cnt, fmt, ##__VA_ARGS__)) @@ -1816,7 +1818,7 @@ static void mdss_mdp_update_wb_info(struct mdss_data_type *mdata, (*cnt += scnprintf(buf + *cnt, len - *cnt, fmt, ##__VA_ARGS__)) size_t len = PAGE_SIZE; int i; - int num_bytes = BITS_TO_BYTES(MDP_IMGTYPE_LIMIT); + int num_bytes = BITS_TO_BYTES(MDP_IMGTYPE_LIMIT1); SPRINT("rot_input_fmts="); for (i = 0; i < num_bytes && mdata->wb; i++) diff --git a/drivers/video/fbdev/msm/mdss_mdp.h b/drivers/video/fbdev/msm/mdss_mdp.h index 3d9c87659049..c5973a4b92bf 100644 --- a/drivers/video/fbdev/msm/mdss_mdp.h +++ b/drivers/video/fbdev/msm/mdss_mdp.h @@ -245,8 +245,8 @@ struct mdss_mdp_writeback { char __iomem *base; u32 caps; struct kref kref; - u8 supported_input_formats[BITS_TO_BYTES(MDP_IMGTYPE_LIMIT)]; - u8 supported_output_formats[BITS_TO_BYTES(MDP_IMGTYPE_LIMIT)]; + u8 supported_input_formats[BITS_TO_BYTES(MDP_IMGTYPE_LIMIT1)]; + u8 supported_output_formats[BITS_TO_BYTES(MDP_IMGTYPE_LIMIT1)]; }; struct mdss_mdp_ctl_intfs_ops { @@ -432,6 +432,7 @@ struct mdss_mdp_format_params { u8 fetch_mode; u8 bits[MAX_PLANES]; u8 element[MAX_PLANES]; + u8 unpack_dx_format; /*1 for 10 bit format otherwise 0 */ }; struct mdss_mdp_format_ubwc_tile_info { @@ -646,7 +647,7 @@ struct mdss_mdp_pipe { wait_queue_head_t free_waitq; u32 frame_rate; u8 csc_coeff_set; - u8 supported_formats[BITS_TO_BYTES(MDP_IMGTYPE_LIMIT)]; + u8 supported_formats[BITS_TO_BYTES(MDP_IMGTYPE_LIMIT1)]; }; struct mdss_mdp_writeback_arg { diff --git a/drivers/video/fbdev/msm/mdss_mdp_debug.c b/drivers/video/fbdev/msm/mdss_mdp_debug.c index f290ad10b30d..8436156ccfef 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_debug.c +++ b/drivers/video/fbdev/msm/mdss_mdp_debug.c @@ -1066,7 +1066,7 @@ static void __dump_pipe(struct seq_file *s, struct mdss_mdp_pipe *pipe) smps[0], smps[1], smps[2], smps[3]); seq_puts(s, "\tSupported formats = "); - for (i = 0; i < BITS_TO_BYTES(MDP_IMGTYPE_LIMIT); i++) + for (i = 0; i < BITS_TO_BYTES(MDP_IMGTYPE_LIMIT1); i++) seq_printf(s, "0x%02X ", pipe->supported_formats[i]); seq_puts(s, "\n"); diff --git a/drivers/video/fbdev/msm/mdss_mdp_formats.h b/drivers/video/fbdev/msm/mdss_mdp_formats.h index 318a5837512f..9191ffb367c1 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_formats.h +++ b/drivers/video/fbdev/msm/mdss_mdp_formats.h @@ -171,6 +171,44 @@ enum { }, \ } +#define FMT_RGB_2101010(fmt, fetch_type, flag_arg, \ + alpha_en, e0, e1, e2, e3) \ + { \ + .format = (fmt), \ + .flag = flag_arg, \ + .fetch_planes = MDSS_MDP_PLANE_INTERLEAVED, \ + .unpack_tight = 1, \ + .unpack_align_msb = 0, \ + .alpha_enable = (alpha_en), \ + .unpack_count = 4, \ + .bpp = 4, \ + .fetch_mode = (fetch_type), \ + .element = { (e0), (e1), (e2), (e3) }, \ + .bits = { \ + [C3_ALPHA] = COLOR_8BIT, \ + [C2_R_Cr] = COLOR_8BIT, \ + [C0_G_Y] = COLOR_8BIT, \ + [C1_B_Cb] = COLOR_8BIT, \ + }, \ + .unpack_dx_format = 1, \ + } + +#define FMT_YUV_PSEUDO_10(fmt, fetch_type, samp, \ + flag_arg, e0, e1, unpack_type, unpack_align) \ + { \ + FMT_YUV_COMMON(fmt), \ + .flag = flag_arg, \ + .fetch_planes = MDSS_MDP_PLANE_PSEUDO_PLANAR, \ + .chroma_sample = samp, \ + .unpack_count = 2, \ + .bpp = 2, \ + .fetch_mode = (fetch_type), \ + .element = { (e0), (e1) }, \ + .unpack_dx_format = 1, \ + .unpack_tight = unpack_type, \ + .unpack_align_msb = unpack_align, \ + } + /* * UBWC formats table: * This table holds the UBWC formats supported. @@ -214,6 +252,36 @@ static struct mdss_mdp_format_params_ubwc mdss_mdp_format_ubwc_map[] = { .tile_width = 32, }, }, + { + .mdp_format = FMT_RGB_2101010(MDP_RGBA_1010102_UBWC, + MDSS_MDP_FETCH_UBWC, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, + 1, C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA), + .micro = { + .tile_height = 4, + .tile_width = 16, + }, + }, + { + .mdp_format = FMT_RGB_2101010(MDP_RGBX_1010102_UBWC, + MDSS_MDP_FETCH_UBWC, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, + 0, C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA), + .micro = { + .tile_height = 4, + .tile_width = 16, + }, + }, + { + .mdp_format = FMT_YUV_PSEUDO_10(MDP_Y_CBCR_H2V2_TP10_UBWC, + MDSS_MDP_FETCH_UBWC, MDSS_MDP_CHROMA_420, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, + C1_B_Cb, C2_R_Cr, 1, 0), + .micro = { + .tile_height = 4, + .tile_width = 48, + }, + }, }; static struct mdss_mdp_format_params mdss_mdp_format_map[] = { @@ -342,5 +410,30 @@ static struct mdss_mdp_format_params mdss_mdp_format_map[] = { FMT_RGB_4444(MDP_ARGB_4444, 1, VALID_ROT_WB_FORMAT | VALID_MDP_CURSOR_FORMAT, C1_B_Cb, C0_G_Y, C2_R_Cr, C3_ALPHA), + FMT_RGB_2101010(MDP_RGBA_1010102, MDSS_MDP_FETCH_LINEAR, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, 1, + C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA), + FMT_RGB_2101010(MDP_ARGB_2101010, MDSS_MDP_FETCH_LINEAR, 0, 1, + C3_ALPHA, C2_R_Cr, C0_G_Y, C1_B_Cb), + FMT_RGB_2101010(MDP_RGBX_1010102, MDSS_MDP_FETCH_LINEAR, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, 0, + C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA), + FMT_RGB_2101010(MDP_XRGB_2101010, MDSS_MDP_FETCH_LINEAR, 0, 0, + C3_ALPHA, C2_R_Cr, C0_G_Y, C1_B_Cb), + FMT_RGB_2101010(MDP_BGRA_1010102, MDSS_MDP_FETCH_LINEAR, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, 1, + C1_B_Cb, C0_G_Y, C2_R_Cr, C3_ALPHA), + FMT_RGB_2101010(MDP_ABGR_2101010, MDSS_MDP_FETCH_LINEAR, 0, 1, + C3_ALPHA, C1_B_Cb, C0_G_Y, C2_R_Cr), + FMT_RGB_2101010(MDP_BGRX_1010102, MDSS_MDP_FETCH_LINEAR, + VALID_ROT_WB_FORMAT | VALID_MDP_WB_INTF_FORMAT, 0, + C1_B_Cb, C0_G_Y, C2_R_Cr, C3_ALPHA), + FMT_RGB_2101010(MDP_XBGR_2101010, MDSS_MDP_FETCH_LINEAR, 0, 0, + C3_ALPHA, C1_B_Cb, C0_G_Y, C2_R_Cr), + + FMT_YUV_PSEUDO_10(MDP_Y_CBCR_H2V2_P010, MDSS_MDP_FETCH_LINEAR, + MDSS_MDP_CHROMA_420, VALID_ROT_WB_FORMAT, + C1_B_Cb, C2_R_Cr, 0, 1), + }; #endif diff --git a/drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c b/drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c index dcb422d13796..c61771a3ad1c 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c +++ b/drivers/video/fbdev/msm/mdss_mdp_intf_writeback.c @@ -317,6 +317,8 @@ static int mdss_mdp_writeback_format_setup(struct mdss_mdp_writeback_ctx *ctx, ((fmt->unpack_count - 1) << 12) | ((fmt->bpp - 1) << 9); + dst_format |= (fmt->unpack_dx_format << 21); + ystride0 = (ctx->dst_planes.ystride[0]) | (ctx->dst_planes.ystride[1] << 16); ystride1 = (ctx->dst_planes.ystride[2]) | diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index 4e407c0b93c0..dcf815f74d5d 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -2002,12 +2002,19 @@ static int mdss_mdp_format_setup(struct mdss_mdp_pipe *pipe) if (fmt->is_yuv && test_bit(MDSS_CAPS_YUV_CONFIG, mdata->mdss_caps_map)) src_format |= BIT(15); + src_format |= (fmt->unpack_dx_format << 14); + mdss_mdp_pipe_sspp_setup(pipe, &opmode); if (fmt->fetch_mode != MDSS_MDP_FETCH_LINEAR && mdata->highest_bank_bit) { + u32 fetch_config = MDSS_MDP_FETCH_CONFIG_RESET_VALUE; + + fetch_config |= (mdata->highest_bank_bit << 18); + if (fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) + fetch_config |= (2 << 16); + mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_SSPP_FETCH_CONFIG, - MDSS_MDP_FETCH_CONFIG_RESET_VALUE | - mdata->highest_bank_bit << 18); + fetch_config); } if (pipe->scaler.enable) opmode |= (1 << 31); diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c index f563f6a0bd2e..0e2814c9de5f 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c @@ -1617,7 +1617,8 @@ int mdss_mdp_qseed3_setup(struct mdss_mdp_pipe *pipe, /* TODO:if src_fmt is 10 bits program the bitwidth * accordingly */ - op_mode |= 0x1 << SCALER_BIT_WIDTH; + if (!fmt->unpack_dx_format) + op_mode |= 0x1 << SCALER_BIT_WIDTH; op_mode |= (scaler->blend_cfg & 1) << SCALER_BLEND_CFG; diff --git a/drivers/video/fbdev/msm/mdss_mdp_util.c b/drivers/video/fbdev/msm/mdss_mdp_util.c index 5d6b29f31592..c86f924d83db 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_util.c +++ b/drivers/video/fbdev/msm/mdss_mdp_util.c @@ -292,10 +292,6 @@ void mdss_mdp_format_flag_removal(u32 *table, u32 num, u32 remove_bits) } for (i = 0; i < num; i++) { - if (table[i] > MDP_IMGTYPE_LIMIT) { - pr_err("Invalid format:%d, idx:%d\n", table[i], i); - continue; - } for (j = 0; j < ARRAY_SIZE(mdss_mdp_format_map); j++) { fmt = &mdss_mdp_format_map[i]; if (table[i] == fmt->format) { @@ -328,6 +324,11 @@ void mdss_mdp_set_supported_formats(struct mdss_data_type *mdata) if ((fmt->fetch_mode == MDSS_MDP_FETCH_TILE && has_tile) || (fmt->fetch_mode == MDSS_MDP_FETCH_LINEAR)) { + if (fmt->unpack_dx_format && + !test_bit(MDSS_CAPS_10_BIT_SUPPORTED, + mdata->mdss_caps_map)) + continue; + for (j = 0; j < mdata->nvig_pipes; j++) SET_BIT(vig_pipes[j].supported_formats, fmt->format); @@ -365,6 +366,11 @@ void mdss_mdp_set_supported_formats(struct mdss_data_type *mdata) struct mdss_mdp_format_params *fmt = &mdss_mdp_format_ubwc_map[i].mdp_format; + if (fmt->unpack_dx_format && + !test_bit(MDSS_CAPS_10_BIT_SUPPORTED, + mdata->mdss_caps_map)) + continue; + for (j = 0; j < mdata->nvig_pipes; j++) SET_BIT(vig_pipes[j].supported_formats, fmt->format); @@ -404,9 +410,6 @@ struct mdss_mdp_format_params *mdss_mdp_get_format_params(u32 format) int i; bool fmt_found = false; - if (format > MDP_IMGTYPE_LIMIT) - goto end; - for (i = 0; i < ARRAY_SIZE(mdss_mdp_format_map); i++) { fmt = &mdss_mdp_format_map[i]; if (format == fmt->format) { @@ -423,7 +426,6 @@ struct mdss_mdp_format_params *mdss_mdp_get_format_params(u32 format) } } -end: return (mdss_mdp_is_ubwc_format(fmt) && !mdss_mdp_is_ubwc_supported(mdata)) ? NULL : fmt; } @@ -658,6 +660,8 @@ static int mdss_mdp_get_ubwc_plane_size(struct mdss_mdp_format_params *fmt, { int rc = 0; struct mdss_data_type *mdata = mdss_mdp_get_mdata(); + struct mdss_mdp_format_params_ubwc *fmt_ubwc = + (struct mdss_mdp_format_params_ubwc *)fmt; if (!mdss_mdp_is_ubwc_supported(mdata)) { pr_err("ubwc format is not supported for format: %d\n", @@ -665,31 +669,65 @@ static int mdss_mdp_get_ubwc_plane_size(struct mdss_mdp_format_params *fmt, return -EINVAL; } - if (fmt->format == MDP_Y_CBCR_H2V2_UBWC) { + if (fmt->format == MDP_Y_CBCR_H2V2_UBWC || + fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) { + uint32_t y_stride_alignment, uv_stride_alignment; + uint32_t y_height_alignment, uv_height_alignment; + uint32_t y_tile_width = fmt_ubwc->micro.tile_width; + uint32_t y_tile_height = fmt_ubwc->micro.tile_height; + uint32_t uv_tile_width = y_tile_width / 2; + uint32_t uv_tile_height = y_tile_height; + uint32_t y_bpp_numer = 1, y_bpp_denom = 1; + uint32_t uv_bpp_numer = 1, uv_bpp_denom = 1; + ps->num_planes = 4; + if (fmt->format == MDP_Y_CBCR_H2V2_UBWC) { + y_stride_alignment = 128; + uv_stride_alignment = 64; + y_height_alignment = 32; + uv_height_alignment = 32; + y_bpp_numer = 1; + uv_bpp_numer = 2; + y_bpp_denom = 1; + uv_bpp_denom = 1; + } else if (fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) { + y_stride_alignment = 192; + uv_stride_alignment = 96; + y_height_alignment = 16; + uv_height_alignment = 16; + y_bpp_numer = 4; + uv_bpp_numer = 8; + y_bpp_denom = 3; + uv_bpp_denom = 3; + } + /* Y bitstream stride and plane size */ - ps->ystride[0] = ALIGN(width, 128); - ps->plane_size[0] = ALIGN(ps->ystride[0] * ALIGN(height, 32), - 4096); + ps->ystride[0] = ALIGN(width, y_stride_alignment); + ps->ystride[0] = (ps->ystride[0] * y_bpp_numer) / y_bpp_denom; + ps->plane_size[0] = ALIGN(ps->ystride[0] * + ALIGN(height, y_height_alignment), 4096); /* CbCr bitstream stride and plane size */ - ps->ystride[1] = ALIGN(width, 64); + ps->ystride[1] = ALIGN(width / 2, uv_stride_alignment); + ps->ystride[1] = (ps->ystride[1] * uv_bpp_numer) / uv_bpp_denom; ps->plane_size[1] = ALIGN(ps->ystride[1] * - ALIGN(height / 2, 32), 4096); + ALIGN(height / 2, uv_height_alignment), 4096); /* Y meta data stride and plane size */ - ps->ystride[2] = ALIGN(DIV_ROUND_UP(width, 32), 64); + ps->ystride[2] = ALIGN(DIV_ROUND_UP(width, y_tile_width), 64); ps->plane_size[2] = ALIGN(ps->ystride[2] * - ALIGN(DIV_ROUND_UP(height, 8), 16), 4096); + ALIGN(DIV_ROUND_UP(height, y_tile_height), 16), 4096); /* CbCr meta data stride and plane size */ - ps->ystride[3] = ALIGN(DIV_ROUND_UP(width / 2, 16), 64); - ps->plane_size[3] = ALIGN(ps->ystride[3] * - ALIGN(DIV_ROUND_UP(height / 2, 8), 16), 4096); - + ps->ystride[3] = + ALIGN(DIV_ROUND_UP(width / 2, uv_tile_width), 64); + ps->plane_size[3] = ALIGN(ps->ystride[3] * ALIGN( + DIV_ROUND_UP(height / 2, uv_tile_height), 16), 4096); } else if (fmt->format == MDP_RGBA_8888_UBWC || fmt->format == MDP_RGBX_8888_UBWC || - fmt->format == MDP_RGB_565_UBWC) { + fmt->format == MDP_RGB_565_UBWC || + fmt->format == MDP_RGBA_1010102_UBWC || + fmt->format == MDP_RGBX_1010102_UBWC) { uint32_t stride_alignment, bpp, aligned_bitstream_width; if (fmt->format == MDP_RGB_565_UBWC) { @@ -708,8 +746,8 @@ static int mdss_mdp_get_ubwc_plane_size(struct mdss_mdp_format_params *fmt, ALIGN(height, 16), 4096); /* RGB meta data stride and plane size */ - ps->ystride[2] = ALIGN(DIV_ROUND_UP(aligned_bitstream_width, - 16), 64); + ps->ystride[2] = + ALIGN(DIV_ROUND_UP(aligned_bitstream_width, 16), 64); ps->plane_size[2] = ALIGN(ps->ystride[2] * ALIGN(DIV_ROUND_UP(height, 4), 16), 4096); } else { @@ -799,6 +837,8 @@ int mdss_mdp_get_plane_sizes(struct mdss_mdp_format_params *fmt, u32 w, u32 h, break; } + w = w << fmt->unpack_dx_format; + ps->ystride[0] = ALIGN(w, stride_align); ps->ystride[1] = ALIGN(w / h_subsample, stride_align); ps->plane_size[0] = ps->ystride[0] * @@ -852,7 +892,8 @@ static int mdss_mdp_ubwc_data_check(struct mdss_mdp_data *data, base_addr = data->p[0].addr; - if (fmt->format == MDP_Y_CBCR_H2V2_UBWC) { + if (fmt->format == MDP_Y_CBCR_H2V2_UBWC || + fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) { /************************************************/ /* UBWC ** */ /* buffer ** MDP PLANE */ @@ -925,7 +966,8 @@ end: return -EINVAL; } - inc = ((fmt->format == MDP_Y_CBCR_H2V2_UBWC) ? 1 : 2); + inc = ((fmt->format == MDP_Y_CBCR_H2V2_UBWC || + fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) ? 1 : 2); for (i = 0; i < MAX_PLANES; i += inc) { if (data->p[i].len != ps->plane_size[i]) { pr_err("plane:%d fmt:%d, len does not match: data:%lu, ps:%d\n", @@ -1029,7 +1071,8 @@ void mdss_mdp_ubwc_data_calc_offset(struct mdss_mdp_data *data, u16 x, u16 y, } macro_w = 4 * micro_w; - if (fmt->format == MDP_Y_CBCR_H2V2_UBWC) { + if (fmt->format == MDP_Y_CBCR_H2V2_UBWC || + fmt->format == MDP_Y_CBCR_H2V2_TP10_UBWC) { u16 chroma_macro_w = macro_w / 2; u16 chroma_micro_w = micro_w / 2; |
