Commit 2d5257b7 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/bios: translate additional memory types

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 936a1678
......@@ -12,11 +12,14 @@ u32 nvbios_M0203Tp(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
struct nvbios_M0203T *);
struct nvbios_M0203E {
#define M0203E_TYPE_DDR2 0x0
#define M0203E_TYPE_DDR3 0x1
#define M0203E_TYPE_GDDR3 0x2
#define M0203E_TYPE_GDDR5 0x3
#define M0203E_TYPE_SKIP 0xf
#define M0203E_TYPE_DDR2 0x0
#define M0203E_TYPE_DDR3 0x1
#define M0203E_TYPE_GDDR3 0x2
#define M0203E_TYPE_GDDR5 0x3
#define M0203E_TYPE_HBM2 0x6
#define M0203E_TYPE_GDDR5X 0x8
#define M0203E_TYPE_GDDR6 0x9
#define M0203E_TYPE_SKIP 0xf
u8 type;
u8 strap;
u8 group;
......
......@@ -105,7 +105,10 @@ enum nvkm_ram_type {
NVKM_RAM_TYPE_GDDR2,
NVKM_RAM_TYPE_GDDR3,
NVKM_RAM_TYPE_GDDR4,
NVKM_RAM_TYPE_GDDR5
NVKM_RAM_TYPE_GDDR5,
NVKM_RAM_TYPE_GDDR5X,
NVKM_RAM_TYPE_GDDR6,
NVKM_RAM_TYPE_HBM2,
};
struct nvkm_ram {
......
......@@ -68,10 +68,13 @@ nvkm_fb_bios_memtype(struct nvkm_bios *bios)
if (nvbios_M0203Em(bios, ramcfg, &ver, &hdr, &M0203E)) {
switch (M0203E.type) {
case M0203E_TYPE_DDR2 : return NVKM_RAM_TYPE_DDR2;
case M0203E_TYPE_DDR3 : return NVKM_RAM_TYPE_DDR3;
case M0203E_TYPE_GDDR3: return NVKM_RAM_TYPE_GDDR3;
case M0203E_TYPE_GDDR5: return NVKM_RAM_TYPE_GDDR5;
case M0203E_TYPE_DDR2 : return NVKM_RAM_TYPE_DDR2;
case M0203E_TYPE_DDR3 : return NVKM_RAM_TYPE_DDR3;
case M0203E_TYPE_GDDR3 : return NVKM_RAM_TYPE_GDDR3;
case M0203E_TYPE_GDDR5 : return NVKM_RAM_TYPE_GDDR5;
case M0203E_TYPE_GDDR5X: return NVKM_RAM_TYPE_GDDR5X;
case M0203E_TYPE_GDDR6 : return NVKM_RAM_TYPE_GDDR6;
case M0203E_TYPE_HBM2 : return NVKM_RAM_TYPE_HBM2;
default:
nvkm_warn(subdev, "M0203E type %02x\n", M0203E.type);
return NVKM_RAM_TYPE_UNKNOWN;
......
......@@ -184,6 +184,9 @@ nvkm_ram_ctor(const struct nvkm_ram_func *func, struct nvkm_fb *fb,
[NVKM_RAM_TYPE_GDDR3 ] = "GDDR3",
[NVKM_RAM_TYPE_GDDR4 ] = "GDDR4",
[NVKM_RAM_TYPE_GDDR5 ] = "GDDR5",
[NVKM_RAM_TYPE_GDDR5X ] = "GDDR5X",
[NVKM_RAM_TYPE_GDDR6 ] = "GDDR6",
[NVKM_RAM_TYPE_HBM2 ] = "HBM2",
};
struct nvkm_subdev *subdev = &fb->subdev;
int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment