Skip to content

Commit 32cb1cc

Browse files
Ben Skeggsairlied
authored andcommitted
drm/nouveau: add support for GB10x
This commit enables basic support for the GB100/GB102 Blackwell GPUs. Beyond HW class ID plumbing there's very little change here vs GH100. Signed-off-by: Ben Skeggs <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Timur Tabi <[email protected]> Tested-by: Timur Tabi <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 862450a commit 32cb1cc

File tree

27 files changed

+257
-23
lines changed

27 files changed

+257
-23
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/* SPDX-License-Identifier: MIT
2+
*
3+
* Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
4+
*/
5+
#ifndef __gb100_dev_hshub_base_h__
6+
#define __gb100_dev_hshub_base_h__
7+
8+
#define NV_PFB_HSHUB0 0x00870fff:0x00870000
9+
10+
#define NV_PFB_HSHUB 0x00000FFF:0x00000000 /* RW--D */
11+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_LO 0x00000E50 /* RW-4R */
12+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_LO_ADR 31:0 /* RWIVF */
13+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_LO_ADR_INIT 0x00000000 /* RWI-V */
14+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_LO_ADR_MASK 0xFFFFFF00 /* ----V */
15+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_HI 0x00000E54 /* RW-4R */
16+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_HI_ADR 31:0 /* RWIVF */
17+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_HI_ADR_INIT 0x00000000 /* RWI-V */
18+
#define NV_PFB_HSHUB_PCIE_FLUSH_SYSMEM_ADDR_HI_ADR_MASK 0x000FFFFF /* ----V */
19+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_LO 0x000006C0 /* RW-4R */
20+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_LO_ADR 31:0 /* RWIVF */
21+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_LO_ADR_INIT 0x00000000 /* RWI-V */
22+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_LO_ADR_MASK 0xFFFFFF00 /* ----V */
23+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_HI 0x000006C4 /* RW-4R */
24+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_HI_ADR 31:0 /* RWIVF */
25+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_HI_ADR_INIT 0x00000000 /* RWI-V */
26+
#define NV_PFB_HSHUB_EG_PCIE_FLUSH_SYSMEM_ADDR_HI_ADR_MASK 0x000FFFFF /* ----V */
27+
28+
#endif // __gb100_dev_hshub_base_h__

drivers/gpu/drm/nouveau/include/nvif/cl0080.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ struct nv_device_info_v0 {
3030
#define NV_DEVICE_INFO_V0_AMPERE 0x0d
3131
#define NV_DEVICE_INFO_V0_ADA 0x0e
3232
#define NV_DEVICE_INFO_V0_HOPPER 0x0f
33+
#define NV_DEVICE_INFO_V0_BLACKWELL 0x10
3334
__u8 family;
3435
__u8 pad06[2];
3536
__u64 ram_size;

drivers/gpu/drm/nouveau/include/nvif/class.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757

5858
#define KEPLER_INLINE_TO_MEMORY_A 0x0000a040
5959
#define KEPLER_INLINE_TO_MEMORY_B 0x0000a140
60+
#define BLACKWELL_INLINE_TO_MEMORY_A 0x0000cd40
6061

6162
#define NV04_DISP /* cl0046.h */ 0x00000046
6263

@@ -87,6 +88,7 @@
8788
#define AMPERE_CHANNEL_GPFIFO_A /* if0020.h */ 0x0000c56f
8889
#define AMPERE_CHANNEL_GPFIFO_B /* if0020.h */ 0x0000c76f
8990
#define HOPPER_CHANNEL_GPFIFO_A 0x0000c86f
91+
#define BLACKWELL_CHANNEL_GPFIFO_A 0x0000c96f
9092

9193
#define NV50_DISP /* if0010.h */ 0x00005070
9294
#define G82_DISP /* if0010.h */ 0x00008270
@@ -198,13 +200,16 @@
198200

199201
#define HOPPER_A 0x0000cb97
200202

203+
#define BLACKWELL_A 0x0000cd97
204+
201205
#define NV74_BSP 0x000074b0
202206

203207
#define NVB8B0_VIDEO_DECODER 0x0000b8b0
204208
#define NVC4B0_VIDEO_DECODER 0x0000c4b0
205209
#define NVC6B0_VIDEO_DECODER 0x0000c6b0
206210
#define NVC7B0_VIDEO_DECODER 0x0000c7b0
207211
#define NVC9B0_VIDEO_DECODER 0x0000c9b0
212+
#define NVCDB0_VIDEO_DECODER 0x0000cdb0
208213

209214
#define GT212_MSVLD 0x000085b1
210215
#define IGT21A_MSVLD 0x000086b1
@@ -234,6 +239,7 @@
234239
#define AMPERE_DMA_COPY_A 0x0000c6b5
235240
#define AMPERE_DMA_COPY_B 0x0000c7b5
236241
#define HOPPER_DMA_COPY_A 0x0000c8b5
242+
#define BLACKWELL_DMA_COPY_A 0x0000c9b5
237243

238244
#define NVC4B7_VIDEO_ENCODER 0x0000c4b7
239245
#define NVC7B7_VIDEO_ENCODER 0x0000c7b7
@@ -257,15 +263,18 @@
257263
#define AMPERE_COMPUTE_B 0x0000c7c0
258264
#define ADA_COMPUTE_A 0x0000c9c0
259265
#define HOPPER_COMPUTE_A 0x0000cbc0
266+
#define BLACKWELL_COMPUTE_A 0x0000cdc0
260267

261268
#define NV74_CIPHER 0x000074c1
262269

263270
#define NVB8D1_VIDEO_NVJPG 0x0000b8d1
264271
#define NVC4D1_VIDEO_NVJPG 0x0000c4d1
265272
#define NVC9D1_VIDEO_NVJPG 0x0000c9d1
273+
#define NVCDD1_VIDEO_NVJPG 0x0000cdd1
266274

267275
#define NVB8FA_VIDEO_OFA 0x0000b8fa
268276
#define NVC6FA_VIDEO_OFA 0x0000c6fa
269277
#define NVC7FA_VIDEO_OFA 0x0000c7fa
270278
#define NVC9FA_VIDEO_OFA 0x0000c9fa
279+
#define NVCDFA_VIDEO_OFA 0x0000cdfa
271280
#endif

drivers/gpu/drm/nouveau/include/nvkm/core/device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct nvkm_device {
4848
GA100 = 0x170,
4949
GH100 = 0x180,
5050
AD100 = 0x190,
51+
GB10x = 0x1a0,
5152
} card_type;
5253
u32 chipset;
5354
u8 chiprev;

drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ int tu102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct n
103103
int ga100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
104104
int ga102_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
105105
int gh100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
106+
int gb100_fb_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fb **);
106107

107108
#include <subdev/bios.h>
108109
#include <subdev/bios/ramcfg.h>

drivers/gpu/drm/nouveau/include/nvkm/subdev/fsp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ int nvkm_fsp_boot_gsp_fmc(struct nvkm_fsp *, u64 args_addr, u32 rsvd_size, bool
1919
u64 img_addr, const u8 *hash, const u8 *pkey, const u8 *sig);
2020

2121
int gh100_fsp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fsp **);
22+
int gb100_fsp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_fsp **);
2223
#endif

drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,4 +492,5 @@ int ga100_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_
492492
int ga102_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **);
493493
int gh100_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **);
494494
int ad102_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **);
495+
int gb100_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **);
495496
#endif

drivers/gpu/drm/nouveau/nouveau_bo.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,7 @@ nouveau_bo_move_init(struct nouveau_drm *drm)
10001000
struct ttm_resource *, struct ttm_resource *);
10011001
int (*init)(struct nouveau_channel *, u32 handle);
10021002
} _methods[] = {
1003+
{ "COPY", 4, 0xc9b5, nve0_bo_move_copy, nve0_bo_move_init },
10031004
{ "COPY", 4, 0xc8b5, nve0_bo_move_copy, nve0_bo_move_init },
10041005
{ "COPY", 4, 0xc7b5, nve0_bo_move_copy, nve0_bo_move_init },
10051006
{ "GRCE", 0, 0xc7b5, nve0_bo_move_copy, nvc0_bo_move_init },

drivers/gpu/drm/nouveau/nouveau_chan.c

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -249,22 +249,23 @@ nouveau_channel_ctor(struct nouveau_cli *cli, bool priv, u64 runm,
249249
struct nouveau_channel **pchan)
250250
{
251251
const struct nvif_mclass hosts[] = {
252-
{ HOPPER_CHANNEL_GPFIFO_A, 0 },
253-
{ AMPERE_CHANNEL_GPFIFO_B, 0 },
254-
{ AMPERE_CHANNEL_GPFIFO_A, 0 },
255-
{ TURING_CHANNEL_GPFIFO_A, 0 },
256-
{ VOLTA_CHANNEL_GPFIFO_A, 0 },
257-
{ PASCAL_CHANNEL_GPFIFO_A, 0 },
258-
{ MAXWELL_CHANNEL_GPFIFO_A, 0 },
259-
{ KEPLER_CHANNEL_GPFIFO_B, 0 },
260-
{ KEPLER_CHANNEL_GPFIFO_A, 0 },
261-
{ FERMI_CHANNEL_GPFIFO , 0 },
262-
{ G82_CHANNEL_GPFIFO , 0 },
263-
{ NV50_CHANNEL_GPFIFO , 0 },
264-
{ NV40_CHANNEL_DMA , 0 },
265-
{ NV17_CHANNEL_DMA , 0 },
266-
{ NV10_CHANNEL_DMA , 0 },
267-
{ NV03_CHANNEL_DMA , 0 },
252+
{ BLACKWELL_CHANNEL_GPFIFO_A, 0 },
253+
{ HOPPER_CHANNEL_GPFIFO_A, 0 },
254+
{ AMPERE_CHANNEL_GPFIFO_B, 0 },
255+
{ AMPERE_CHANNEL_GPFIFO_A, 0 },
256+
{ TURING_CHANNEL_GPFIFO_A, 0 },
257+
{ VOLTA_CHANNEL_GPFIFO_A, 0 },
258+
{ PASCAL_CHANNEL_GPFIFO_A, 0 },
259+
{ MAXWELL_CHANNEL_GPFIFO_A, 0 },
260+
{ KEPLER_CHANNEL_GPFIFO_B, 0 },
261+
{ KEPLER_CHANNEL_GPFIFO_A, 0 },
262+
{ FERMI_CHANNEL_GPFIFO , 0 },
263+
{ G82_CHANNEL_GPFIFO , 0 },
264+
{ NV50_CHANNEL_GPFIFO , 0 },
265+
{ NV40_CHANNEL_DMA , 0 },
266+
{ NV17_CHANNEL_DMA , 0 },
267+
{ NV10_CHANNEL_DMA , 0 },
268+
{ NV03_CHANNEL_DMA , 0 },
268269
{}
269270
};
270271
DEFINE_RAW_FLEX(struct nvif_chan_v0, args, name, TASK_COMM_LEN + 16);

drivers/gpu/drm/nouveau/nouveau_drm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,7 @@ nouveau_accel_init(struct nouveau_drm *drm)
510510
case AMPERE_CHANNEL_GPFIFO_A:
511511
case AMPERE_CHANNEL_GPFIFO_B:
512512
case HOPPER_CHANNEL_GPFIFO_A:
513+
case BLACKWELL_CHANNEL_GPFIFO_A:
513514
ret = gv100_fence_create(drm);
514515
break;
515516
default:

0 commit comments

Comments
 (0)