diff mbox series

drm/gma500: Fix direction check in psb_accel_2d_copy()

Message ID 20200622204537.26792-1-efremov@linux.com
State New
Headers show
Series drm/gma500: Fix direction check in psb_accel_2d_copy() | expand

Commit Message

Denis Efremov June 22, 2020, 8:45 p.m. UTC
psb_accel_2d_copy() checks direction PSB_2D_COPYORDER_BR2TL twice.
Based on psb_accel_2d_copy_direction() results, PSB_2D_COPYORDER_TL2BR
should be checked instead in the second direction check.

Fixes: 4d8d096e9ae8 ("gma500: introduce the framebuffer support code")
Cc: stable@vger.kernel.org
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 drivers/gpu/drm/gma500/accel_2d.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/gma500/accel_2d.c b/drivers/gpu/drm/gma500/accel_2d.c
index adc0507545bf..8dc86aac54d2 100644
--- a/drivers/gpu/drm/gma500/accel_2d.c
+++ b/drivers/gpu/drm/gma500/accel_2d.c
@@ -179,8 +179,8 @@  static int psb_accel_2d_copy(struct drm_psb_private *dev_priv,
 		src_x += size_x - 1;
 		dst_x += size_x - 1;
 	}
-	if (direction == PSB_2D_COPYORDER_BR2TL ||
-	    direction == PSB_2D_COPYORDER_BL2TR) {
+	if (direction == PSB_2D_COPYORDER_BL2TR ||
+	    direction == PSB_2D_COPYORDER_TL2BR) {
 		src_y += size_y - 1;
 		dst_y += size_y - 1;
 	}