summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAbhijit Kulkarni <kabhijit@codeaurora.org>2016-06-20 09:43:03 -0700
committerKyle Yan <kyan@codeaurora.org>2016-06-24 15:06:38 -0700
commitfc907d939b1f5b829995e33d90234d0ae195ecdd (patch)
treec4d43bccec38c86e19660c0737d2e087bdaaf735 /drivers
parent1ca62857bd57317b8289b31753e4ee4ce14b0e87 (diff)
msm: mdss: fix multi-rect validation properties
Fix issues with multi-rect to allow the multi-rects on the same z-order. In multi-rect use cases the rect 0 of the pipes have higher priority than rect 1. The change checks the priority of rect on the right mixer with the priority of rect on the pipe staged on left mixer. CRs-Fixed: 1023723 Change-Id: Ifd1df8ee04238db0338a7dd70eb5097af2d0eb62 Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_layer.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c
index 59283c815897..65b3b9739be6 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_layer.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c
@@ -662,6 +662,23 @@ exit_fail:
return ret;
}
+static int __validate_pipe_priorities(struct mdss_mdp_pipe *left,
+ struct mdss_mdp_pipe *right)
+{
+ if (left->multirect.num > right->multirect.num)
+ return -EINVAL;
+
+ if ((left->multirect.num == right->multirect.num) &&
+ (left->priority >= right->priority))
+ return -EINVAL;
+
+ if ((left->multirect.num < right->multirect.num) &&
+ (left->priority > right->priority))
+ return -EINVAL;
+
+ return 0;
+}
+
static int __configure_pipe_params(struct msm_fb_data_type *mfd,
struct mdss_mdp_validate_info_t *vinfo, struct mdss_mdp_pipe *pipe,
struct mdss_mdp_pipe *left_blend_pipe, bool is_single_layer,
@@ -773,10 +790,12 @@ static int __configure_pipe_params(struct msm_fb_data_type *mfd,
*/
if (mdata->has_src_split) {
if (left_blend_pipe) {
- if (pipe->priority <= left_blend_pipe->priority) {
- pr_err("priority limitation. left:%d right%d\n",
- left_blend_pipe->priority,
- pipe->priority);
+ if (__validate_pipe_priorities(left_blend_pipe, pipe)) {
+ pr_err("priority limitation. left:%d rect:%d, right:%d rect:%d\n",
+ left_blend_pipe->priority,
+ left_blend_pipe->multirect.num,
+ pipe->priority,
+ pipe->multirect.num);
ret = -EPERM;
goto end;
} else {
@@ -1521,12 +1540,6 @@ static bool __multirect_validate_properties(struct mdp_input_layer **layers,
return false;
}
- if (layers[0]->z_order == layers[1]->z_order) {
- pr_err("multirect layers cannot have same z_order=%d\n",
- layers[0]->z_order);
- return false;
- }
-
return true;
}