From 8331ea4e224703cacc193fe75ed77b62380560da Mon Sep 17 00:00:00 2001 From: Mayank Chopra Date: Thu, 9 Jan 2014 18:58:59 +0530 Subject: msm: mdss: Reserve single SMP block for writeback mixer pipes Writeback does not have stringent requirement for latency buffers. So, SMP blocks reservation for the pipes attached to writeback block can be restricted to single SMP block for each plane. This makes more SMP block available for other clients. Change-Id: I3d788bcf7fcbc5667b4a3a0c52256f55cc0aa1e7 Signed-off-by: Mayank Chopra --- drivers/video/fbdev/msm/mdss_mdp_pipe.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/video/fbdev/msm/mdss_mdp_pipe.c b/drivers/video/fbdev/msm/mdss_mdp_pipe.c index 029594361777..d254c091ee5b 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_pipe.c +++ b/drivers/video/fbdev/msm/mdss_mdp_pipe.c @@ -168,7 +168,7 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe) u32 num_blks = 0, reserved = 0; struct mdss_mdp_plane_sizes ps; int i; - int rc = 0, rot_mode = 0; + int rc = 0, rot_mode = 0, wb_mixer = 0; u32 nlines, format, seg_w; u16 width; @@ -252,9 +252,12 @@ int mdss_mdp_smp_reserve(struct mdss_mdp_pipe *pipe) else nlines = pipe->bwc_mode ? 1 : 2; + if (pipe->mixer->type == MDSS_MDP_MIXER_TYPE_WRITEBACK) + wb_mixer = 1; + mutex_lock(&mdss_mdp_smp_lock); for (i = 0; i < ps.num_planes; i++) { - if (rot_mode) { + if (rot_mode || wb_mixer) { num_blks = 1; } else { num_blks = DIV_ROUND_UP(ps.ystride[i] * nlines, -- cgit v1.2.3