Loading drivers/video/msm/mdss/mdss_mdp.c +0 −5 Original line number Diff line number Diff line Loading @@ -1487,7 +1487,6 @@ static void mdss_hw_rev_init(struct mdss_data_type *mdata) */ void mdss_hw_init(struct mdss_data_type *mdata) { int i; struct mdss_mdp_pipe *vig; mdss_hw_rev_init(mdata); Loading @@ -1508,10 +1507,6 @@ void mdss_hw_init(struct mdss_data_type *mdata) vig = mdata->vig_pipes; /* initialize csc matrix default value */ for (i = 0; i < mdata->nvig_pipes; i++) vig[i].csc_coeff_set = MDSS_MDP_CSC_YUV2RGB_709L; mdata->nmax_concurrent_ad_hw = (mdata->mdp_rev < MDSS_MDP_HW_REV_103) ? 1 : 2; Loading drivers/video/msm/mdss/mdss_mdp_layer.c +39 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,28 @@ static int __layer_param_check(struct msm_fb_data_type *mfd, return 0; } /* compare all reconfiguration parameter validation in this API */ static int __validate_layer_reconfig(struct mdp_input_layer *layer, struct mdss_mdp_pipe *pipe) { int status = 0; struct mdss_mdp_format_params *src_fmt; /* * csc registers are not double buffered. It is not permitted * to change them on staged pipe with YUV layer. */ if (pipe->csc_coeff_set != layer->color_space) { src_fmt = mdss_mdp_get_format_params(layer->buffer.format); if (pipe->src_fmt->is_yuv && src_fmt->is_yuv) { status = -EPERM; pr_err("csc change is not permitted on used pipe\n"); } } return status; } static int __validate_single_layer(struct msm_fb_data_type *mfd, struct mdp_input_layer *layer, u32 mixer_mux) { Loading Loading @@ -499,6 +521,7 @@ static int __configure_pipe_params(struct msm_fb_data_type *mfd, pipe->blend_op = layer->blend_op; pipe->is_handed_off = false; pipe->async_update = (layer->flags & MDP_LAYER_ASYNC) ? true : false; pipe->csc_coeff_set = layer->color_space; if (mixer->ctl) { pipe->dst.x += mixer->ctl->border_x_off; Loading Loading @@ -906,6 +929,7 @@ static inline bool __compare_layer_config(struct mdp_input_layer *validate, validate->horz_deci == layer->horz_deci && validate->vert_deci == layer->vert_deci && validate->alpha == layer->alpha && validate->color_space == layer->color_space && validate->z_order == (layer->z_order - MDSS_MDP_STAGE_0) && validate->transp_mask == layer->transp_mask && validate->bg_color == layer->bg_color && Loading Loading @@ -1290,6 +1314,21 @@ static int __validate_layers(struct msm_fb_data_type *mfd, goto validate_exit; } if (pipe_q_type == LAYER_USES_USED_PIPE_Q) { /* * reconfig is allowed on new/destroy pipes. Only used * pipe needs this extra validation. */ ret = __validate_layer_reconfig(layer, pipe); if (ret) { pr_err("layer reconfig validation failed=%d\n", ret); mdss_mdp_pipe_unmap(pipe); layer->error_code = ret; goto validate_exit; } } ret = __configure_pipe_params(mfd, layer, pipe, left_blend_pipe, is_single_layer, mixer_mux); if (ret) { Loading Loading
drivers/video/msm/mdss/mdss_mdp.c +0 −5 Original line number Diff line number Diff line Loading @@ -1487,7 +1487,6 @@ static void mdss_hw_rev_init(struct mdss_data_type *mdata) */ void mdss_hw_init(struct mdss_data_type *mdata) { int i; struct mdss_mdp_pipe *vig; mdss_hw_rev_init(mdata); Loading @@ -1508,10 +1507,6 @@ void mdss_hw_init(struct mdss_data_type *mdata) vig = mdata->vig_pipes; /* initialize csc matrix default value */ for (i = 0; i < mdata->nvig_pipes; i++) vig[i].csc_coeff_set = MDSS_MDP_CSC_YUV2RGB_709L; mdata->nmax_concurrent_ad_hw = (mdata->mdp_rev < MDSS_MDP_HW_REV_103) ? 1 : 2; Loading
drivers/video/msm/mdss/mdss_mdp_layer.c +39 −0 Original line number Diff line number Diff line Loading @@ -331,6 +331,28 @@ static int __layer_param_check(struct msm_fb_data_type *mfd, return 0; } /* compare all reconfiguration parameter validation in this API */ static int __validate_layer_reconfig(struct mdp_input_layer *layer, struct mdss_mdp_pipe *pipe) { int status = 0; struct mdss_mdp_format_params *src_fmt; /* * csc registers are not double buffered. It is not permitted * to change them on staged pipe with YUV layer. */ if (pipe->csc_coeff_set != layer->color_space) { src_fmt = mdss_mdp_get_format_params(layer->buffer.format); if (pipe->src_fmt->is_yuv && src_fmt->is_yuv) { status = -EPERM; pr_err("csc change is not permitted on used pipe\n"); } } return status; } static int __validate_single_layer(struct msm_fb_data_type *mfd, struct mdp_input_layer *layer, u32 mixer_mux) { Loading Loading @@ -499,6 +521,7 @@ static int __configure_pipe_params(struct msm_fb_data_type *mfd, pipe->blend_op = layer->blend_op; pipe->is_handed_off = false; pipe->async_update = (layer->flags & MDP_LAYER_ASYNC) ? true : false; pipe->csc_coeff_set = layer->color_space; if (mixer->ctl) { pipe->dst.x += mixer->ctl->border_x_off; Loading Loading @@ -906,6 +929,7 @@ static inline bool __compare_layer_config(struct mdp_input_layer *validate, validate->horz_deci == layer->horz_deci && validate->vert_deci == layer->vert_deci && validate->alpha == layer->alpha && validate->color_space == layer->color_space && validate->z_order == (layer->z_order - MDSS_MDP_STAGE_0) && validate->transp_mask == layer->transp_mask && validate->bg_color == layer->bg_color && Loading Loading @@ -1290,6 +1314,21 @@ static int __validate_layers(struct msm_fb_data_type *mfd, goto validate_exit; } if (pipe_q_type == LAYER_USES_USED_PIPE_Q) { /* * reconfig is allowed on new/destroy pipes. Only used * pipe needs this extra validation. */ ret = __validate_layer_reconfig(layer, pipe); if (ret) { pr_err("layer reconfig validation failed=%d\n", ret); mdss_mdp_pipe_unmap(pipe); layer->error_code = ret; goto validate_exit; } } ret = __configure_pipe_params(mfd, layer, pipe, left_blend_pipe, is_single_layer, mixer_mux); if (ret) { Loading