diff options
| author | Abhijit Kulkarni <kabhijit@codeaurora.org> | 2016-06-06 11:41:42 -0700 |
|---|---|---|
| committer | Kyle Yan <kyan@codeaurora.org> | 2016-06-07 16:05:33 -0700 |
| commit | 292607a9e5912c3a366ffc3ca1e0c4011cb162dd (patch) | |
| tree | 85d6559ad784a094f42a9b0ec652b50a469bbcc6 /drivers/video/fbdev | |
| parent | f3f6f5f3dfe11139132527aa70a26fc07f4066b9 (diff) | |
msm: mdss: fix solidfill config for multi-rect pipes
In multi-rect configuration both the pipes should fetch or should
be in solidfill configuration. The change ensures that when switching
between multi-rect to normal configuration with solid fill
enable/disable the multi-rect mode properly.
CRs-Fixed:1025380
Change-Id: I02fc72583fcd9bc27156ce717b52ef17e16313d5
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_layer.c | 17 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_pipe.c | 35 |
2 files changed, 33 insertions, 19 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c index 91b91dcc7960..29d6caa8ff7b 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_layer.c +++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c @@ -1421,6 +1421,17 @@ static bool __multirect_validate_format(struct mdp_input_layer **layers, if (count != 2) return false; + if ((layers[0]->flags & MDP_LAYER_SOLID_FILL) != + (layers[1]->flags & MDP_LAYER_SOLID_FILL)) { + pr_err("solid fill mismatch between multirect layers\n"); + return false; + } + /* if both are solidfill, no need for format checks */ + else if ((layers[0]->flags & MDP_LAYER_SOLID_FILL) && + (layers[1]->flags & MDP_LAYER_SOLID_FILL)) { + return true; + } + /* format related validation */ rec0_fmt = mdss_mdp_get_format_params(layers[0]->buffer.format); if (!rec0_fmt) { @@ -1458,12 +1469,6 @@ static bool __multirect_validate_format(struct mdp_input_layer **layers, return false; } - if ((layers[0]->flags & MDP_LAYER_SOLID_FILL) != - (layers[1]->flags & MDP_LAYER_SOLID_FILL)) { - pr_err("solid fill mismatch between multirect layers\n"); - return false; - } - return true; } diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index a2a8855ac473..e011e35ac62e 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -2287,6 +2287,24 @@ static int mdss_mdp_src_addr_setup(struct mdss_mdp_pipe *pipe, return 0; } +static void __set_pipe_multirect_opmode(struct mdss_mdp_pipe *pipe) +{ + u32 multirect_opmode = 0; + /* + * enable multirect only when both RECT0 and RECT1 are enabled, + * othwerise expect to work in non-multirect only in RECT0 + */ + if (pipe->multirect.mode != MDSS_MDP_PIPE_MULTIRECT_NONE) { + multirect_opmode = BIT(0) | BIT(1); + + if (pipe->multirect.mode == MDSS_MDP_PIPE_MULTIRECT_SERIAL) + multirect_opmode |= BIT(2); + } + + mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_SSPP_MULTI_REC_OP_MODE, + multirect_opmode); +} + static int mdss_mdp_pipe_solidfill_setup(struct mdss_mdp_pipe *pipe) { int ret; @@ -2336,6 +2354,8 @@ static int mdss_mdp_pipe_solidfill_setup(struct mdss_mdp_pipe *pipe) MDSS_MDP_REG_SSPP_SRC_OP_MODE_REC1, opmode); } + __set_pipe_multirect_opmode(pipe); + if (pipe->type != MDSS_MDP_PIPE_TYPE_DMA) { mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_SCALE_CONFIG, 0); if (pipe->type == MDSS_MDP_PIPE_TYPE_VIG) @@ -2603,7 +2623,7 @@ int mdss_mdp_pipe_queue_data(struct mdss_mdp_pipe *pipe, int ret = 0; struct mdss_mdp_ctl *ctl; u32 params_changed; - u32 opmode = 0, multirect_opmode = 0; + u32 opmode = 0; struct mdss_data_type *mdata = mdss_mdp_get_mdata(); bool roi_changed = false; bool delayed_programming; @@ -2729,19 +2749,8 @@ int mdss_mdp_pipe_queue_data(struct mdss_mdp_pipe *pipe, } } - /* - * enable multirect only when both RECT0 and RECT1 are enabled, - * othwerise expect to work in non-multirect only in RECT0 - */ - if (pipe->multirect.mode != MDSS_MDP_PIPE_MULTIRECT_NONE) { - multirect_opmode = BIT(0) | BIT(1); - - if (pipe->multirect.mode == MDSS_MDP_PIPE_MULTIRECT_SERIAL) - multirect_opmode |= BIT(2); - } + __set_pipe_multirect_opmode(pipe); - mdss_mdp_pipe_write(pipe, MDSS_MDP_REG_SSPP_MULTI_REC_OP_MODE, - multirect_opmode); if (src_data == NULL) { pr_debug("src_data=%p pipe num=%dx\n", src_data, pipe->num); |
