diff options
author | Liviu Dudau <Liviu.Dudau@arm.com> | 2017-12-15 19:42:19 +0300 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2018-03-14 14:38:02 +0300 |
commit | e0521c05c13cca593d386533c61a646ab3dbcfd9 (patch) | |
tree | 0d6e1d0b50205257551483e3581549ece001c1cf /drivers/gpu/drm/arm | |
parent | f2f2c85c66202edcb623626b3babce7850d8b4fb (diff) | |
download | linux-e0521c05c13cca593d386533c61a646ab3dbcfd9.tar.xz |
drm/mali-dp: Don't enable scaling engine for planes that only rotate.
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>
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r-- | drivers/gpu/drm/arm/malidp_planes.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 6f813c4c187d..7bc164aa29ee 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -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); |