drm/nouveau/bios: translate additional memory types
authorBen Skeggs <bskeggs@redhat.com>
Tue, 11 Dec 2018 04:50:02 +0000 (14:50 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 11 Dec 2018 05:37:45 +0000 (15:37 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/M0203.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h
drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/fb/ram.c

index 703a5b524b96c7bd445f35a79bf402f60e7f6d4b..425ccc47e3b778740b2cf8101a6b8c71402fa4ec 100644 (file)
@@ -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;
index 96ccc624ee8144ded1208bf276b7477598976470..27298f8b7ead09c050a9761a8bfd0637b80a8587 100644 (file)
@@ -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 {
index 434d2fc5bb1ce90c92c16299208ba5a290cbbe06..b2bb5a3ccb02b34a7158eee49d7fec2aa5559626 100644 (file)
@@ -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;
index 24c7bd50573169054047634ffc98f546fa2f2a2a..b11867f682cb933fe60996092e29357e4aab8154 100644 (file)
@@ -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;