From 0979290e6cb3365de1ed0a579324feafa7b03714 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 1 Oct 2015 11:47:57 -0400 Subject: [PATCH] msm: mdss: update gamut color scale for non uniform only Gamut color scale and offset should only be programmed if the table is non-uniform Change-Id: I55790d5076ef2aedc3c0593ca744b792bb66cdf5 Signed-off-by: Terence Hampson --- drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c b/drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c index 0c40ca63eef1..3480804c8250 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pp_v1_7.c @@ -887,7 +887,8 @@ static int pp_gamut_set_config(char __iomem *base_addr, writel_relaxed(gamut_data->c0_data[i][j], base_addr + GAMUT_TABLE_UPPER_R); } - if (i >= MDP_GAMUT_SCALE_OFF_TABLE_NUM) + if ((i >= MDP_GAMUT_SCALE_OFF_TABLE_NUM) || + (!gamut_data->map_en)) continue; for (j = 0; j < MDP_GAMUT_SCALE_OFF_SZ; j++) { writel_relaxed((gamut_data->scale_off_data[i][j]),