Skip to content

Commit

Permalink
drm/msm/mdp5: no scaling support on RGBn pipes for 8x16
Browse files Browse the repository at this point in the history
Looks like cut/paste error from the other device cfgs (which do support
scaling on RGBn pipes).

Signed-off-by: Rob Clark <robdclark@gmail.com>
  • Loading branch information
Rob Clark committed Nov 2, 2016
1 parent 31e4801 commit 07cd2e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const struct mdp5_cfg_hw msm8x16_config = {
.count = 2,
.base = { 0x14000, 0x16000 },
.caps = MDP_PIPE_CAP_HFLIP | MDP_PIPE_CAP_VFLIP |
MDP_PIPE_CAP_SCALE | MDP_PIPE_CAP_DECIMATION,
MDP_PIPE_CAP_DECIMATION,
},
.pipe_dma = {
.count = 1,
Expand Down
9 changes: 3 additions & 6 deletions drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,15 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
format = to_mdp_format(msm_framebuffer_format(state->fb));
if (MDP_FORMAT_IS_YUV(format) &&
!pipe_supports_yuv(mdp5_plane->caps)) {
dev_err(plane->dev->dev,
"Pipe doesn't support YUV\n");
DBG("Pipe doesn't support YUV\n");

return -EINVAL;
}

if (!(mdp5_plane->caps & MDP_PIPE_CAP_SCALE) &&
(((state->src_w >> 16) != state->crtc_w) ||
((state->src_h >> 16) != state->crtc_h))) {
dev_err(plane->dev->dev,
"Pipe doesn't support scaling (%dx%d -> %dx%d)\n",
DBG("Pipe doesn't support scaling (%dx%d -> %dx%d)\n",
state->src_w >> 16, state->src_h >> 16,
state->crtc_w, state->crtc_h);

Expand All @@ -313,8 +311,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
vflip = !!(state->rotation & DRM_REFLECT_Y);
if ((vflip && !(mdp5_plane->caps & MDP_PIPE_CAP_VFLIP)) ||
(hflip && !(mdp5_plane->caps & MDP_PIPE_CAP_HFLIP))) {
dev_err(plane->dev->dev,
"Pipe doesn't support flip\n");
DBG("Pipe doesn't support flip\n");

return -EINVAL;
}
Expand Down

0 comments on commit 07cd2e3

Please sign in to comment.