From patchwork Tue Jan 17 16:25:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 91699 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp526326obz; Tue, 17 Jan 2017 08:39:46 -0800 (PST) X-Received: by 10.98.70.12 with SMTP id t12mr31087218pfa.47.1484671186340; Tue, 17 Jan 2017 08:39:46 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si18143959plj.177.2017.01.17.08.39.45; Tue, 17 Jan 2017 08:39:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751302AbdAQQjn (ORCPT + 25 others); Tue, 17 Jan 2017 11:39:43 -0500 Received: from fw-tnat.cambridge.arm.com ([217.140.96.140]:53818 "EHLO cam-smtp0.cambridge.arm.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751227AbdAQQjl (ORCPT ); Tue, 17 Jan 2017 11:39:41 -0500 X-Greylist: delayed 873 seconds by postgrey-1.27 at vger.kernel.org; Tue, 17 Jan 2017 11:39:36 EST Received: from e110455-lin.cambridge.arm.com (e110455-lin.cambridge.arm.com [10.2.131.175]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id v0HGOvUo022705; Tue, 17 Jan 2017 16:24:58 GMT From: Liviu Dudau To: Brian Starkey Cc: Mali DP Maintainers , David Airlie , DRI devel , LKML Subject: [PATCH 5/8] drm: mali-dp: Fix destination size handling when rotating Date: Tue, 17 Jan 2017 16:25:04 +0000 Message-Id: <20170117162507.31961-6-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170117162507.31961-1-Liviu.Dudau@arm.com> References: <20170117162507.31961-1-Liviu.Dudau@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brian Starkey 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 Signed-off-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_planes.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.11.0 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);