Received: by 10.223.176.46 with SMTP id f43csp1166561wra; Fri, 26 Jan 2018 13:03:25 -0800 (PST) X-Google-Smtp-Source: AH8x227J7zJNBhXgl+/ooluPszTPBMGCn/eJb/YvANF2t+Giu7MKYPgtGJm3yQ0cGay8CLjXCgpp X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr14915201plt.368.1517000605520; Fri, 26 Jan 2018 13:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517000605; cv=none; d=google.com; s=arc-20160816; b=pPgaFl85IDElIoy5JYO2cmRxbHnv3PFGlq61icgXcZoyM2XVGiKvrvYUBd5iweFjDk LMl8lfYVu6g5DW3NR/ZxraehuTW2atTZQ9jnrtE8zK/C9NGNkB/B+UhAH7HMc1Gfala1 MzSid1XcT8asSCI0d55ThO/OT+SBvvkF4Zp8rQ3x25vCcI1/HoCetWQhx7PvAnUMDo5h pAsFmLkwyoY2o6tG6QrLPSHFHmqHPVrBIYxM5VAX7bPONT7dS3+LVnaEBfM5k8/34UWv k6zhrTVKbkXh+oZqlfxmRy+iz7XQDhDHDVbm5ih1q0C3CJDOi1En8tGL8RWT1HHFINzp NIzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=2xRK2DySOt0mMFrz9M1mMn31Mmzo5p+4koe6JWglqT4=; b=sUg6ejYRFwIq5ui7B9MCNuHUDYo9gyA+KQ2wgiDoVSDCYo8omE35LrufsKy42vcJSY tDfe3zbHF881b0CLvAHsJjZQyHpACy1y8UBCbTBZs6KcAk9LYWNe4y68CXGBhQZ78eYV Gv0ZUqFsHTyDTpMtIv9jbTSlAGcis/hSuIzkl8+QGivV/jK6FCmvZruJL2kb8T7NcUpt 9Qkt/2Qtcc7dSSpRwtEq7Uhc6K3zx0NK2wQ5K71PvE9PBtETE3fd/AgpHtepe26u3sEb 2eknyBoc7raxFmQ2rDeg9YWXpoq5Rny8KPCRGbrdBQJ0XUPvOJjoD9cqp73QBZSin578 V4KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v8-v6si4213395plg.673.2018.01.26.13.03.11; Fri, 26 Jan 2018 13:03:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752394AbeAZVBs (ORCPT + 99 others); Fri, 26 Jan 2018 16:01:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42294 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751919AbeAZVBq (ORCPT ); Fri, 26 Jan 2018 16:01:46 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9AFAA6DDC7; Fri, 26 Jan 2018 21:01:46 +0000 (UTC) Received: from whitewolf.lyude.net.com (ovpn-123-233.rdu2.redhat.com [10.10.123.233]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE777608F6; Fri, 26 Jan 2018 21:01:45 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org Cc: Ben Skeggs , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC v3 4/4] drm/nouveau: Add support for SLCG for Kepler2 Date: Fri, 26 Jan 2018 15:59:16 -0500 Message-Id: <20180126210013.29190-5-lyude@redhat.com> In-Reply-To: <20180126210013.29190-1-lyude@redhat.com> References: <20180126210013.29190-1-lyude@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 26 Jan 2018 21:01:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org That's right, there's still more power saving to go! Starting with kepler 2, nvidia hardware has an additional level of clockgating known as second level clockgating. The details of this are not exact, but it seems to work by waiting for a collection of dependent hardware blocks to be gated before taking affect. As with the previous series, this results in another noticeable drop in power consumption and is programmed in the same manner. Signed-off-by: Lyude Paul --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 93 ++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c index a528894231d0..4da916a9fc73 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c @@ -187,6 +187,87 @@ gk110_clkgate_blcg_init_gpc_mp_0[] = { {} }; +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_main_0[] = { + { 0x4041f4, 1, 0x00000000 }, + { 0x409894, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_unk_0[] = { + { 0x406004, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_sked_0[] = { + { 0x407004, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_ctxctl_0[] = { + { 0x41a894, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_unk_0[] = { + { 0x418504, 1, 0x00000000 }, + { 0x41860c, 1, 0x00000000 }, + { 0x41868c, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_esetup_0[] = { + { 0x41882c, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_zcull_0[] = { + { 0x418974, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_l1c_0[] = { + { 0x419cd8, 2, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_unk_1[] = { + { 0x419c74, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_mp_0[] = { + { 0x419fd4, 1, 0x00004a4a }, + { 0x419fdc, 1, 0x00000014 }, + { 0x419fe4, 1, 0x00000000 }, + { 0x419ff4, 1, 0x00001724 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_gpc_ppc_0[] = { + { 0x41be2c, 1, 0x00000000 }, + {} +}; + +static const struct nvkm_therm_clkgate_init +gk110_clkgate_slcg_init_pcounter_0[] = { + { 0x1be018, 1, 0x000001ff }, + { 0x1bc018, 1, 0x000001ff }, + { 0x1b8018, 1, 0x000001ff }, + { 0x1b4124, 1, 0x00000000 }, + {} +}; + static const struct nvkm_therm_clkgate_pack gk110_clkgate_pack[] = { { gk104_clkgate_blcg_init_main_0 }, @@ -214,6 +295,18 @@ gk110_clkgate_pack[] = { { gk104_clkgate_blcg_init_rop_0 }, { gk104_clkgate_blcg_init_rop_crop_0 }, { gk104_clkgate_blcg_init_pxbar_0 }, + { gk110_clkgate_slcg_init_main_0 }, + { gk110_clkgate_slcg_init_unk_0 }, + { gk110_clkgate_slcg_init_sked_0 }, + { gk110_clkgate_slcg_init_gpc_ctxctl_0 }, + { gk110_clkgate_slcg_init_gpc_unk_0 }, + { gk110_clkgate_slcg_init_gpc_esetup_0 }, + { gk110_clkgate_slcg_init_gpc_zcull_0 }, + { gk110_clkgate_slcg_init_gpc_l1c_0 }, + { gk110_clkgate_slcg_init_gpc_unk_1 }, + { gk110_clkgate_slcg_init_gpc_mp_0 }, + { gk110_clkgate_slcg_init_gpc_ppc_0 }, + { gk110_clkgate_slcg_init_pcounter_0 }, {} }; -- 2.14.3