Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3216279imu; Sat, 24 Nov 2018 00:18:55 -0800 (PST) X-Google-Smtp-Source: AFSGD/U7wmMJBA1sQ7GEY2do0HGmz8hwvEKTN7OQeQt8ugQHX9vP3vIY6+dCUTQdzTwkC92AXzEY X-Received: by 2002:a17:902:b090:: with SMTP id p16mr2739610plr.190.1543047535037; Sat, 24 Nov 2018 00:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543047535; cv=none; d=google.com; s=arc-20160816; b=Fstzoq7aEuny0hcvJyvSrVDsSN8EO/hItRuu85vh7Vr7heKCg6zpiqtAPKG/vEy+aF vLaFtOoT383xzJdauqS6NgFs0dKHbxpc2qcFqa0lLYlg4EOJRwop0GZq/AbvI5gZXpkn MJFNPUBs5Z7bIEeCEqz4EP/wjmfL81f1RJ12RxDP+Adj/CN/I8TlhRL/boJ0neSxkvP2 y5qU2rOvmvpp6r7R53Vg9aiUEfyA5XPnsIByVA9Jb1Mqx6R700qAhDo4aYG/Zm4VmPYQ GtARzMDiO/unDOLztfUoBFXPIHK25h2GL+cklGfD23VDwa+WcteuPsm6L1qx8St1Bmbl Zwmg== 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=o0XQ7KV9H5B7lEk6y7qTyyjGtvaBTjZRV8agsSg7k58=; b=lGdFA16slo7edqKIM2bnfBcIyy8ELUu7CAOpsFKsa1XbhW9UYvLniQFBQ2QfE7CSQz xFBRS5GtNApCKaWRF1nzg5zS7uAEy7IabFCJSJ/n5XEv44lIHamN4EFr1GoLXOLicEaY I5mVO3uSI/pLU8tlKrmV+d/sfzDvO35m6uJjtxWeUbYDOF8KkokJuCKgV5zyr6nUCl8h SJhIG9CX2IabAllsgvbvzwLlG/KZDTh2U1MU2E52tQNE5Wg2/vCX2sNd/AnffGeEt3Jk kNj/FmX+tgDppG/oi5XzTJex6RObQzFg8meZtIJDOsU+tsCCfDaIXbPypqeEvIdSPnbm opCg== 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 w32si55719304pga.337.2018.11.24.00.18.40; Sat, 24 Nov 2018 00:18:55 -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 S2502825AbeKWUKx (ORCPT + 99 others); Fri, 23 Nov 2018 15:10:53 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49509 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409034AbeKWUKh (ORCPT ); Fri, 23 Nov 2018 15:10:37 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 4BBD420F7E; Fri, 23 Nov 2018 10:27:08 +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 3DB18207B0; Fri, 23 Nov 2018 10:26:38 +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 Subject: [PATCH v2 41/43] drm/sun4i: Make COEF_RDY conditional Date: Fri, 23 Nov 2018 10:25:13 +0100 Message-Id: <20181123092515.2511-42-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 From: Maxime Ripard The COEF_RDY bit isn't found in all the SoCs featuring some variant of the frontend. Add it to our quirks structure. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_frontend.c | 9 +++++---- drivers/gpu/drm/sun4i/sun4i_frontend.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.c b/drivers/gpu/drm/sun4i/sun4i_frontend.c index 0e92f59efd49..f50507ee6d75 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.c +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c @@ -95,10 +95,11 @@ static void sun4i_frontend_scaler_init(struct sun4i_frontend *frontend) sun4i_frontend_vert_coef[i]); } - regmap_write_bits(frontend->regs, - SUN4I_FRONTEND_FRM_CTRL_REG, - SUN4I_FRONTEND_FRM_CTRL_COEF_RDY, - SUN4I_FRONTEND_FRM_CTRL_COEF_RDY); + if (frontend->data->has_coef_rdy) + regmap_write_bits(frontend->regs, + SUN4I_FRONTEND_FRM_CTRL_REG, + SUN4I_FRONTEND_FRM_CTRL_COEF_RDY, + SUN4I_FRONTEND_FRM_CTRL_COEF_RDY); } int sun4i_frontend_init(struct sun4i_frontend *frontend) diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.h b/drivers/gpu/drm/sun4i/sun4i_frontend.h index daf3fa5d01ba..3618993f8e49 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.h +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.h @@ -102,6 +102,7 @@ struct reset_control; struct sun4i_frontend_data { bool has_coef_access_ctrl; + bool has_coef_rdy; }; struct sun4i_frontend { -- 2.19.1