Merge "msm: mdss: Allocate DMA pipe for pan display path"

This commit is contained in:
Linux Build Service Account 2017-02-27 23:37:26 -08:00 committed by Gerrit - the friendly Code Review server
commit 22e7695a57
3 changed files with 23 additions and 10 deletions

View file

@ -1842,7 +1842,7 @@ int mdss_mdp_calib_mode(struct msm_fb_data_type *mfd,
int mdss_mdp_pipe_handoff(struct mdss_mdp_pipe *pipe); int mdss_mdp_pipe_handoff(struct mdss_mdp_pipe *pipe);
int mdss_mdp_smp_handoff(struct mdss_data_type *mdata); int mdss_mdp_smp_handoff(struct mdss_data_type *mdata);
struct mdss_mdp_pipe *mdss_mdp_pipe_alloc(struct mdss_mdp_mixer *mixer, struct mdss_mdp_pipe *mdss_mdp_pipe_alloc(struct mdss_mdp_mixer *mixer,
u32 type, struct mdss_mdp_pipe *left_blend_pipe); u32 off, u32 type, struct mdss_mdp_pipe *left_blend_pipe);
struct mdss_mdp_pipe *mdss_mdp_pipe_get(u32 ndx, struct mdss_mdp_pipe *mdss_mdp_pipe_get(u32 ndx,
enum mdss_mdp_pipe_rect rect_num); enum mdss_mdp_pipe_rect rect_num);
struct mdss_mdp_pipe *mdss_mdp_pipe_search(struct mdss_data_type *mdata, struct mdss_mdp_pipe *mdss_mdp_pipe_search(struct mdss_data_type *mdata,

View file

@ -609,6 +609,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
bool is_vig_needed = false; bool is_vig_needed = false;
u32 left_lm_w = left_lm_w_from_mfd(mfd); u32 left_lm_w = left_lm_w_from_mfd(mfd);
u32 flags = 0; u32 flags = 0;
u32 off = 0;
if (mdp5_data->ctl == NULL) if (mdp5_data->ctl == NULL)
return -ENODEV; return -ENODEV;
@ -692,18 +693,29 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
break; break;
case PIPE_TYPE_AUTO: case PIPE_TYPE_AUTO:
default: default:
if (req->flags & MDP_OV_PIPE_FORCE_DMA) if (req->flags & MDP_OV_PIPE_FORCE_DMA) {
pipe_type = MDSS_MDP_PIPE_TYPE_DMA; pipe_type = MDSS_MDP_PIPE_TYPE_DMA;
else if (fmt->is_yuv || /*
* For paths using legacy API's for pipe
* allocation, use offset of 2 for allocating
* right pipe for pipe type DMA. This is
* because from SDM 3.x.x. onwards one DMA
* pipe has two instances for multirect.
*/
off = (mixer_mux == MDSS_MDP_MIXER_MUX_RIGHT)
? 2 : 0;
} else if (fmt->is_yuv ||
(req->flags & MDP_OV_PIPE_SHARE) || (req->flags & MDP_OV_PIPE_SHARE) ||
is_vig_needed) is_vig_needed) {
pipe_type = MDSS_MDP_PIPE_TYPE_VIG; pipe_type = MDSS_MDP_PIPE_TYPE_VIG;
else } else {
pipe_type = MDSS_MDP_PIPE_TYPE_RGB; pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
}
break; break;
} }
pipe = mdss_mdp_pipe_alloc(mixer, pipe_type, left_blend_pipe); pipe = mdss_mdp_pipe_alloc(mixer, off,
pipe_type, left_blend_pipe);
/* RGB pipes can be used instead of DMA */ /* RGB pipes can be used instead of DMA */
if (IS_ERR_OR_NULL(pipe) && if (IS_ERR_OR_NULL(pipe) &&
@ -712,7 +724,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
pr_debug("giving RGB pipe for fb%d. flags:0x%x\n", pr_debug("giving RGB pipe for fb%d. flags:0x%x\n",
mfd->index, req->flags); mfd->index, req->flags);
pipe_type = MDSS_MDP_PIPE_TYPE_RGB; pipe_type = MDSS_MDP_PIPE_TYPE_RGB;
pipe = mdss_mdp_pipe_alloc(mixer, pipe_type, pipe = mdss_mdp_pipe_alloc(mixer, off, pipe_type,
left_blend_pipe); left_blend_pipe);
} }
@ -723,7 +735,7 @@ int mdss_mdp_overlay_pipe_setup(struct msm_fb_data_type *mfd,
pr_debug("giving ViG pipe for fb%d. flags:0x%x\n", pr_debug("giving ViG pipe for fb%d. flags:0x%x\n",
mfd->index, req->flags); mfd->index, req->flags);
pipe_type = MDSS_MDP_PIPE_TYPE_VIG; pipe_type = MDSS_MDP_PIPE_TYPE_VIG;
pipe = mdss_mdp_pipe_alloc(mixer, pipe_type, pipe = mdss_mdp_pipe_alloc(mixer, off, pipe_type,
left_blend_pipe); left_blend_pipe);
} }

View file

@ -1250,11 +1250,12 @@ cursor_done:
} }
struct mdss_mdp_pipe *mdss_mdp_pipe_alloc(struct mdss_mdp_mixer *mixer, struct mdss_mdp_pipe *mdss_mdp_pipe_alloc(struct mdss_mdp_mixer *mixer,
u32 type, struct mdss_mdp_pipe *left_blend_pipe) u32 off, u32 type, struct mdss_mdp_pipe *left_blend_pipe)
{ {
struct mdss_mdp_pipe *pipe; struct mdss_mdp_pipe *pipe;
mutex_lock(&mdss_mdp_sspp_lock); mutex_lock(&mdss_mdp_sspp_lock);
pipe = mdss_mdp_pipe_init(mixer, type, 0, left_blend_pipe); pipe = mdss_mdp_pipe_init(mixer, type, off, left_blend_pipe);
mutex_unlock(&mdss_mdp_sspp_lock); mutex_unlock(&mdss_mdp_sspp_lock);
return pipe; return pipe;
} }