mdss: display: fix incorrect rotator programming

Source format should indicate that source is to be rotated 90 degrees
instead of indicating source has been rotated 90 degrees. This is needed
for hardware to fetch source in correct order and generate correct 90
degree output image.

Change-Id: If8d1e12ef3e7a291e67ec9763f5ca92ec6fa983c
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
This commit is contained in:
Adrian Salido-Moreno 2012-06-15 11:28:12 -07:00 committed by Stephen Boyd
parent 6a12cf3410
commit a1eb2beb6e
2 changed files with 8 additions and 6 deletions

View file

@ -354,11 +354,12 @@ static int mdss_mdp_scale_setup(struct mdss_mdp_pipe *pipe)
u32 chroma_sample;
if (pipe->type == MDSS_MDP_PIPE_TYPE_DMA) {
if (!(pipe->flags & MDP_ROT_90) && (pipe->dst.h != pipe->src.h
|| pipe->dst.w != pipe->src.w))
return -EINVAL; /* no scaling supported on dma pipes */
else
if (pipe->dst.h != pipe->src.h || pipe->dst.w != pipe->src.w) {
pr_err("no scaling supported on dma pipe\n");
return -EINVAL;
} else {
return 0;
}
}
chroma_sample = pipe->src_fmt->chroma_sample;
@ -535,10 +536,10 @@ static int mdss_mdp_format_setup(struct mdss_mdp_pipe *pipe)
pr_debug("pnum=%d format=%d opmode=%x\n", pipe->num, fmt->format,
opmode);
rot90 = !!(pipe->flags & MDP_SOURCE_ROTATED_90);
rot90 = !!(pipe->flags & MDP_ROT_90);
chroma_samp = fmt->chroma_sample;
if (rot90) {
if (pipe->flags & MDP_SOURCE_ROTATED_90) {
if (chroma_samp == MDSS_MDP_CHROMA_H2V1)
chroma_samp = MDSS_MDP_CHROMA_H1V2;
else if (chroma_samp == MDSS_MDP_CHROMA_H1V2)

View file

@ -212,6 +212,7 @@ int mdss_mdp_rotator_queue(struct mdss_mdp_rotator_session *rot,
rot_pipe->img_width = rot->img_width;
rot_pipe->img_height = rot->img_height;
rot_pipe->src = rot->src_rect;
rot_pipe->dst = rot->src_rect;
rot_pipe->bwc_mode = rot->bwc_mode;
rot_pipe->params_changed++;
}