From patchwork Mon Nov 7 19:49:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Bragg X-Patchwork-Id: 9415939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 556B660512 for ; Mon, 7 Nov 2016 19:50:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45F4328AF5 for ; Mon, 7 Nov 2016 19:50:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AFC828D42; Mon, 7 Nov 2016 19:50:09 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E69D928AF5 for ; Mon, 7 Nov 2016 19:50:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 00E776E2AB; Mon, 7 Nov 2016 19:50:05 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A80A6E207; Mon, 7 Nov 2016 19:50:03 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id c17so18254529wmc.3; Mon, 07 Nov 2016 11:50:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=BAR5K627NYBOV61eEAnr9bXWFbLL4ENSKw0jxIG0RvI=; b=yvaLcuWMOMhMoRXa9gWvD/v5gtWiPQX4p+3FlC0H6rPzMeT7VU96lNgAl0NskmtS+5 lKM3WuB1e7yLNKwfDsfScJTT4jn+FRhqUPcZ6PFuqALiFqDXvl7OxKs6e0zzQX8QE9Oi /wmnjr1WYxKPHXazsJb9YVXlgL0JApk1mXEf7kmOMj3wX9DBXQOZ1YLOrruFQJbXfRWl i6J82saIkmLM/XtPpKegH1rgwkD6mLT7zzn2Wvp+DQyL7Crsxc511tkyIX8xtqVbHULk YU23z0C6hHnDObspuYCTjlsQHnzGFYHBLlB6QMZEnzHh/Oajl1sKJPW8qix8sMXj562r tcYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=BAR5K627NYBOV61eEAnr9bXWFbLL4ENSKw0jxIG0RvI=; b=mAgEb3AYubsXdHKu2t+Y8etRloxxJonI9j1VQTm2I2VeJEqXOdn8YtTtXixdnvesXa Uk74CcxMFOuYECI/WmUXyprIAH1eL2+ablHwCFjdu4MNvLc44vEtd9VDoD40lDQDhWzK v4hwpnH0D0zD2JSZPbgQYycZeNvMyjagf040jVUkLBjkCOJu6/v4SiepIqvOHoDwaCxY 5qqGAVyvbokO23Ho8fXbYBGYdgaQx2pesWEHkGzuCBm8ko/VQeCoRivnoAZ2jq/Kqrkj IE3VpR6m3KPl3eP/3AQ/U0YGwPkryEOrDEnWOYd57j7Fb/VJxK7QCZNf8wYUwthfs776 RxQw== X-Gm-Message-State: ABUngvd/2v2x+pIPK+g7UGN0Hf1DwJEU/1yDXaoBqQ1he7n61zb2sJVjJXM/CxWR3npD0Q== X-Received: by 10.28.69.91 with SMTP id s88mr11430398wma.18.1478548201970; Mon, 07 Nov 2016 11:50:01 -0800 (PST) Received: from sixbynine.org (cpc26-heme10-2-0-cust305.9-1.cable.virginm.net. [86.3.57.50]) by smtp.gmail.com with ESMTPSA id c4sm15330869wmh.4.2016.11.07.11.50.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Nov 2016 11:50:01 -0800 (PST) From: Robert Bragg To: intel-gfx@lists.freedesktop.org Date: Mon, 7 Nov 2016 19:49:48 +0000 Message-Id: <20161107194957.3385-3-robert@sixbynine.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161107194957.3385-1-robert@sixbynine.org> References: <20161107194957.3385-1-robert@sixbynine.org> Cc: David Airlie , dri-devel@lists.freedesktop.org, Sourab Gupta , Daniel Vetter Subject: [Intel-gfx] [PATCH v9 02/11] drm/i915: rename OACONTROL GEN7_OACONTROL X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP OACONTROL changes quite a bit for gen8, with some bits split out into a per-context OACTXCONTROL register. Rename now before adding more gen7 OA registers Signed-off-by: Robert Bragg Reviewed-by: Matthew Auld Reviewed-by: Sourab Gupta --- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 ++-- drivers/gpu/drm/i915/i915_reg.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index 9ab1f95..4527cb7 100644 --- a/drivers/gpu/drm/i915/gvt/handlers.c +++ b/drivers/gpu/drm/i915/gvt/handlers.c @@ -2177,7 +2177,7 @@ static int init_generic_mmio_info(struct intel_gvt *gvt) MMIO_DFH(0x1217c, D_ALL, F_CMD_ACCESS, NULL, NULL); MMIO_F(0x2290, 8, 0, 0, 0, D_HSW_PLUS, NULL, NULL); - MMIO_D(OACONTROL, D_HSW); + MMIO_D(GEN7_OACONTROL, D_HSW); MMIO_D(0x2b00, D_BDW_PLUS); MMIO_D(0x2360, D_BDW_PLUS); MMIO_F(0x5200, 32, 0, 0, 0, D_ALL, NULL, NULL); diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c index f5039f4..7719aed 100644 --- a/drivers/gpu/drm/i915/i915_cmd_parser.c +++ b/drivers/gpu/drm/i915/i915_cmd_parser.c @@ -450,7 +450,7 @@ static const struct drm_i915_reg_descriptor gen7_render_regs[] = { REG64(PS_INVOCATION_COUNT), REG64(PS_DEPTH_COUNT), REG64_IDX(RING_TIMESTAMP, RENDER_RING_BASE), - REG32(OACONTROL), /* Only allowed for LRI and SRM. See below. */ + REG32(GEN7_OACONTROL), /* Only allowed for LRI and SRM. See below. */ REG64(MI_PREDICATE_SRC0), REG64(MI_PREDICATE_SRC1), REG32(GEN7_3DPRIM_END_OFFSET), @@ -1108,7 +1108,7 @@ static bool check_cmd(const struct intel_engine_cs *engine, * to the register. Hence, limit OACONTROL writes to * only MI_LOAD_REGISTER_IMM commands. */ - if (reg_addr == i915_mmio_reg_offset(OACONTROL)) { + if (reg_addr == i915_mmio_reg_offset(GEN7_OACONTROL)) { if (desc->cmd.value == MI_LOAD_REGISTER_MEM) { DRM_DEBUG_DRIVER("CMD: Rejected LRM to OACONTROL\n"); return false; diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 3361d7f..4623dbb 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -615,7 +615,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg) #define HSW_CS_GPR(n) _MMIO(0x2600 + (n) * 8) #define HSW_CS_GPR_UDW(n) _MMIO(0x2600 + (n) * 8 + 4) -#define OACONTROL _MMIO(0x2360) +#define GEN7_OACONTROL _MMIO(0x2360) #define _GEN7_PIPEA_DE_LOAD_SL 0x70068 #define _GEN7_PIPEB_DE_LOAD_SL 0x71068