Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3214910imu; Sat, 24 Nov 2018 00:17:03 -0800 (PST) X-Google-Smtp-Source: AJdET5ct3eb5AochEI1B7Z1dD6Ob3YsQHSYKAytEQJeDgsj2QbCp8LNR2+KR8nMZW+3M3RXexkHT X-Received: by 2002:a62:5504:: with SMTP id j4-v6mr19424689pfb.166.1543047423082; Sat, 24 Nov 2018 00:17:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047423; cv=none; d=google.com; s=arc-20160816; b=AUPMb4Rf8kFQ9G4vlA4hcKmYW4GoYnFSsTUXw6n4sB5mdR1HJZ8vccXTMCO1CYKs3O c2A19aAjQjj6MaWZre70QMXMmZ6rKhFteHBhwC2ZsbUjZSefmRpll9yc0nDmWsy2xGRW m9vZ4NPglnWlU2TSUZG/clgn+A7PempaNSN/Bvv130BisXrgS7lv8Fil/9twZ5SgfpnI 27x30vlTHxUEdCyweQEnSzFwDV95abpRr5UO/9bmYduCz6OkIdup5UPrIxMYrgG9SL2A NHHQMUalMdhkTxvE8BTNHSahhUoc+LEf14emtz2XkPkShA8GnO5Iba709rg/rPOpHzqQ GOMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=/uRIBiCbyOXRQeS93y+tqg0LpWrkqLXB792WR4UuAPY=; b=aDX3FgMTF82MowNRZDkvx7CiZbL3GI1/OyV6Rv20V1ft0ogOYZY0HxDcn0YJPtPDbM mmd8saGigaagTCVLNtvmluALhMBm/aIjty/wMTqJSSGXSN1jf32s8/6PxqZnEIytv30+ IACkruqlFpJY2LO14A8g18rpZz7mwP6423ADgORXtvGCJ954a/bEvqB60jrpq4hVKckM un6v5JcPDfXvBuu2oJueF56teRVR4ZO4EktljEx/JnNoa3J9oF4ndc20YuNgOtRlesmk j5pgwPw0zcLj/cIZB+sXeMMcIhJjdf91gEFLMXzAcPeHImof0GTHn9uvMypELbMlKS5J fD6Q== ARC-Authentication-Results: i=1; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f16si20899967pgg.173.2018.11.24.00.16.49; Sat, 24 Nov 2018 00:17:03 -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 S2502704AbeKWUKR (ORCPT + 99 others); Fri, 23 Nov 2018 15:10:17 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49278 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393935AbeKWUKQ (ORCPT ); Fri, 23 Nov 2018 15:10:16 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id D8E2C20DD8; Fri, 23 Nov 2018 10:26:48 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost.localdomain (aaubervilliers-681-1-94-205.w90-88.abo.wanadoo.fr [90.88.35.205]) by mail.bootlin.com (Postfix) with ESMTPSA id 199DB20DD9; Fri, 23 Nov 2018 10:26:31 +0100 (CET) From: Paul Kocialkowski To: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org Cc: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Chen-Yu Tsai , Thomas Petazzoni , linux-sunxi@googlegroups.com, Daniel Vetter , Paul Kocialkowski Subject: [PATCH v2 14/43] drm/sun4i: backend: Avoid counting YUV planes that use the frontend Date: Fri, 23 Nov 2018 10:24:46 +0100 Message-Id: <20181123092515.2511-15-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181123092515.2511-1-paul.kocialkowski@bootlin.com> References: <20181123092515.2511-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Our hardware has a limited number of YUV planes (usually 1) that can be supported using the backend only. However, YUV planes can also be supported by the frontend and must then not be counted when checking for that limitation. Only count the YUV plane when the frontend is not used. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/sun4i/sun4i_backend.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.c b/drivers/gpu/drm/sun4i/sun4i_backend.c index 30d7bc76c0af..a39d8b75d76a 100644 --- a/drivers/gpu/drm/sun4i/sun4i_backend.c +++ b/drivers/gpu/drm/sun4i/sun4i_backend.c @@ -543,6 +543,11 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine, DRM_DEBUG_DRIVER("Using the frontend for plane %d\n", plane->index); num_frontend_planes++; + } else { + if (fb->format->is_yuv) { + DRM_DEBUG_DRIVER("Plane FB format is YUV\n"); + num_yuv_planes++; + } } DRM_DEBUG_DRIVER("Plane FB format is %s\n", @@ -551,11 +556,6 @@ static int sun4i_backend_atomic_check(struct sunxi_engine *engine, if (fb->format->has_alpha || (plane_state->alpha != DRM_BLEND_ALPHA_OPAQUE)) num_alpha_planes++; - if (fb->format->is_yuv) { - DRM_DEBUG_DRIVER("Plane FB format is YUV\n"); - num_yuv_planes++; - } - DRM_DEBUG_DRIVER("Plane zpos is %d\n", plane_state->normalized_zpos); -- 2.19.1