Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3214260imu; Sat, 24 Nov 2018 00:16:05 -0800 (PST) X-Google-Smtp-Source: AJdET5ecFxUufIHaOe3vhSH6PxVUGNluz2RZBg1aQ5i7mlC3AP0oglq5OBAd4YMJWsHwjq7QmUwE X-Received: by 2002:a63:4566:: with SMTP id u38mr17114963pgk.4.1543047365787; Sat, 24 Nov 2018 00:16:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047365; cv=none; d=google.com; s=arc-20160816; b=Pxn5HWp+/0mFVyjuKUN38lazebsnD79s6WXsmGUwwAhZrz1OZCTjhykB9CHwnH82uD uiAAMYViLU3GHng5ECJv7Qh7XPVPgq40or3iv/SpkFm2AwZcPJwjDKVy4UhV77o7XaSX fA7nXrKErbXLVi8zAr0kx+KWffLzUBVHoK/R1RItIp4iV5I1jmGVNkD1aKwN0eSsn3HC reqCWWGBZiaBMpFAwcFiyfiJz6oDEbbTuR/WZl8CLc1kzKGbH/D3NLTEOAiUh6Jl5qqz OTqAkShvV2tQMeB6DXOmWlVc6iULP83VCKP1BpmIye73OB2eYbTv0oik/5UKdA0a6P7N ILgA== 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=jTrgK+OIzH9bUS3BzuYAB2JshKLKX8g0CkNBn/lSZus=; b=IGVzgKGtLXKCHQ1C/aTWuti6mxpVdWQbbgkV9XJQGMfX3o3dTpeLFiLUDQeqqDt/Md kXabAEvCnhVAL/C0Mzvn+aJODPjPD1jChvtOFBID55dn8x2fBv1xzN7DIE3CwNuoMtpe 138dgVFqQZFqpRK19iZvS6n6QAWWHz9ENmVZ2Kvt1i4i5fvrsvtDGYnxttWc4XJiT9jS KaZ6SwJLh6lMSVY9pNHiJdwFjVS9+3eGexGWBmT2l14iH4/2xaY1OwoAznHaXroTOj0C EjSP4wzn8YXTWLSTuMY3Y6pYyzr9z2gIoSMQlX1q86roww9+6/6xW1B0/gDrPrlBA/j0 hAdA== 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 z10si43084718pfm.37.2018.11.24.00.15.51; Sat, 24 Nov 2018 00:16:05 -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 S2502733AbeKWUK0 (ORCPT + 99 others); Fri, 23 Nov 2018 15:10:26 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49301 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390496AbeKWUKZ (ORCPT ); Fri, 23 Nov 2018 15:10:25 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id EA7CE20DDE; Fri, 23 Nov 2018 10:26:57 +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 99CA920DE1; 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 16/43] drm/sun4i: frontend: Move CSC bypass setup to format update routine Date: Fri, 23 Nov 2018 10:24:48 +0100 Message-Id: <20181123092515.2511-17-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 In order to support YUV to RGB conversion with the frontend (which is generally used for connecting with the backend), the CSC block must not be bypassed. As a result, the bit to enable CSC bypass is moved from the runtime resume routine to the format update routine, so that it can disabled when introducing support for YUV formats later. Signed-off-by: Paul Kocialkowski --- drivers/gpu/drm/sun4i/sun4i_frontend.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.c b/drivers/gpu/drm/sun4i/sun4i_frontend.c index 0f7f8c7b3402..f54b1c4a9264 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.c +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c @@ -177,6 +177,10 @@ int sun4i_frontend_update_formats(struct sun4i_frontend *frontend, regmap_write(frontend->regs, SUN4I_FRONTEND_CH0_VERTPHASE1_REG, 0x400); regmap_write(frontend->regs, SUN4I_FRONTEND_CH1_VERTPHASE1_REG, 0x400); + regmap_update_bits(frontend->regs, SUN4I_FRONTEND_BYPASS_REG, + SUN4I_FRONTEND_BYPASS_CSC_EN, + SUN4I_FRONTEND_BYPASS_CSC_EN); + regmap_write(frontend->regs, SUN4I_FRONTEND_INPUT_FMT_REG, SUN4I_FRONTEND_INPUT_FMT_DATA_MOD(1) | SUN4I_FRONTEND_INPUT_FMT_DATA_FMT(in_fmt_val) | @@ -354,10 +358,6 @@ static int sun4i_frontend_runtime_resume(struct device *dev) SUN4I_FRONTEND_EN_EN, SUN4I_FRONTEND_EN_EN); - regmap_update_bits(frontend->regs, SUN4I_FRONTEND_BYPASS_REG, - SUN4I_FRONTEND_BYPASS_CSC_EN, - SUN4I_FRONTEND_BYPASS_CSC_EN); - sun4i_frontend_scaler_init(frontend); return 0; -- 2.19.1