From patchwork Sat Jun 7 19:48:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilia Mirkin X-Patchwork-Id: 4315951 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 881FDBEEAA for ; Sat, 7 Jun 2014 19:48:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AF5B8201F7 for ; Sat, 7 Jun 2014 19:48:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id CC674201F4 for ; Sat, 7 Jun 2014 19:48:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E74E76E4FB; Sat, 7 Jun 2014 12:48:24 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qg0-f54.google.com (mail-qg0-f54.google.com [209.85.192.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C6726E4F7; Sat, 7 Jun 2014 12:48:23 -0700 (PDT) Received: by mail-qg0-f54.google.com with SMTP id q108so7124767qgd.13 for ; Sat, 07 Jun 2014 12:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=P2+sKCD69KV49Nk8vcEa0E/oSbu9Prbhuot19fXtg7M=; b=eUkqDc84QseVhBcFzPt0Nl1ynYjN/tfC4+qC4sOc4r//L2e9jNXFWazK/X4J5KwmXW O/kJZDgM9Y2qTm3jt6Z/a5bPYgGmBc/2vyVJZ7byjsx/Rbmch3D11/ozvjAJKt8/ctW8 jL0A+mBH+3BWmbmCW81GeDPruxnRbu6x5Qtf9nn882+oqg3vudZGbMuZ6L1lOUXHOrRU tK1vbgGhD3H05qwQvwqpTgKkCx8uCoRLRHgyaYz8iss4aCz/1RzzZdZQDtP2/U0CK2pV e2UKCgi+U/cJrkSCmMn1HIbgcK/554RyC39xHiiQsQ5Vto9dSDVUmmQK46uz6ZJHiM2n l8zA== X-Received: by 10.224.114.194 with SMTP id f2mr20467712qaq.51.1402170502801; Sat, 07 Jun 2014 12:48:22 -0700 (PDT) Received: from localhost.localdomain (cpe-74-71-2-122.nyc.res.rr.com. [74.71.2.122]) by mx.google.com with ESMTPSA id j97sm8322073qgd.37.2014.06.07.12.48.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jun 2014 12:48:22 -0700 (PDT) From: Ilia Mirkin To: Ben Skeggs , nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH] drm/gk208/gr: adjust a couple of init values Date: Sat, 7 Jun 2014 15:48:17 -0400 Message-Id: <1402170497-32354-1-git-send-email-imirkin@alum.mit.edu> X-Mailer: git-send-email 1.8.5.5 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Ilia Mirkin --- MMIO32 R 0x17e91c 0x0b040a0b PMFB_BROADCAST.SUBP_BROADCAST.UNK11C => 0xb040a0b MMIO32 R 0x17e920 0x00090c03 PMFB_BROADCAST.SUBP_BROADCAST.UNK120 => 0x90c03 MMIO32 W 0x17e91c 0x0b030a0c PMFB_BROADCAST.SUBP_BROADCAST.UNK11C <= 0xb030a0c MMIO32 W 0x17e920 0x00090d08 PMFB_BROADCAST.SUBP_BROADCAST.UNK120 <= 0x90d08 And then later when it writes these values into memory, MMIO32 R 0x17e91c 0x0b030a0c PMFB_BROADCAST.SUBP_BROADCAST.UNK11C => 0xb030a0c MMIO32 R 0x17e920 0x00090d08 PMFB_BROADCAST.SUBP_BROADCAST.UNK120 => 0x90d08 RAMIN32 1b5080 7fce1080 <= 17e91c RAMIN32 1b5084 7fce1084 <= b030a0c MMIO32 W 0x070000 0x00000001 PFIFO_FLUSH.FLUSH_CTRL <= { TRIGGER } MMIO32 R 0x070000 0x00000000 PFIFO_FLUSH.FLUSH_CTRL => { 0 } RAMIN32 1b5088 7fce1088 <= 17e920 RAMIN32 1b508c 7fce108c <= 90d08 So perhaps the mmio_list needs to grow a mask option (and have it store the mask)? Not sure what any of this means, and doing this didn't fix anything. So... this is more informational than to be applied necessarily. Although the values that 337.25 writes on the GK208 I was testing on (GT630, 10de:1284) were different than what you were writing in (at least for the first reg). drivers/gpu/drm/nouveau/core/engine/graph/ctxnv108.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv108.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv108.c index 8de4a42..b0bc5db 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv108.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnv108.c @@ -537,6 +537,7 @@ nv108_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) u32 magic[GPC_MAX][2]; u32 offset; int gpc; + u32 r17e91c, r17e920; mmio_data(0x003000, 0x0100, NV_MEM_ACCESS_RW | NV_MEM_ACCESS_SYS); mmio_data(0x008000, 0x0100, NV_MEM_ACCESS_RW | NV_MEM_ACCESS_SYS); @@ -571,8 +572,10 @@ nv108_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) offset += 0x07ff * priv->tpc_nr[gpc]; } - mmio_list(0x17e91c, 0x0b040a0b, 0, 0); - mmio_list(0x17e920, 0x00090d08, 0, 0); + r17e91c = nv_rd32(priv, 0x17e91c); + r17e920 = nv_rd32(priv, 0x17e920); + mmio_list(0x17e91c, (r17e91c & ~0x000f000f) | 0x0003000c, 0, 0); + mmio_list(0x17e920, (r17e920 & ~0x00000f0f) | 0x00000d08, 0, 0); } struct nouveau_oclass *