Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1560789

[PATCH 5/8] drm: mali-dp: Fix destination size handling when rotating

From Liviu Dudau <Liviu.Dudau@arm.com>
Newsgroups linux.kernel
Subject [PATCH 5/8] drm: mali-dp: Fix destination size handling when rotating
Date 2017-01-17 17:40 +0100
Message-ID <t0EXF-VQ-37@gated-at.bofh.it> (permalink)
References <t0EXE-VQ-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Brian Starkey <brian.starkey@arm.com>

The destination rectangle provided by userspace in the CRTC_X/Y/W/H
properties is already expressed as the dimensions after rotation.
This means we shouldn't swap the width and height ourselves when a
90/270 degree rotation is requested, so remove the code doing the swap.

Fixes: ad49f8602fe8 ("drm/arm: Add support for Mali Display Processors")

Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
 drivers/gpu/drm/arm/malidp_planes.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c
index 69eba71253c9..8c5ce36147f3 100644
--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -187,13 +187,8 @@ static void malidp_de_plane_update(struct drm_plane *plane,
 	/* convert src values from Q16 fixed point to integer */
 	src_w = plane->state->src_w >> 16;
 	src_h = plane->state->src_h >> 16;
-	if (plane->state->rotation & MALIDP_ROTATED_MASK) {
-		dest_w = plane->state->crtc_h;
-		dest_h = plane->state->crtc_w;
-	} else {
-		dest_w = plane->state->crtc_w;
-		dest_h = plane->state->crtc_h;
-	}
+	dest_w = plane->state->crtc_w;
+	dest_h = plane->state->crtc_h;
 
 	malidp_hw_write(mp->hwdev, ms->format, mp->layer->base);
 
-- 
2.11.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/8] drm/mali-dp: Fixes for v4.11 Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:40 +0100
  [PATCH 5/8] drm: mali-dp: Fix destination size handling when rotating Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:40 +0100
  [PATCH 4/8] drm: mali-dp: Don't force source size == crtc size Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100
  [PATCH 2/8] drm: malidp: Remove event_list member from struct malidp_drm Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100
  [PATCH 1/8] drm/arm/malidp: Fix possible dereference of NULL Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100
  [PATCH 7/8] drm: mali-dp: fix Lx_CONTROL register fields clobber Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100
  [PATCH 3/8] drm: mali-dp: Check more use cases in the plane's ->atomic_check() Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100
  [PATCH 8/8] drm: mali-dp: Rename malidp_input_format to malidp_pixel_format Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100
  [PATCH 6/8] drm: mali-dp: Fix transposed horizontal/vertical flip Liviu Dudau <Liviu.Dudau@arm.com> - 2017-01-17 17:50 +0100

csiph-web