Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1049034ybm; Wed, 27 May 2020 14:54:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxOBEAai3n7kj2BzwSDi/Ih0w/WJAyLfuTww24BafGiiOowP3U3o0zKls5vHKW8D/lZlPUu X-Received: by 2002:a05:6402:308f:: with SMTP id de15mr212727edb.108.1590616458275; Wed, 27 May 2020 14:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590616458; cv=none; d=google.com; s=arc-20160816; b=gK1DGLY5x04wnkvrDaFvRYWjcf/BWN6fW4MfpJCQBydYDKUWytARqpSimoRQphb68j puKrxrCZmsIdLazJpQnBKagxp1a84+DboUIO+TxUd0AOI/8qqXcqlVKfhB+QowG0QDm+ e0jrDh0QscXsDXpOp+KbyaYvt19BtyBmYSm5m6apWququeWd80OL8TG/BS8N0Xq7cOAS 6wX5Ha3FytMhSL2wKu+oW9lpqlkoG6QyzlShNBQOLKX3ifIRol0c2FcFv27sG8HkF/Vf XPgLyHYOaUyfsI4I8/+LUwzpMYBMWFNhxfzBHeYaxucho/2Ynb8McXwQ2V3m20aXkZiM 0QfA== 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 :dkim-signature:dkim-signature; bh=TRM6X4G5yvAqt+dJj7RIy+HHWn9k6iwxRb21u0ULa7A=; b=cNIOJMc+y/hbNgCgzFf4VmP+mhSJdPL7tq6Db+TihMqM71yytBTbGgN1jW641dhyMu AIzq6OgDeTUpao85CgvUSJq5UNiWJEMkCWcDcj8tGdWYASgMVZwfbyhySrBacWiBMyVF oQk58XvFqiAavr59bDrMn3vgw7PqTA4n8403AiJfmuAGtm2O49BltnCSKHNcXRY9URwd 2mMzIWzOqwrIu7IQoBQO0k9wMHp8yI0C74OZMwpI4IrCqgmsRS0l0I9idUwvV/UjlpVR hPQ/14ctE5c/vulJzVZR2MifCFD5wzFY7tQEAHDDimtVKFKoK9aAxzjXEl5xrt8MTUWz XtpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=vLOvYNlq; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=yQipRvmp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l12si2613008ejr.486.2020.05.27.14.53.55; Wed, 27 May 2020 14:54:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cerno.tech header.s=fm2 header.b=vLOvYNlq; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=yQipRvmp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cerno.tech Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730847AbgE0P4m (ORCPT + 98 others); Wed, 27 May 2020 11:56:42 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:51869 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728984AbgE0Ptz (ORCPT ); Wed, 27 May 2020 11:49:55 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 5E5CC58203B; Wed, 27 May 2020 11:49:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 27 May 2020 11:49:54 -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=fm2; bh=TRM6X4G5yvAqt +dJj7RIy+HHWn9k6iwxRb21u0ULa7A=; b=vLOvYNlqIOnZzt3gzwvw+h/q7oSO7 N3b6FCRPQNWBBWfzFjaqSlmZmA8f2rS3WNN0jNpDyCkxT960aAv//iQbZc6Y1nfn 4IFgHMrdj2Ji1XU3PKqOWm4JtkUQPXlVTAYE1sFbV3/f543anCjaJxD89EG9jmDD GLsAMKSo5WPtGBxLnOTSIxeRRysNUBMUSYtpkTjAaqZZkMNclnmrLQdgIxx4KRBK Av7MFsACa4/gNwyS1GbZvCsi7cMxfDD1/3b75vHzpZ9isEFSQH+HqaoAkB/OOT8X UW2hxaJFzl1WHBMsWdhRCh7Eis7F/2WEBd8uJzUADT782SJHCt+qccHYQ== 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= fm2; bh=TRM6X4G5yvAqt+dJj7RIy+HHWn9k6iwxRb21u0ULa7A=; b=yQipRvmp FTGI469+E50yNwt8QK0Oq7C4vx/y+b669MY0NfBurwZLQfqSTVKc/P9oyBmc+cO0 w1SOs2Q0z0ZFYfmz/86TZISsYT28aJu/j52vikxcQJs+SIwSiJQKxYFims8pEOO2 t2LvVlanUineDOL8pDru4sq+rkDUTH2kZBd677YpebWHhDF/AVBQ09kI6rnWtQ/G jKzX1WUmqEJTowy/d2ILpmOF8qxN5drGMVXvseOmVvkcuiOCBhX4651C5AsvHzQd JwXJal8s+ltidOTkp9//HuSvYbzevvEtQyctgYqKUIMqARGsWiMsGZuOgUteZWlM 4UtdF9QCIOHbbw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddvgedgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepvdekleevfeffkeejhfffueelteelfeduieefheduudfggffhhfffheevveeh hedvnecukfhppeeltddrkeelrdeikedrjeeinecuvehluhhsthgvrhfuihiivgepfeenuc frrghrrghmpehmrghilhhfrhhomhepmhgrgihimhgvsegtvghrnhhordhtvggthh 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 F287F328005A; Wed, 27 May 2020 11:49:53 -0400 (EDT) From: Maxime Ripard To: Nicolas Saenz Julienne , Eric Anholt Cc: dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Stevenson , Tim Gover , Phil Elwell , Maxime Ripard Subject: [PATCH v3 024/105] drm/vc4: crtc: Move crtc state to common header Date: Wed, 27 May 2020 17:47:54 +0200 Message-Id: <1e6e563f9c75961e2885c9d648a3130d3b46b6d1.1590594512.git-series.maxime@cerno.tech> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: 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 We'll need to access the crtc_state from outside of vc4_crtc.c, so let's move it to vc4_drv.h Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 21 --------------------- drivers/gpu/drm/vc4/vc4_drv.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_crtc.c index b668bb8d060c..db056dfe14df 100644 --- a/drivers/gpu/drm/vc4/vc4_crtc.c +++ b/drivers/gpu/drm/vc4/vc4_crtc.c @@ -44,27 +44,6 @@ #include "vc4_drv.h" #include "vc4_regs.h" -struct vc4_crtc_state { - struct drm_crtc_state base; - /* Dlist area for this CRTC configuration. */ - struct drm_mm_node mm; - bool feed_txp; - bool txp_armed; - - struct { - unsigned int left; - unsigned int right; - unsigned int top; - unsigned int bottom; - } margins; -}; - -static inline struct vc4_crtc_state * -to_vc4_crtc_state(struct drm_crtc_state *crtc_state) -{ - return (struct vc4_crtc_state *)crtc_state; -} - #define CRTC_WRITE(offset, val) writel(val, vc4_crtc->regs + (offset)) #define CRTC_READ(offset) readl(vc4_crtc->regs + (offset)) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index 80633c488b04..329185a53a79 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.h +++ b/drivers/gpu/drm/vc4/vc4_drv.h @@ -486,6 +486,27 @@ to_vc4_crtc(struct drm_crtc *crtc) return (struct vc4_crtc *)crtc; } +struct vc4_crtc_state { + struct drm_crtc_state base; + /* Dlist area for this CRTC configuration. */ + struct drm_mm_node mm; + bool feed_txp; + bool txp_armed; + + struct { + unsigned int left; + unsigned int right; + unsigned int top; + unsigned int bottom; + } margins; +}; + +static inline struct vc4_crtc_state * +to_vc4_crtc_state(struct drm_crtc_state *crtc_state) +{ + return (struct vc4_crtc_state *)crtc_state; +} + #define V3D_READ(offset) readl(vc4->v3d->regs + offset) #define V3D_WRITE(offset, val) writel(val, vc4->v3d->regs + offset) #define HVS_READ(offset) readl(vc4->hvs->regs + offset) -- git-series 0.9.1