]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: mali-dp: Fix transposed horizontal/vertical flip
authorBrian Starkey <brian.starkey@arm.com>
Wed, 7 Dec 2016 13:20:28 +0000 (13:20 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Mon, 23 Jan 2017 09:46:24 +0000 (09:46 +0000)
The horizontal and vertical flip flags were the wrong way around,
causing reflect-x to result in reflect-y being applied and vice-versa.
Fix them.

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

index 8c5ce36147f3d56af5763046757bf564046fe9da..629f634872a4bc6eb17027552bc2f05585726412 100644 (file)
@@ -221,9 +221,9 @@ static void malidp_de_plane_update(struct drm_plane *plane,
        if (plane->state->rotation & DRM_ROTATE_MASK)
                val = ilog2(plane->state->rotation & DRM_ROTATE_MASK) << LAYER_ROT_OFFSET;
        if (plane->state->rotation & DRM_REFLECT_X)
-               val |= LAYER_V_FLIP;
-       if (plane->state->rotation & DRM_REFLECT_Y)
                val |= LAYER_H_FLIP;
+       if (plane->state->rotation & DRM_REFLECT_Y)
+               val |= LAYER_V_FLIP;
 
        /*
         * always enable pixel alpha blending until we have a way to change