msm: mdss: Add cursor validation for hflip

Hflip is not supported on cursor pipes as there
is no flip buffer in the hardware. Invalidate
any commit request for cursor hflip.

Change-Id: I4b0ad28caffb75a4bd5a928a90daa6aa59f51848
Signed-off-by: Animesh Kishore <animeshk@codeaurora.org>
This commit is contained in:
Animesh Kishore 2017-06-14 01:04:34 +05:30
parent eb28d0da15
commit b445e492f7

View file

@ -741,14 +741,15 @@ static int __cursor_layer_check(struct msm_fb_data_type *mfd,
struct mdss_data_type *mdata = mdss_mdp_get_mdata(); struct mdss_data_type *mdata = mdss_mdp_get_mdata();
if ((layer->z_order != HW_CURSOR_STAGE(mdata)) if ((layer->z_order != HW_CURSOR_STAGE(mdata))
|| layer->flags & MDP_LAYER_FLIP_LR
|| layer->src_rect.w > mdata->max_cursor_size || layer->src_rect.w > mdata->max_cursor_size
|| layer->src_rect.h > mdata->max_cursor_size || layer->src_rect.h > mdata->max_cursor_size
|| layer->src_rect.w != layer->dst_rect.w || layer->src_rect.w != layer->dst_rect.w
|| layer->src_rect.h != layer->dst_rect.h || layer->src_rect.h != layer->dst_rect.h
|| !mdata->ncursor_pipes) { || !mdata->ncursor_pipes) {
pr_err("Incorrect cursor configs for pipe:%d, cursor_pipes:%d, z_order:%d\n", pr_err("Incorrect cursor configs for pipe:0x%x, ncursor_pipes:%d, z_order:%d, flags:0x%x\n",
layer->pipe_ndx, mdata->ncursor_pipes, layer->pipe_ndx, mdata->ncursor_pipes,
layer->z_order); layer->z_order, layer->flags);
pr_err("src:{%d,%d,%d,%d}, dst:{%d,%d,%d,%d}\n", pr_err("src:{%d,%d,%d,%d}, dst:{%d,%d,%d,%d}\n",
layer->src_rect.x, layer->src_rect.y, layer->src_rect.x, layer->src_rect.y,
layer->src_rect.w, layer->src_rect.h, layer->src_rect.w, layer->src_rect.h,