msm: mdss: add RGBX UBWC format support in mdss for msm8996
MDSS hardware on msm8996 target supports RGBX UBWC format because it handles the RGBA and RGBX formats in same manner. This change adds the RGBX UBWC format support with compression ratio information. Change-Id: I674d136496910e017d4c21d56b62def7eff0562e Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
parent
6344ac8b7f
commit
3e28d13595
3 changed files with 34 additions and 11 deletions
|
@ -178,18 +178,32 @@ enum {
|
|||
* that the size of the factors tables are multiple of the ubwc_map
|
||||
* table and throw an error if a mismatch is found.
|
||||
*/
|
||||
#define UBWC_TOTAL_FORMATS 3
|
||||
#define UBWC_TOTAL_FORMATS 4
|
||||
|
||||
static struct mdss_fudge_factor ubwc_rt_factors[][UBWC_TOTAL_FORMATS] = {
|
||||
/* RGB_565_UBWC | RGBA_8888_UBWC | YUV_H2V2_UBWC */
|
||||
{{1, 1} , {126, 100} , {123, 100} } , /* 8996 v0 */
|
||||
{{1, 1} , {126, 100} , {123, 100} } , /* 8996 v1,v2 */
|
||||
/* 8996 v1*/
|
||||
{{1, 1} , /* RGB_565_UBWC */
|
||||
{126, 100} , /* RGBA_8888_UBWC */
|
||||
{126, 100} , /* RGBX_8888_UBWC */
|
||||
{123, 100} } , /* YUV_H2V2_UBWC */
|
||||
/* 8996 v2/v3 */
|
||||
{{1, 1} , /* RGB_565_UBWC */
|
||||
{126, 100} , /* RGBA_8888_UBWC */
|
||||
{126, 100} , /* RGBX_8888_UBWC */
|
||||
{123, 100} }, /* YUV_H2V2_UBWC */
|
||||
};
|
||||
|
||||
static struct mdss_fudge_factor ubwc_nrt_factors[][UBWC_TOTAL_FORMATS] = {
|
||||
/* RGB_565_UBWC | RGBA_8888_UBWC | YUV_H2V2_UBWC */
|
||||
{{1, 1} , {146, 100} , {1, 1} } , /* 8996 v0 */
|
||||
{{1, 1} , {146, 100} , {128, 100} } , /* 8996 v1,v2 */
|
||||
/* 8996 v1*/
|
||||
{{1, 1} , /* RGB_565_UBWC */
|
||||
{146, 100} , /* RGBA_8888_UBWC */
|
||||
{146, 100} , /* RGBX_8888_UBWC */
|
||||
{1, 1} } , /* YUV_H2V2_UBWC */
|
||||
/* 8996 v2/v3 */
|
||||
{{1, 1} , /* RGB_565_UBWC */
|
||||
{146, 100} , /* RGBA_8888_UBWC */
|
||||
{146, 100} , /* RGBX_8888_UBWC */
|
||||
{128, 100} } , /* YUV_H2V2_UBWC */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -213,6 +227,13 @@ static struct mdss_mdp_format_params_ubwc mdss_mdp_format_ubwc_map[] = {
|
|||
.comp_ratio_rt = {1, 1},
|
||||
.comp_ratio_nrt = {1, 1},
|
||||
},
|
||||
{
|
||||
.mdp_format = FMT_RGB_8888(MDP_RGBX_8888_UBWC,
|
||||
MDSS_MDP_FETCH_UBWC, VALID_ROT_WB_FORMAT, 0,
|
||||
C2_R_Cr, C0_G_Y, C1_B_Cb, C3_ALPHA),
|
||||
.comp_ratio_rt = {1, 1},
|
||||
.comp_ratio_nrt = {1, 1},
|
||||
},
|
||||
{
|
||||
.mdp_format = FMT_YUV_PSEUDO(MDP_Y_CBCR_H2V2_UBWC,
|
||||
MDSS_MDP_FETCH_UBWC, MDSS_MDP_CHROMA_420,
|
||||
|
|
|
@ -538,15 +538,16 @@ static int mdss_mdp_get_ubwc_plane_size(struct mdss_mdp_format_params *fmt,
|
|||
ALIGN(DIV_ROUND_UP(height / 2, 8), 16), 4096);
|
||||
|
||||
} else if (fmt->format == MDP_RGBA_8888_UBWC ||
|
||||
fmt->format == MDP_RGBX_8888_UBWC ||
|
||||
fmt->format == MDP_RGB_565_UBWC) {
|
||||
uint32_t stride_alignment, bpp, aligned_bitstream_width;
|
||||
|
||||
if (fmt->format == MDP_RGBA_8888_UBWC) {
|
||||
stride_alignment = 64;
|
||||
bpp = 4;
|
||||
} else {
|
||||
if (fmt->format == MDP_RGB_565_UBWC) {
|
||||
stride_alignment = 128;
|
||||
bpp = 2;
|
||||
} else {
|
||||
stride_alignment = 64;
|
||||
bpp = 4;
|
||||
}
|
||||
ps->num_planes = 2;
|
||||
|
||||
|
|
|
@ -174,6 +174,7 @@ enum {
|
|||
MDP_RGB_565_UBWC,
|
||||
MDP_RGBA_8888_UBWC,
|
||||
MDP_Y_CBCR_H2V2_UBWC,
|
||||
MDP_RGBX_8888_UBWC,
|
||||
MDP_IMGTYPE_LIMIT,
|
||||
MDP_RGB_BORDERFILL, /* border fill pipe */
|
||||
MDP_FB_FORMAT = MDP_IMGTYPE2_START, /* framebuffer format */
|
||||
|
|
Loading…
Add table
Reference in a new issue