msm: mdss: Return error when Gamut table size is invalid
Previously, the gamut caching code was not returning an error value when an invalid table size was passed. This change will return error during caching if the table size is invalid. Change-Id: I212b345239543943670c2f03a0fc8376d31d1e86 Signed-off-by: Benet Clark <benetc@codeaurora.org>
This commit is contained in:
parent
92049f8139
commit
717a16b47b
1 changed files with 6 additions and 4 deletions
|
@ -406,9 +406,10 @@ static int pp_gamut_cache_params_v1_7(struct mdp_gamut_cfg_data *config,
|
|||
/* sanity check for sizes */
|
||||
for (i = 0; i < MDP_GAMUT_TABLE_NUM_V1_7; i++) {
|
||||
if (v17_usr_config.tbl_size[i] != tbl_sz) {
|
||||
pr_err("invalid tbl_sz %d exp %d for mode %d\n",
|
||||
v17_usr_config.tbl_size[i], tbl_sz,
|
||||
pr_err("invalid tbl size %d exp %d tbl index %d mode %d\n",
|
||||
v17_usr_config.tbl_size[i], tbl_sz, i,
|
||||
v17_usr_config.mode);
|
||||
ret = -EINVAL;
|
||||
goto gamut_config_exit;
|
||||
}
|
||||
gamut_size += v17_usr_config.tbl_size[i];
|
||||
|
@ -416,10 +417,11 @@ static int pp_gamut_cache_params_v1_7(struct mdp_gamut_cfg_data *config,
|
|||
continue;
|
||||
if (v17_usr_config.tbl_scale_off_sz[i] !=
|
||||
MDP_GAMUT_SCALE_OFF_SZ) {
|
||||
pr_err("invalid scale_sz %d exp %d for mode %d\n",
|
||||
pr_err("invalid scale size %d exp %d scale index %d mode %d\n",
|
||||
v17_usr_config.tbl_scale_off_sz[i],
|
||||
MDP_GAMUT_SCALE_OFF_SZ,
|
||||
MDP_GAMUT_SCALE_OFF_SZ, i,
|
||||
v17_usr_config.mode);
|
||||
ret = -EINVAL;
|
||||
goto gamut_config_exit;
|
||||
}
|
||||
scal_coff_size += v17_usr_config.tbl_scale_off_sz[i];
|
||||
|
|
Loading…
Add table
Reference in a new issue