Skip to content

Commit

Permalink
drm/mali-dp: Don't enable scaling engine for planes that only rotate.
Browse files Browse the repository at this point in the history
Currently the scaling engine gets enabled for a plane where the input
size differs from the composition size. As rotation is done natively
by the plane's hardware layer, we don't need the scaling engine to be
enabled.

Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
  • Loading branch information
Liviu Dudau authored and Liviu Dudau committed Mar 14, 2018
1 parent f2f2c85 commit e0521c0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/gpu/drm/arm/malidp_planes.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,14 @@ static int malidp_se_check_scaling(struct malidp_plane *mp,
if (ret)
return ret;

src_w = state->src_w >> 16;
src_h = state->src_h >> 16;
if (state->rotation & MALIDP_ROTATED_MASK) {
src_w = state->src_h >> 16;
src_h = state->src_w >> 16;
} else {
src_w = state->src_w >> 16;
src_h = state->src_h >> 16;
}

if ((state->crtc_w == src_w) && (state->crtc_h == src_h)) {
/* Scaling not necessary for this plane. */
mc->scaled_planes_mask &= ~(mp->layer->id);
Expand Down

0 comments on commit e0521c0

Please sign in to comment.