From: Lyude Paul <lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: Kate Stewart
<kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
David Airlie <airlied-cv59FeDIM0c@public.gmane.org>,
nouveau
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
dri-devel
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Alexandre Courbot
<acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Subject: Re: [RFC v2 3/4] drm/nouveau: Add support for BLCG on Kepler2
Date: Fri, 26 Jan 2018 13:11:00 -0500 [thread overview]
Message-ID: <1516990260.5161.8.camel@redhat.com> (raw)
In-Reply-To: <CAKb7Uvg_Tf-uKej0hK5eigdpOtY-uY6dGK8KbX8+7b+dYfXOtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Fri, 2018-01-26 at 02:53 -0500, Ilia Mirkin wrote:
> On Thu, Jan 25, 2018 at 10:35 PM, Lyude Paul <lyude@redhat.com> wrote:
> > Same as the previous patch, but for Kepler2 now
> >
> > Signed-off-by: Lyude Paul <lyude@redhat.com>
> > ---
> > drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 +
> > drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 8 +--
> > drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 62 ++++++++++++++++++++
> > drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 +
> > drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c | 71
> > +++++++++++++++++++++++
> > 5 files changed, 139 insertions(+), 4 deletions(-)
> > create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> >
> > diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > index adb78f7d083a..92be0e5269c6 100644
> > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > @@ -75,6 +75,7 @@ int mcp89_fb_new(struct nvkm_device *, int, struct nvkm_fb
> > **);
> > int gf100_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gf108_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gk104_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > +int gk110_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gk20a_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gm107_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gm200_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > index 74bd09b1c893..7590a30b7ff0 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > @@ -1812,7 +1812,7 @@ nvf0_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > @@ -1850,7 +1850,7 @@ nvf1_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > @@ -1888,7 +1888,7 @@ nv106_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > @@ -1926,7 +1926,7 @@ nv108_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > index a38e19b61c1d..38d3328e45f1 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > @@ -22,6 +22,7 @@
> > * Authors: Ben Skeggs <bskeggs@redhat.com>
> > */
> > #include "gf100.h"
> > +#include "gk104.h"
> > #include "ctxgf100.h"
> >
> > #include <subdev/timer.h>
> > @@ -156,6 +157,66 @@ gk110_gr_pack_mmio[] = {
> > {}
> > };
> >
> > +const struct nvkm_therm_clkgate_init
>
> These should all be static, no?
True, will send out a V3 in a moment
>
> > +gk110_clkgate_blcg_init_sked_0[] = {
> > + { 0x407000, 1, 0x00004041 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_clkgate_blcg_init_gpc_gcc_0[] = {
> > + { 0x419020, 1, 0x00000042 },
> > + { 0x419038, 1, 0x00000042 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_clkgate_blcg_init_gpc_l1c_0[] = {
> > + { 0x419cd4, 2, 0x00004042 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_clkgate_blcg_init_gpc_mp_0[] = {
> > + { 0x419fd0, 1, 0x00004043 },
> > + { 0x419fd8, 1, 0x00004049 },
> > + { 0x419fe0, 2, 0x00004042 },
> > + { 0x419ff0, 1, 0x00000046 },
> > + { 0x419ff8, 1, 0x00004042 },
> > + { 0x419f90, 1, 0x00004042 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_pack
> > +gk110_clkgate_pack[] = {
> > + { gk104_clkgate_blcg_init_main_0 },
> > + { gk104_clkgate_blcg_init_rstr2d_0 },
> > + { gk104_clkgate_blcg_init_unk_0 },
> > + { gk104_clkgate_blcg_init_gcc_0 },
> > + { gk110_clkgate_blcg_init_sked_0 },
> > + { gk104_clkgate_blcg_init_unk_1 },
> > + { gk104_clkgate_blcg_init_gpc_ctxctl_0 },
> > + { gk104_clkgate_blcg_init_gpc_unk_0 },
> > + { gk104_clkgate_blcg_init_gpc_esetup_0 },
> > + { gk104_clkgate_blcg_init_gpc_tpbus_0 },
> > + { gk104_clkgate_blcg_init_gpc_zcull_0 },
> > + { gk104_clkgate_blcg_init_gpc_tpconf_0 },
> > + { gk104_clkgate_blcg_init_gpc_unk_1 },
> > + { gk110_clkgate_blcg_init_gpc_gcc_0 },
> > + { gk104_clkgate_blcg_init_gpc_ffb_0 },
> > + { gk104_clkgate_blcg_init_gpc_tex_0 },
> > + { gk104_clkgate_blcg_init_gpc_poly_0 },
> > + { gk110_clkgate_blcg_init_gpc_l1c_0 },
> > + { gk104_clkgate_blcg_init_gpc_unk_2 },
> > + { gk110_clkgate_blcg_init_gpc_mp_0 },
> > + { gk104_clkgate_blcg_init_gpc_ppc_0 },
> > + { gk104_clkgate_blcg_init_rop_zrop_0 },
> > + { gk104_clkgate_blcg_init_rop_0 },
> > + { gk104_clkgate_blcg_init_rop_crop_0 },
> > + { gk104_clkgate_blcg_init_pxbar_0 },
> > + {}
> > +};
> > +
> > /**************************************************************************
> > *****
> > * PGRAPH engine/subdev functions
> >
> > ****************************************************************************
> > **/
> > @@ -192,6 +253,7 @@ gk110_gr = {
> > .rops = gf100_gr_rops,
> > .ppc_nr = 2,
> > .grctx = &gk110_grctx,
> > + .clkgate_pack = gk110_clkgate_pack,
> > .sclass = {
> > { -1, -1, FERMI_TWOD_A },
> > { -1, -1, KEPLER_INLINE_TO_MEMORY_B },
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > index 2571530e82f1..b4f22cce5d43 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > @@ -22,6 +22,7 @@ nvkm-y += nvkm/subdev/fb/mcp89.o
> > nvkm-y += nvkm/subdev/fb/gf100.o
> > nvkm-y += nvkm/subdev/fb/gf108.o
> > nvkm-y += nvkm/subdev/fb/gk104.o
> > +nvkm-y += nvkm/subdev/fb/gk110.o
> > nvkm-y += nvkm/subdev/fb/gk20a.o
> > nvkm-y += nvkm/subdev/fb/gm107.o
> > nvkm-y += nvkm/subdev/fb/gm200.o
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> > b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> > new file mode 100644
> > index 000000000000..5c8feef151a4
> > --- /dev/null
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> > @@ -0,0 +1,71 @@
> > +/*
> > + * Copyright 2017 Red Hat Inc.
> > + *
> > + * Permission is hereby granted, free of charge, to any person obtaining a
> > + * copy of this software and associated documentation files (the
> > "Software"),
> > + * to deal in the Software without restriction, including without
> > limitation
> > + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > + * and/or sell copies of the Software, and to permit persons to whom the
> > + * Software is furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice shall be included
> > in
> > + * all copies or substantial portions of the Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > + * OTHER DEALINGS IN THE SOFTWARE.
> > + *
> > + * Authors: Lyude Paul
> > + */
> > +#include "gf100.h"
> > +#include "gk104.h"
> > +#include "ram.h"
> > +#include <subdev/therm.h>
> > +#include <subdev/fb.h>
> > +
> > +/*
> > +
> > ****************************************************************************
> > ***
> > + * PGRAPH registers for clockgating
> > +
> > ****************************************************************************
> > ***
> > + */
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_fb_clkgate_blcg_init_unk_0[] = {
> > + { 0x100d10, 1, 0x0000c242 },
> > + { 0x100d30, 1, 0x0000c242 },
> > + { 0x100d3c, 1, 0x00000242 },
> > + { 0x100d48, 1, 0x0000c242 },
> > + { 0x100d1c, 1, 0x00000042 },
> > + {}
> > +};
> > +
> > +static const struct nvkm_therm_clkgate_pack
> > +gk110_fb_clkgate_pack[] = {
> > + { gk110_fb_clkgate_blcg_init_unk_0 },
> > + { gk104_fb_clkgate_blcg_init_vm_0 },
> > + { gk104_fb_clkgate_blcg_init_main_0 },
> > + { gk104_fb_clkgate_blcg_init_bcast_0 },
> > + {}
> > +};
> > +
> > +static const struct nvkm_fb_func
> > +gk110_fb = {
> > + .dtor = gf100_fb_dtor,
> > + .oneinit = gf100_fb_oneinit,
> > + .init = gf100_fb_init,
> > + .init_page = gf100_fb_init_page,
> > + .intr = gf100_fb_intr,
> > + .ram_new = gk104_ram_new,
> > + .default_bigpage = 17,
> > + .clkgate_pack = gk110_fb_clkgate_pack,
> > +};
> > +
> > +int
> > +gk110_fb_new(struct nvkm_device *device, int index, struct nvkm_fb **pfb)
> > +{
> > + return gf100_fb_new_(&gk110_fb, device, index, pfb);
> > +}
> > --
> > 2.14.3
> >
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
WARNING: multiple messages have this Message-ID (diff)
From: Lyude Paul <lyude@redhat.com>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: nouveau <nouveau@lists.freedesktop.org>,
Ben Skeggs <bskeggs@redhat.com>, David Airlie <airlied@linux.ie>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Kate Stewart <kstewart@linuxfoundation.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Karol Herbst <karolherbst@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC v2 3/4] drm/nouveau: Add support for BLCG on Kepler2
Date: Fri, 26 Jan 2018 13:11:00 -0500 [thread overview]
Message-ID: <1516990260.5161.8.camel@redhat.com> (raw)
In-Reply-To: <CAKb7Uvg_Tf-uKej0hK5eigdpOtY-uY6dGK8KbX8+7b+dYfXOtA@mail.gmail.com>
On Fri, 2018-01-26 at 02:53 -0500, Ilia Mirkin wrote:
> On Thu, Jan 25, 2018 at 10:35 PM, Lyude Paul <lyude@redhat.com> wrote:
> > Same as the previous patch, but for Kepler2 now
> >
> > Signed-off-by: Lyude Paul <lyude@redhat.com>
> > ---
> > drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 +
> > drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 8 +--
> > drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 62 ++++++++++++++++++++
> > drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 +
> > drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c | 71
> > +++++++++++++++++++++++
> > 5 files changed, 139 insertions(+), 4 deletions(-)
> > create mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> >
> > diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > index adb78f7d083a..92be0e5269c6 100644
> > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
> > @@ -75,6 +75,7 @@ int mcp89_fb_new(struct nvkm_device *, int, struct nvkm_fb
> > **);
> > int gf100_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gf108_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gk104_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > +int gk110_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gk20a_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gm107_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > int gm200_fb_new(struct nvkm_device *, int, struct nvkm_fb **);
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > index 74bd09b1c893..7590a30b7ff0 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
> > @@ -1812,7 +1812,7 @@ nvf0_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > @@ -1850,7 +1850,7 @@ nvf1_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > @@ -1888,7 +1888,7 @@ nv106_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > @@ -1926,7 +1926,7 @@ nv108_chipset = {
> > .bus = gf100_bus_new,
> > .clk = gk104_clk_new,
> > .devinit = gf100_devinit_new,
> > - .fb = gk104_fb_new,
> > + .fb = gk110_fb_new,
> > .fuse = gf100_fuse_new,
> > .gpio = gk104_gpio_new,
> > .i2c = gk104_i2c_new,
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > index a38e19b61c1d..38d3328e45f1 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
> > @@ -22,6 +22,7 @@
> > * Authors: Ben Skeggs <bskeggs@redhat.com>
> > */
> > #include "gf100.h"
> > +#include "gk104.h"
> > #include "ctxgf100.h"
> >
> > #include <subdev/timer.h>
> > @@ -156,6 +157,66 @@ gk110_gr_pack_mmio[] = {
> > {}
> > };
> >
> > +const struct nvkm_therm_clkgate_init
>
> These should all be static, no?
True, will send out a V3 in a moment
>
> > +gk110_clkgate_blcg_init_sked_0[] = {
> > + { 0x407000, 1, 0x00004041 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_clkgate_blcg_init_gpc_gcc_0[] = {
> > + { 0x419020, 1, 0x00000042 },
> > + { 0x419038, 1, 0x00000042 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_clkgate_blcg_init_gpc_l1c_0[] = {
> > + { 0x419cd4, 2, 0x00004042 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_clkgate_blcg_init_gpc_mp_0[] = {
> > + { 0x419fd0, 1, 0x00004043 },
> > + { 0x419fd8, 1, 0x00004049 },
> > + { 0x419fe0, 2, 0x00004042 },
> > + { 0x419ff0, 1, 0x00000046 },
> > + { 0x419ff8, 1, 0x00004042 },
> > + { 0x419f90, 1, 0x00004042 },
> > + {}
> > +};
> > +
> > +const struct nvkm_therm_clkgate_pack
> > +gk110_clkgate_pack[] = {
> > + { gk104_clkgate_blcg_init_main_0 },
> > + { gk104_clkgate_blcg_init_rstr2d_0 },
> > + { gk104_clkgate_blcg_init_unk_0 },
> > + { gk104_clkgate_blcg_init_gcc_0 },
> > + { gk110_clkgate_blcg_init_sked_0 },
> > + { gk104_clkgate_blcg_init_unk_1 },
> > + { gk104_clkgate_blcg_init_gpc_ctxctl_0 },
> > + { gk104_clkgate_blcg_init_gpc_unk_0 },
> > + { gk104_clkgate_blcg_init_gpc_esetup_0 },
> > + { gk104_clkgate_blcg_init_gpc_tpbus_0 },
> > + { gk104_clkgate_blcg_init_gpc_zcull_0 },
> > + { gk104_clkgate_blcg_init_gpc_tpconf_0 },
> > + { gk104_clkgate_blcg_init_gpc_unk_1 },
> > + { gk110_clkgate_blcg_init_gpc_gcc_0 },
> > + { gk104_clkgate_blcg_init_gpc_ffb_0 },
> > + { gk104_clkgate_blcg_init_gpc_tex_0 },
> > + { gk104_clkgate_blcg_init_gpc_poly_0 },
> > + { gk110_clkgate_blcg_init_gpc_l1c_0 },
> > + { gk104_clkgate_blcg_init_gpc_unk_2 },
> > + { gk110_clkgate_blcg_init_gpc_mp_0 },
> > + { gk104_clkgate_blcg_init_gpc_ppc_0 },
> > + { gk104_clkgate_blcg_init_rop_zrop_0 },
> > + { gk104_clkgate_blcg_init_rop_0 },
> > + { gk104_clkgate_blcg_init_rop_crop_0 },
> > + { gk104_clkgate_blcg_init_pxbar_0 },
> > + {}
> > +};
> > +
> > /**************************************************************************
> > *****
> > * PGRAPH engine/subdev functions
> >
> > ****************************************************************************
> > **/
> > @@ -192,6 +253,7 @@ gk110_gr = {
> > .rops = gf100_gr_rops,
> > .ppc_nr = 2,
> > .grctx = &gk110_grctx,
> > + .clkgate_pack = gk110_clkgate_pack,
> > .sclass = {
> > { -1, -1, FERMI_TWOD_A },
> > { -1, -1, KEPLER_INLINE_TO_MEMORY_B },
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > index 2571530e82f1..b4f22cce5d43 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild
> > @@ -22,6 +22,7 @@ nvkm-y += nvkm/subdev/fb/mcp89.o
> > nvkm-y += nvkm/subdev/fb/gf100.o
> > nvkm-y += nvkm/subdev/fb/gf108.o
> > nvkm-y += nvkm/subdev/fb/gk104.o
> > +nvkm-y += nvkm/subdev/fb/gk110.o
> > nvkm-y += nvkm/subdev/fb/gk20a.o
> > nvkm-y += nvkm/subdev/fb/gm107.o
> > nvkm-y += nvkm/subdev/fb/gm200.o
> > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> > b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> > new file mode 100644
> > index 000000000000..5c8feef151a4
> > --- /dev/null
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk110.c
> > @@ -0,0 +1,71 @@
> > +/*
> > + * Copyright 2017 Red Hat Inc.
> > + *
> > + * Permission is hereby granted, free of charge, to any person obtaining a
> > + * copy of this software and associated documentation files (the
> > "Software"),
> > + * to deal in the Software without restriction, including without
> > limitation
> > + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > + * and/or sell copies of the Software, and to permit persons to whom the
> > + * Software is furnished to do so, subject to the following conditions:
> > + *
> > + * The above copyright notice and this permission notice shall be included
> > in
> > + * all copies or substantial portions of the Software.
> > + *
> > + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > OR
> > + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
> > + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > + * OTHER DEALINGS IN THE SOFTWARE.
> > + *
> > + * Authors: Lyude Paul
> > + */
> > +#include "gf100.h"
> > +#include "gk104.h"
> > +#include "ram.h"
> > +#include <subdev/therm.h>
> > +#include <subdev/fb.h>
> > +
> > +/*
> > +
> > ****************************************************************************
> > ***
> > + * PGRAPH registers for clockgating
> > +
> > ****************************************************************************
> > ***
> > + */
> > +
> > +const struct nvkm_therm_clkgate_init
> > +gk110_fb_clkgate_blcg_init_unk_0[] = {
> > + { 0x100d10, 1, 0x0000c242 },
> > + { 0x100d30, 1, 0x0000c242 },
> > + { 0x100d3c, 1, 0x00000242 },
> > + { 0x100d48, 1, 0x0000c242 },
> > + { 0x100d1c, 1, 0x00000042 },
> > + {}
> > +};
> > +
> > +static const struct nvkm_therm_clkgate_pack
> > +gk110_fb_clkgate_pack[] = {
> > + { gk110_fb_clkgate_blcg_init_unk_0 },
> > + { gk104_fb_clkgate_blcg_init_vm_0 },
> > + { gk104_fb_clkgate_blcg_init_main_0 },
> > + { gk104_fb_clkgate_blcg_init_bcast_0 },
> > + {}
> > +};
> > +
> > +static const struct nvkm_fb_func
> > +gk110_fb = {
> > + .dtor = gf100_fb_dtor,
> > + .oneinit = gf100_fb_oneinit,
> > + .init = gf100_fb_init,
> > + .init_page = gf100_fb_init_page,
> > + .intr = gf100_fb_intr,
> > + .ram_new = gk104_ram_new,
> > + .default_bigpage = 17,
> > + .clkgate_pack = gk110_fb_clkgate_pack,
> > +};
> > +
> > +int
> > +gk110_fb_new(struct nvkm_device *device, int index, struct nvkm_fb **pfb)
> > +{
> > + return gf100_fb_new_(&gk110_fb, device, index, pfb);
> > +}
> > --
> > 2.14.3
> >
next prev parent reply other threads:[~2018-01-26 18:11 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-26 3:35 [RFC v2 0/4] Implement full clockgating for Kepler1 and 2 Lyude Paul
2018-01-26 3:35 ` Lyude Paul
[not found] ` <20180126033607.7682-1-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-26 3:35 ` [RFC v2 1/4] drm/nouveau: Add support for basic clockgating on Kepler1 Lyude Paul
2018-01-26 3:35 ` Lyude Paul
2018-01-26 11:34 ` [Nouveau] " Karol Herbst
2018-01-26 11:34 ` Karol Herbst
2018-01-26 16:25 ` Lyude Paul
2018-01-26 3:35 ` [RFC v2 2/4] drm/nouveau: Add support for BLCG " Lyude Paul
2018-01-26 3:35 ` Lyude Paul
2018-01-26 3:35 ` [RFC v2 4/4] drm/nouveau: Add support for SLCG for Kepler2 Lyude Paul
2018-01-26 3:35 ` Lyude Paul
2018-01-26 3:35 ` [RFC v2 3/4] drm/nouveau: Add support for BLCG on Kepler2 Lyude Paul
[not found] ` <20180126033607.7682-4-lyude-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-26 7:53 ` Ilia Mirkin
2018-01-26 7:53 ` Ilia Mirkin
[not found] ` <CAKb7Uvg_Tf-uKej0hK5eigdpOtY-uY6dGK8KbX8+7b+dYfXOtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-26 18:11 ` Lyude Paul [this message]
2018-01-26 18:11 ` Lyude Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1516990260.5161.8.camel@redhat.com \
--to=lyude-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=airlied-cv59FeDIM0c@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=kstewart-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.