From patchwork Fri Jan 18 14:51:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10770591 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 736946C5 for ; Fri, 18 Jan 2019 15:01:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 611892EB31 for ; Fri, 18 Jan 2019 15:01:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 521642EB32; Fri, 18 Jan 2019 15:01:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F3FFC2EB2A for ; Fri, 18 Jan 2019 15:01:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PBrM4WmHv4H9kpgoKqd9OukLbO13XuJwMoLvAhqvZe8=; b=s1iVfsfS4HMTTD fiNTgtZEGTgQPOxZIgdkl9Qu6tr9aVabUsd3H68pwqKOnorcWA+M9owAX6c0M2pCorqEWtE7+XcqR J8o57F+lTYYXmvg0dvjA8N1DsOeQFnWWmci3ZUPJhTQ8ctLzpO+JVAfBG1nYmI2FV+xYmnG2GVoiP TB4AzFd4ln3BQ/WsVe+SSfAOWu2LHhI0fvSn9ULecp06Hf5fUE6FkvDsZ2rdnyNcjpDtLorvFedk3 1Q25FeTUED7kHcqn6hV20B5WW21mEnySJXcXSZYg6pdKhYiQZQO2dEKabMJufs3d1Uy/nWgWoRrPm yTcLz4W2m6hmCFdHCMOw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkVea-0007RN-GE; Fri, 18 Jan 2019 15:01:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkVdg-00068b-4R for linux-arm-kernel@bombadil.infradead.org; Fri, 18 Jan 2019 15:00:56 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=qwJRIOWar7vb382ii8nfiO9ZfiXZe7++IhbcYp9fHUo=; b=LAHaOHMnbvajNHNoTvTJZyu9d8 N0e7HXP+0v+GUujfCRhfSNWBEOoU7pBDkOlkcFCCjNkqrmDsoN6sry4C0qG7rKBv0W033SqKdt+/m 01VtIXdraqaZP3c1mXikT135biGuTRJ0p2iPN6lIcoYcN+LoORj76A2GEE1Aowxpf8i1tlgaR8iup YDpv97AAbN0jr/2WYlcp7Eiq9GAwT8R5TZrTL6qPJxjMKfgjxNwtvJp5Sw7aFUlXk70lRtvv8XY+H Yl4AT1MWWFh3PVJurqD9Dbc63cEx9IxZJe31OJgqJnOSIRClinn6UYj3pC2NH+zQs7CR2I3jgXDmh zKmtMaQg==; Received: from mail.bootlin.com ([62.4.15.54]) by casper.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gkVVU-0007Fj-6N for linux-arm-kernel@lists.infradead.org; Fri, 18 Jan 2019 14:52:29 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 0CB0720E4A; Fri, 18 Jan 2019 15:52:27 +0100 (CET) Received: from localhost.localdomain (aaubervilliers-681-1-37-87.w90-88.abo.wanadoo.fr [90.88.156.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 38F0E20C3F; Fri, 18 Jan 2019 15:51:46 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: [PATCH RESEND v5 20/23] drm/sun4i: Make COEF_RDY conditional Date: Fri, 18 Jan 2019 15:51:30 +0100 Message-Id: <20190118145133.21281-21-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190118145133.21281-1-paul.kocialkowski@bootlin.com> References: <20190118145133.21281-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190118_145228_272209_1ACEB57A X-CRM114-Status: GOOD ( 13.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Petazzoni , Maxime Ripard , Maarten Lankhorst , Paul Kocialkowski , David Airlie , Chen-Yu Tsai , Daniel Vetter , Sean Paul Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Paul Kocialkowski --- 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 7a1095b004d4..86c5033102b9 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.c +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c @@ -96,10 +96,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 01e68bb11c98..e332bc1c6b68 100644 --- a/drivers/gpu/drm/sun4i/sun4i_frontend.h +++ b/drivers/gpu/drm/sun4i/sun4i_frontend.h @@ -114,6 +114,7 @@ struct reset_control; struct sun4i_frontend_data { bool has_coef_access_ctrl; + bool has_coef_rdy; }; struct sun4i_frontend {