From: Martin Peres <martin.peres-GANU6spQydw@public.gmane.org>
To: Karol Herbst <nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>,
nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v2 06/22] volt: parse the both max voltage entries
Date: Mon, 28 Mar 2016 23:49:19 +0300 [thread overview]
Message-ID: <56F998CF.4080704@free.fr> (raw)
In-Reply-To: <1458577000-6615-7-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
On 21/03/16 18:16, Karol Herbst wrote:
> these entries specify a maximum voltage nvidia never exceeds, we shouldn't do
> that, too.
>
> Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
> ---
> drm/nouveau/include/nvkm/subdev/bios/vmap.h | 2 ++
> drm/nouveau/include/nvkm/subdev/volt.h | 2 ++
> drm/nouveau/nvkm/subdev/bios/vmap.c | 5 +++++
> drm/nouveau/nvkm/subdev/volt/base.c | 11 +++++++++++
> 4 files changed, 20 insertions(+)
>
> diff --git a/drm/nouveau/include/nvkm/subdev/bios/vmap.h b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
> index 6633c6d..48fe71d 100644
> --- a/drm/nouveau/include/nvkm/subdev/bios/vmap.h
> +++ b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
> @@ -1,6 +1,8 @@
> #ifndef __NVBIOS_VMAP_H__
> #define __NVBIOS_VMAP_H__
> struct nvbios_vmap {
> + u8 max0;
> + u8 max1;
> };
>
> u16 nvbios_vmap_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len);
> diff --git a/drm/nouveau/include/nvkm/subdev/volt.h b/drm/nouveau/include/nvkm/subdev/volt.h
> index fc68825..3e0f8da 100644
> --- a/drm/nouveau/include/nvkm/subdev/volt.h
> +++ b/drm/nouveau/include/nvkm/subdev/volt.h
> @@ -15,6 +15,8 @@ struct nvkm_volt {
>
> u32 max_uv;
> u32 min_uv;
> + u8 max0_vid;
> + u8 max1_vid;
> };
>
> int nvkm_volt_map_min(struct nvkm_volt *volt, u8 id);
> diff --git a/drm/nouveau/nvkm/subdev/bios/vmap.c b/drm/nouveau/nvkm/subdev/bios/vmap.c
> index 2f13db7..f5463b1 100644
> --- a/drm/nouveau/nvkm/subdev/bios/vmap.c
> +++ b/drm/nouveau/nvkm/subdev/bios/vmap.c
> @@ -61,7 +61,12 @@ nvbios_vmap_parse(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
> memset(info, 0x00, sizeof(*info));
> switch (!!vmap * *ver) {
> case 0x10:
> + info->max0 = 0xff;
> + info->max1 = 0xff;
> + break;
> case 0x20:
> + info->max0 = nvbios_rd08(bios, vmap + 0x7);
> + info->max1 = nvbios_rd08(bios, vmap + 0x8);
> break;
> }
> return vmap;
> diff --git a/drm/nouveau/nvkm/subdev/volt/base.c b/drm/nouveau/nvkm/subdev/volt/base.c
> index 71094a9..205dfcf 100644
> --- a/drm/nouveau/nvkm/subdev/volt/base.c
> +++ b/drm/nouveau/nvkm/subdev/volt/base.c
> @@ -217,9 +217,20 @@ nvkm_volt_ctor(const struct nvkm_volt_func *func, struct nvkm_device *device,
>
> /* Assuming the non-bios device should build the voltage table later */
> if (bios) {
> + u8 ver, hdr, cnt, len;
> + struct nvbios_vmap vmap;
> +
> nvkm_volt_parse_bios(bios, volt);
> nvkm_debug(&volt->subdev, "min: %iuv max: %iuv\n",
> volt->min_uv, volt->max_uv);
> +
> + if (nvbios_vmap_parse(bios, &ver, &hdr, &cnt, &len, &vmap)) {
> + volt->max0_vid = vmap.max0;
> + volt->max1_vid = vmap.max1;
> + } else {
> + volt->max0_vid = 0xff;
> + volt->max1_vid = 0xff;
> + }
> }
>
> if (volt->vid_nr) {
This is really peculiar that NVIDIA would have 2 max_vid in the same
entry :s
How did you reverse that? Did you really see no differences? Maybe the
two max_vid are for different temperatures?
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
next prev parent reply other threads:[~2016-03-28 20:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-21 16:16 [PATCH v2 00/22] Volting/Clocking improvements for Fermi and newer Karol Herbst
[not found] ` <1458577000-6615-1-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-21 16:16 ` [PATCH v2 01/22] bios/volt: handle voltage table version 0x50 with 0ed header Karol Herbst
2016-03-21 16:16 ` [PATCH v2 02/22] volt: properly detect entry based voltage tables Karol Herbst
2016-03-21 16:16 ` [PATCH v2 03/22] volt: save the voltage range we are able to set Karol Herbst
2016-03-21 16:16 ` [PATCH v2 04/22] volt: add nvkm_volt_map_min function Karol Herbst
2016-03-21 16:16 ` [PATCH v2 05/22] clk: don't create cstates which voltage is higher than what the gpu can do Karol Herbst
2016-03-21 16:16 ` [PATCH v2 06/22] volt: parse the both max voltage entries Karol Herbst
[not found] ` <1458577000-6615-7-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-28 20:49 ` Martin Peres [this message]
[not found] ` <56F998CF.4080704-GANU6spQydw@public.gmane.org>
2016-03-28 22:30 ` Martin Peres
2016-03-21 16:16 ` [PATCH v2 07/22] volt: add min_id parameter to nvkm_volt_set_id Karol Herbst
[not found] ` <1458577000-6615-8-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-28 20:52 ` Martin Peres
[not found] ` <56F999A1.6090505-GANU6spQydw@public.gmane.org>
2016-03-28 21:41 ` Martin Peres
2016-03-21 16:16 ` [PATCH v2 08/22] clk: export nvkm_volt_map Karol Herbst
2016-03-21 16:16 ` [PATCH v2 09/22] clk: add index field to nvkm_cstate Karol Herbst
2016-03-21 16:16 ` [PATCH v2 10/22] add daemon to compare nouveau with blob voltage Karol Herbst
2016-03-21 16:16 ` [PATCH v2 11/22] volt: add temperature parameter to nvkm_volt_map Karol Herbst
2016-03-21 16:16 ` [PATCH v2 12/22] clk: fixup cstate selection Karol Herbst
2016-03-21 16:16 ` [PATCH v2 13/22] clk: respect voltage limits in nvkm_cstate_prog with cstate = -1 Karol Herbst
2016-03-21 16:16 ` [PATCH v2 14/22] bios: add parsing of BASE CLOCK table Karol Herbst
2016-03-21 16:16 ` [PATCH v2 15/22] clk: allow boosting only when NvBoost is set Karol Herbst
2016-03-21 16:16 ` [PATCH v2 16/22] volt: don't require perfect fit Karol Herbst
[not found] ` <1458577000-6615-17-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-28 22:55 ` Martin Peres
2016-03-21 16:16 ` [PATCH v2 17/22] bios/vmap: unk0 field is the mode Karol Herbst
2016-03-21 16:16 ` [PATCH v2 18/22] volt: add coefficients I found on my gpu Karol Herbst
[not found] ` <1458577000-6615-19-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-28 22:38 ` Martin Peres
2016-03-21 16:16 ` [PATCH v2 19/22] clk: save the max clock we can set Karol Herbst
2016-03-21 16:16 ` [PATCH v2 20/22] clk: add nvkm_clk_reclock function Karol Herbst
[not found] ` <1458577000-6615-21-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-28 22:34 ` Martin Peres
2016-03-21 16:16 ` [PATCH v2 21/22] nvif: add boost info and set operations Karol Herbst
2016-03-21 16:16 ` [PATCH v2 22/22] debugfs: add boost interface to change the boost_mode Karol Herbst
[not found] ` <1458577000-6615-23-git-send-email-nouveau-lIBOoy2+GI7scQ4cX5LuPg@public.gmane.org>
2016-03-28 22:17 ` Martin Peres
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=56F998CF.4080704@free.fr \
--to=martin.peres-ganu6spqydw@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=nouveau-lIBOoy2+GI7scQ4cX5LuPg@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.