disp: msm: sde: expand dsc range_bpg_offset to support 10bpc
DSC driver is applying the range_bpg_offset values for 8 bpc/8bpp to all compression ratios. This results in invalid DSC configuration in 10bpc mode and sink is not able to decode this image resulting in black screen. This change adds a table of range_bpg_offset values to capture the configuration for different bpc/bpp combinations. Change-Id: I27e8edcbded8a8e512315599d768750ba473bd60 Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
This commit is contained in:
@@ -81,10 +81,27 @@ static char sde_dsc_rc_range_max_qp[DSC_RATIO_TYPE_MAX][DSC_NUM_BUF_RANGES] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Rate control - bpg offset values
|
* Rate control - bpg offset values for each ratio type in sde_dsc_ratio_type
|
||||||
*/
|
*/
|
||||||
static char sde_dsc_rc_range_bpg_offset[DSC_NUM_BUF_RANGES] =
|
static char sde_dsc_rc_range_bpg[DSC_RATIO_TYPE_MAX][DSC_NUM_BUF_RANGES] = {
|
||||||
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12};
|
/* DSC v1.1 */
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -10, -12, -12, -12},
|
||||||
|
/* DSC v1.1 SCR and DSC V1.2 RGB 444 */
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -10, -12, -12, -12},
|
||||||
|
/* DSC v1.2 YUV422 */
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -10, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -10, -12, -12, -12},
|
||||||
|
{10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -10, -12, -12, -12},
|
||||||
|
/* DSC v1.2 YUV420 */
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{2, 0, 0, -2, -4, -6, -8, -8, -8, -10, -10, -12, -12, -12, -12},
|
||||||
|
{10, 8, 6, 4, 2, 0, -2, -4, -6, -8, -10, -10, -12, -12, -12},
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Maps to lookup the sde_dsc_ratio_type index used in rate control tables
|
* Maps to lookup the sde_dsc_ratio_type index used in rate control tables
|
||||||
@@ -206,7 +223,7 @@ int sde_dsc_populate_dsc_config(struct drm_dsc_config *dsc, int scr_ver) {
|
|||||||
dsc->rc_range_params[i].range_max_qp =
|
dsc->rc_range_params[i].range_max_qp =
|
||||||
sde_dsc_rc_range_max_qp[ratio_idx][i];
|
sde_dsc_rc_range_max_qp[ratio_idx][i];
|
||||||
dsc->rc_range_params[i].range_bpg_offset =
|
dsc->rc_range_params[i].range_bpg_offset =
|
||||||
sde_dsc_rc_range_bpg_offset[i];
|
sde_dsc_rc_range_bpg[ratio_idx][i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bpp == 8) {
|
if (bpp == 8) {
|
||||||
|
Reference in New Issue
Block a user