From patchwork Wed Oct 28 12:40:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 314818 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BC680C5517A for ; Thu, 29 Oct 2020 02:01:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64FD620791 for ; Thu, 29 Oct 2020 02:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbgJ2CA5 (ORCPT ); Wed, 28 Oct 2020 22:00:57 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:41327 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728088AbgJ1Vux (ORCPT ); Wed, 28 Oct 2020 17:50:53 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 1B0D458011D; Wed, 28 Oct 2020 08:41:09 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 28 Oct 2020 08:41:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=YV64uopMbyk+l jh3jD2H2gsU90HCtGrUQE6tlckPFVY=; b=TpPxR9ywpYvwMADzDxd5Kc1DB0Si3 D5qSoP4QV6pEbt/C/0yzv662lwI3BpW5V7PlgkMnfDRN4AYIx7CAkFlLesulMn3G lHpBsr2nSmwbXOaRP+xGmRVKTOFYe+PG4EI42qDERiUaEh9y9Vu3yYM7NjwgLANn fm+QEUHP3qWt2McoTXy8XdIbbm/TXmWfWd/M2Rrso4fBXr/zJltPZxzBvyOWeFNv ZlMMswj1kOR5huMXTJMZA3U3dCm+jYWtq3+mS5yjbrqtwUs+stSyy78E9JSREP+n eOa7vky2oThikhndk/8GG0MIr6EbUTIYfa7yQIMTP5Id/rkC8/4pymiBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=YV64uopMbyk+ljh3jD2H2gsU90HCtGrUQE6tlckPFVY=; b=A05QqL/Z GBE1MQumV9YLoAr8F4jm+PyAHO4raGnQ8Td5IPPI4iNJO7Py+JVK1uf2g9qTNZ8q 1MD21sBMg0BmKvpC9VEZ9sihYsTRZdLs3NFcdMUI3onaAIsB64JQ5oO5q3i/SB+N 9IM/1FPRXYPxVXpknZtxNyn4+LBFLXd6aYdbu3YC4OGlRmxLExnmjNgJKESgmxcQ caz8eHzixZEdQ5KViMWqwOEwY7wssUAXxoHac5Dy7QYzJurzdp5q3obZw4eDFel4 Q9ofBp58EGqZhjDhdBtjEKCDETE6g3U+NL7nd+cUiL7z2dJkh7r7mJs6AWIHlOIA h59ltZB0+uiy4w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrledugdegvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucfkphepledtrdekledrieekrdejieenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 9FFDC306467D; Wed, 28 Oct 2020 08:41:08 -0400 (EDT) From: Maxime Ripard To: Mark Rutland , Rob Herring , Frank Rowand , Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Eric Anholt Cc: devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Dave Stevenson , Tim Gover , Phil Elwell , Hoegeun Kwon Subject: [PATCH v2 2/7] drm/vc4: kms: Rename NUM_CHANNELS Date: Wed, 28 Oct 2020 13:40:59 +0100 Message-Id: <1e4559e4018d360f0bc6b6ee287a96f94954d9d9.1603888799.git-series.maxime@cerno.tech> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The NUM_CHANNELS define has a pretty generic name and was right before the function using it. Let's move to something that makes the hardware-specific nature more obvious, and to a more appropriate place. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index f8081c996193..80378c74fcd6 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -24,6 +24,8 @@ #include "vc4_drv.h" #include "vc4_regs.h" +#define HVS_NUM_CHANNELS 3 + struct vc4_ctm_state { struct drm_private_state base; struct drm_color_ctm *ctm; @@ -609,12 +611,11 @@ static const struct drm_private_state_funcs vc4_load_tracker_state_funcs = { .atomic_destroy_state = vc4_load_tracker_destroy_state, }; -#define NUM_CHANNELS 3 static int vc4_atomic_check(struct drm_device *dev, struct drm_atomic_state *state) { - unsigned long unassigned_channels = GENMASK(NUM_CHANNELS - 1, 0); + unsigned long unassigned_channels = GENMASK(HVS_NUM_CHANNELS - 1, 0); struct drm_crtc_state *old_crtc_state, *new_crtc_state; struct drm_crtc *crtc; int i, ret;