From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Roy Spliet <rspliet-pPYjZ15w/Xhulxpn9UvDqw@public.gmane.org>,
Nouveau Mailinglist
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 7/9] fb/ramnv50: Script changes for G94 and up
Date: Wed, 30 Sep 2015 13:05:34 +1000 [thread overview]
Message-ID: <560B517E.6010806@gmail.com> (raw)
In-Reply-To: <1443569032-13817-8-git-send-email-rspliet-pPYjZ15w/Xhulxpn9UvDqw@public.gmane.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 09/30/2015 09:23 AM, Roy Spliet wrote:
> 10053c is not even read on some cards, and I have no idea exactly
> what the criteria are. Likely NVIDIA pre-scans the VBIOS and in
> their driver disables all features that are never used. The
> practical effect should be the same as this implementation though.
I haven't fully reviewed the series properly yet, but wanted to put my
two cents worth in here.
If this works like it does on Kepler, you're going to get bitten here
if you don't do this correctly.
NVIDIA scans the full memory configurations for every "rammap" entry
(yes, even the ones that can never be referenced by the perf table)
and where all values are the same (doesn't matter if they're all on or
all off, just that they're the same) in every entry, they don't touch
that particular part of the configuration.
Depending on what DEVINIT did, this can leave something either enabled
or disabled, you don't know which, you're just supposed to just not
touch it.
I tried to ignore this on Kepler initially, but eventually got bitten
by it and had to implement it properly (gk104_ram_ctor_data() handles
this for the most part).
I'd *strongly* recommend you verify if the behaviour is the same on
these boards, and implement it if it is.
Ben.
>
> Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Tested-by: Pierre
> Moreau <pierre.morrow@free.fr> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c | 36
> ++++++++++++++++++++---- 1 file changed, 30 insertions(+), 6
> deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c index
> 1c6ae6b..651b74a 100644 ---
> a/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c +++
> b/drivers/gpu/drm/nouveau/nvkm/subdev/fb/ramnv50.c @@ -302,6 +302,9
> @@ nv50_ram_calc(struct nvkm_ram *base, u32 freq) return ret; }
>
> + if (subdev->device->chipset <= 0x96 &&
> !next->bios.ramcfg_00_03_02) + ram_mask(hwsq, 0x100710,
> 0x00000200, 0x00000000); + /* Always disable this bit during
> reclock */ ram_mask(hwsq, 0x100200, 0x00000800, 0x00000000);
>
> @@ -353,8 +356,11 @@ nv50_ram_calc(struct nvkm_ram *base, u32
> freq) next->bios.rammap_00_16_40 << 14); ram_mask(hwsq, 0x00400c,
> 0x0000ffff, (N1 << 8) | M1); ram_mask(hwsq, 0x004008, 0x91ff0000,
> r004008); - if (subdev->device->chipset >= 0x96) + + /* XXX: GDDR3
> only? */ + if (subdev->device->chipset >= 0x92) ram_wr32(hwsq,
> 0x100da0, r100da0); + nv50_ram_gpio(hwsq, 0x18,
> !next->bios.ramcfg_FBVDDQ); ram_nsec(hwsq, 64000); /*XXX*/
> ram_nsec(hwsq, 32000); /*XXX*/ @@ -397,19 +403,33 @@
> nv50_ram_calc(struct nvkm_ram *base, u32 freq) ram_mask(hwsq,
> 0x100200, 0x00001000, !next->bios.ramcfg_00_04_02 << 12);
>
> /* XXX: A lot of this could be "chipset"/"ram type" specific stuff
> */ - unk710 = ram_rd32(hwsq, 0x100710) & ~0x00000101; + unk710 =
> ram_rd32(hwsq, 0x100710) & ~0x00000100; unk714 = ram_rd32(hwsq,
> 0x100714) & ~0xf0000020; unk718 = ram_rd32(hwsq, 0x100718) &
> ~0x00000100; unk71c = ram_rd32(hwsq, 0x10071c) & ~0x00000100; + if
> (subdev->device->chipset <= 0x96) { + unk710 &= ~0x0000006e; +
> unk714 &= ~0x00000100; + + if (!next->bios.ramcfg_00_03_08) +
> unk710 |= 0x00000060; + if (!next->bios.ramcfg_FBVDDQ) + unk714
> |= 0x00000100; + if ( next->bios.ramcfg_00_04_04) + unk710 |=
> 0x0000000e; + } else { + unk710 &= ~0x00000001; + + if
> (!next->bios.ramcfg_00_03_08) + unk710 |= 0x00000001; + }
>
> if ( next->bios.ramcfg_00_03_01) unk71c |= 0x00000100; if (
> next->bios.ramcfg_00_03_02) unk710 |= 0x00000100; - if
> (!next->bios.ramcfg_00_03_08) { - unk710 |= 0x1; - unk714 |=
> 0x20; - } + if (!next->bios.ramcfg_00_03_08) + unk714 |=
> 0x00000020; if ( next->bios.ramcfg_00_04_04) unk714 |= 0x70000000;
> if ( next->bios.ramcfg_00_04_20) @@ -420,6 +440,8 @@
> nv50_ram_calc(struct nvkm_ram *base, u32 freq) ram_mask(hwsq,
> 0x100718, 0xffffffff, unk718); ram_mask(hwsq, 0x100710, 0xffffffff,
> unk710);
>
> + /* XXX: G94 does not even test these regs in trace. Harmless we
> do it, + * but why is it omitted? */ if
> (next->bios.rammap_00_16_20) { ram_wr32(hwsq, 0x1005a0,
> next->bios.ramcfg_00_07 << 16 | next->bios.ramcfg_00_06 << 8 | @@
> -450,6 +472,8 @@ nv50_ram_calc(struct nvkm_ram *base, u32 freq)
> ram_mask(hwsq, 0x004008, 0x00004000, 0x00000000); if
> (next->bios.ramcfg_00_03_02) ram_mask(hwsq, 0x10021c, 0x00010000,
> 0x00010000); + if (subdev->device->chipset <= 0x96 &&
> next->bios.ramcfg_00_03_02) + ram_mask(hwsq, 0x100710, 0x00000200,
> 0x00000200);
>
> return 0; }
>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2015-09-30 3:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 23:23 All-round reclocking improvements Roy Spliet
[not found] ` <1443569032-13817-1-git-send-email-rspliet-pPYjZ15w/Xhulxpn9UvDqw@public.gmane.org>
2015-09-29 23:23 ` [PATCH 1/9] bios/rammap: Identify DLLoff for >= GF100 Roy Spliet
2015-09-29 23:23 ` [PATCH 2/9] fb/ramgt215: Transform GPIO ramfuc method from FBVREF-specific to generic Roy Spliet
2015-09-29 23:23 ` [PATCH 3/9] fb/ramgt215: Change FBVDD/Q when BIOS asks for it Roy Spliet
2015-09-29 23:23 ` [PATCH 4/9] fb/ramgt215: Restructure r111100 calculation for DDR2 Roy Spliet
2015-09-29 23:23 ` [PATCH 5/9] fb/ramnv50: Voltage GPIOs Roy Spliet
2015-09-29 23:23 ` [PATCH 6/9] fb/ramnv50: Deal with cards without timing entries Roy Spliet
2015-09-29 23:23 ` [PATCH 7/9] fb/ramnv50: Script changes for G94 and up Roy Spliet
[not found] ` <1443569032-13817-8-git-send-email-rspliet-pPYjZ15w/Xhulxpn9UvDqw@public.gmane.org>
2015-09-30 3:05 ` Ben Skeggs [this message]
[not found] ` <560B517E.6010806-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-30 20:09 ` Roy Spliet
2015-09-29 23:23 ` [PATCH 8/9] bus/hwsq: Implement VBLANK waiting heuristic Roy Spliet
2015-09-29 23:23 ` [PATCH 9/9] clk/g84: Enable reclocking for GDDR3 G94-G200 Roy Spliet
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=560B517E.6010806@gmail.com \
--to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=rspliet-pPYjZ15w/Xhulxpn9UvDqw@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.