summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/arm
diff options
context:
space:
mode:
authorAyan Halder <ayan.halder@arm.com>2017-12-19 16:20:16 +0000
committerLiviu Dudau <Liviu.Dudau@arm.com>2018-03-14 11:38:02 +0000
commit6cc3a505dcd60894a3ecefcbb40058873924bcf0 (patch)
treeffbf0a84307a8478de0b5f6f9398d0cabec53c99 /drivers/gpu/drm/arm
parente0521c05c13cca593d386533c61a646ab3dbcfd9 (diff)
downloadblackbird-op-linux-6cc3a505dcd60894a3ecefcbb40058873924bcf0.tar.gz
blackbird-op-linux-6cc3a505dcd60894a3ecefcbb40058873924bcf0.zip
drm: mali-dp: Fix bug on scaling with rotation
In the case, when the user wants to scale and rotate a layer by 90/270 degrees, the scaling engine input dimensions' parameters ie width and height needs to be swapped with respect to the layer's input dimensions. This means scaling engine input height should be set to layer's input width and scaling engine input width should be set to layer's input height. Signed-off-by: Ayan Halder <ayan.halder@arm.com> Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
Diffstat (limited to 'drivers/gpu/drm/arm')
-rw-r--r--drivers/gpu/drm/arm/malidp_crtc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/arm/malidp_crtc.c b/drivers/gpu/drm/arm/malidp_crtc.c
index 904fff80917b..7b952559fc43 100644
--- a/drivers/gpu/drm/arm/malidp_crtc.c
+++ b/drivers/gpu/drm/arm/malidp_crtc.c
@@ -288,8 +288,14 @@ static int malidp_crtc_atomic_check_scaling(struct drm_crtc *crtc,
s->enhancer_enable = ((h_upscale_factor >> 16) >= 2 ||
(v_upscale_factor >> 16) >= 2);
- s->input_w = pstate->src_w >> 16;
- s->input_h = pstate->src_h >> 16;
+ if (pstate->rotation & MALIDP_ROTATED_MASK) {
+ s->input_w = pstate->src_h >> 16;
+ s->input_h = pstate->src_w >> 16;
+ } else {
+ s->input_w = pstate->src_w >> 16;
+ s->input_h = pstate->src_h >> 16;
+ }
+
s->output_w = pstate->crtc_w;
s->output_h = pstate->crtc_h;
OpenPOWER on IntegriCloud