From patchwork Wed Feb 28 15:08:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liviu Dudau X-Patchwork-Id: 130006 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp1175809lja; Wed, 28 Feb 2018 07:51:46 -0800 (PST) X-Google-Smtp-Source: AH8x226jkI/pWJOBgCDug50sNR+KgJmX5ILDkB/gEy06ydnBvt+7wK9Ni8zIboFaVfEl6fcVPthl X-Received: by 10.101.85.67 with SMTP id t3mr14746771pgr.310.1519833106366; Wed, 28 Feb 2018 07:51:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519833106; cv=none; d=google.com; s=arc-20160816; b=BZSPcrO5RpQH2jqv+EUY8nslGwIujGsKLXcfyY1vWPtiPwVMdRJVop3h59ZfDVyfBk eCbLCvGtpReVong5xvdBumNVunapRYPoy6SuEh7SeNXuSpX2aJffo/ukKu7QVJ2GzV/h YhqAnV9C0G05HLNaa6fpWtMEpij0269NmT/UZI4FDiiDAzrMtHBwwJfQo1jPiWnlEE35 QnPjMEpMNaixbIGVg074dCFwkeiOgDcKUhP4VcdhTWwPGmX8Pa16OWq9dvY6LtvpajwW 9yeao6ayZk4bWQQHPJcKvio3SmwZ28R48lnxbIrsEa5yVc7vbJbTOGQS//s/tPOaGHyp j8AA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=5xZ69bbRNUGpah+Obca0f3U6YZeID2iH6Gv2a1iK6l4=; b=uJ0XJ8/3HFOVIOGkMqzSjACmhbDWj4uvPvDr2JHovAtTYnAPy/+5N/tLzbk/SeSAiJ 7YAqE8aX3/3P1S8pCbr9kEe/VZ5vgf+97u/v2CsPwA1bEBH8FBViGgBlesrmRxC+ZgN7 SvO9z2sHSCQl1e3MQdqEcylGuRjBeUs6jHXF4HPEtTGQMWL9vux0WgKT3MHs+vkB0yJq KonvMBDeTzGSEJdIU7D8yf0kI/4pdHJdipk894JSGp00wh4usau0vl2Xckn2NxYqoi7V bRKr0mBOWAQbVPjs6IdVTq1QHdcI8LKPBehLzCzFf8XuvedrSIm+5L7ooMj6HVbptzcn hfzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 65-v6si1468629plb.635.2018.02.28.07.51.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 07:51:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BB066EAA4; Wed, 28 Feb 2018 15:51:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from cam-smtp0.cambridge.arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74E336EAA4 for ; Wed, 28 Feb 2018 15:51:43 +0000 (UTC) Received: from e110455-lin.cambridge.arm.com (e110455-lin.cambridge.arm.com [10.2.131.15]) by cam-smtp0.cambridge.arm.com (8.13.8/8.13.8) with ESMTP id w1SF8MBC001943; Wed, 28 Feb 2018 15:08:22 GMT From: Liviu Dudau To: DRI-devel Subject: [PATCH 04/23] drm/mali-dp: Don't enable scaling engine for planes that only rotate. Date: Wed, 28 Feb 2018 15:08:22 +0000 Message-Id: <20180228150822.20958-1-Liviu.Dudau@arm.com> X-Mailer: git-send-email 2.16.2 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ayan Halder , Liviu Dudau , Alexandru-Cosmin Gheorghe , Mali DP Maintainers MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Currently the scaling engine gets enabled for a plane where the input size differs from the composition size. As rotation is done natively by the plane's hardware layer, we don't need the scaling engine to be enabled. Signed-off-by: Liviu Dudau --- drivers/gpu/drm/arm/malidp_planes.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 9d5039f0f84e..651bd10557e0 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c +++ b/drivers/gpu/drm/arm/malidp_planes.c @@ -159,8 +159,14 @@ static int malidp_se_check_scaling(struct malidp_plane *mp, if (ret) return ret; - src_w = state->src_w >> 16; - src_h = state->src_h >> 16; + if (state->rotation & MALIDP_ROTATED_MASK) { + src_w = state->src_h >> 16; + src_h = state->src_w >> 16; + } else { + src_w = state->src_w >> 16; + src_h = state->src_h >> 16; + } + if ((state->crtc_w == src_w) && (state->crtc_h == src_h)) { /* Scaling not necessary for this plane. */ mc->scaled_planes_mask &= ~(mp->layer->id);