[v4,17/37] bios/vmap: unk0 field is the mode

Submitted by Karol Herbst on April 18, 2016, 7:13 p.m.

Details

Message ID 1461006851-5007-18-git-send-email-nouveau@karolherbst.de
State New
Headers show
Series "Volting/Clocking improvements for Fermi and newer" ( rev: 4 ) in Nouveau

Not browsing as part of any series.

Commit Message

Karol Herbst April 18, 2016, 7:13 p.m.
this selects which formula is used to calculate the voltage.

depending on the value, the entry maps to a different voltage and even enables
if the temperature has any effect or not. This is easy to observe with the
binary driver.

Signed-off-by: Karol Herbst <nouveau@karolherbst.de>
---
 drm/nouveau/include/nvkm/subdev/bios/vmap.h | 2 +-
 drm/nouveau/nvkm/subdev/bios/vmap.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drm/nouveau/include/nvkm/subdev/bios/vmap.h b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
index ae2f27b..8fa1294 100644
--- a/drm/nouveau/include/nvkm/subdev/bios/vmap.h
+++ b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
@@ -11,7 +11,7 @@  u16 nvbios_vmap_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
 		      struct nvbios_vmap *);
 
 struct nvbios_vmap_entry {
-	u8  unk0;
+	u8  mode;
 	u8  link;
 	u32 min;
 	u32 max;
diff --git a/drm/nouveau/nvkm/subdev/bios/vmap.c b/drm/nouveau/nvkm/subdev/bios/vmap.c
index f2295e1..32bd8b1 100644
--- a/drm/nouveau/nvkm/subdev/bios/vmap.c
+++ b/drm/nouveau/nvkm/subdev/bios/vmap.c
@@ -105,7 +105,7 @@  nvbios_vmap_entry_parse(struct nvkm_bios *bios, int idx, u8 *ver, u8 *len,
 		info->arg[2] = nvbios_rd32(bios, vmap + 0x10);
 		break;
 	case 0x20:
-		info->unk0   = nvbios_rd08(bios, vmap + 0x00);
+		info->mode   = nvbios_rd08(bios, vmap + 0x00);
 		info->link   = nvbios_rd08(bios, vmap + 0x01);
 		info->min    = nvbios_rd32(bios, vmap + 0x02);
 		info->max    = nvbios_rd32(bios, vmap + 0x06);

Comments

On 18/04/16 22:13, Karol Herbst wrote:
> this selects which formula is used to calculate the voltage.
>
> depending on the value, the entry maps to a different voltage and even enables
> if the temperature has any effect or not. This is easy to observe with the
> binary driver.
>
> Signed-off-by: Karol Herbst <nouveau@karolherbst.de>

Reviewed-by: Martin Peres <martin.peres@free.fr>
> ---
>   drm/nouveau/include/nvkm/subdev/bios/vmap.h | 2 +-
>   drm/nouveau/nvkm/subdev/bios/vmap.c         | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drm/nouveau/include/nvkm/subdev/bios/vmap.h b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
> index ae2f27b..8fa1294 100644
> --- a/drm/nouveau/include/nvkm/subdev/bios/vmap.h
> +++ b/drm/nouveau/include/nvkm/subdev/bios/vmap.h
> @@ -11,7 +11,7 @@ u16 nvbios_vmap_parse(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
>   		      struct nvbios_vmap *);
>   
>   struct nvbios_vmap_entry {
> -	u8  unk0;
> +	u8  mode;
>   	u8  link;
>   	u32 min;
>   	u32 max;
> diff --git a/drm/nouveau/nvkm/subdev/bios/vmap.c b/drm/nouveau/nvkm/subdev/bios/vmap.c
> index f2295e1..32bd8b1 100644
> --- a/drm/nouveau/nvkm/subdev/bios/vmap.c
> +++ b/drm/nouveau/nvkm/subdev/bios/vmap.c
> @@ -105,7 +105,7 @@ nvbios_vmap_entry_parse(struct nvkm_bios *bios, int idx, u8 *ver, u8 *len,
>   		info->arg[2] = nvbios_rd32(bios, vmap + 0x10);
>   		break;
>   	case 0x20:
> -		info->unk0   = nvbios_rd08(bios, vmap + 0x00);
> +		info->mode   = nvbios_rd08(bios, vmap + 0x00);
>   		info->link   = nvbios_rd08(bios, vmap + 0x01);
>   		info->min    = nvbios_rd32(bios, vmap + 0x02);
>   		info->max    = nvbios_rd32(bios, vmap + 0x06);