summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeera Sundaram Sankaran <veeras@codeaurora.org>2016-08-25 18:55:22 -0700
committerVeera Sundaram Sankaran <veeras@codeaurora.org>2017-03-20 12:44:18 -0700
commit283ca7f600a9c09639ee618d9404ecf502e8dd44 (patch)
tree27be46c9d48c57e242539cba2525176a7cd0aa06
parent687a4eb82be5905f5400678dcaff4e98dad72e3c (diff)
msm: mdss: add checks to fail solid fill with scaling
Scaling is not allowed for layers with solid-fill. Add checks in validate call to fail such cases. Change-Id: I02cb2d129d27c6173429fd02b5ff84702936d98e Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_layer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c
index fce667a2126d..7c6938d40e0b 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_layer.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c
@@ -1222,6 +1222,15 @@ static int __configure_pipe_params(struct msm_fb_data_type *mfd,
goto end;
}
+ /* scaling is not allowed for solid_fill layers */
+ if ((pipe->flags & MDP_SOLID_FILL) &&
+ ((pipe->src.w != pipe->dst.w) ||
+ (pipe->src.h != pipe->dst.h))) {
+ pr_err("solid fill pipe:%d cannot have scaling\n", pipe->num);
+ ret = -EINVAL;
+ goto end;
+ }
+
/*
* unstage the pipe if it's current z_order does not match with new
* z_order because client may only call the validate.