Commit 5dca4335 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'topic/drm-next-nouveau-r570-2025-05-19-1' of...

Merge tag 'topic/drm-next-nouveau-r570-2025-05-19-1' of https://gitlab.freedesktop.org/drm/kernel

 into drm-next

drm/nouveau: r570 and hopper/blackwell support

This series implements support for booting GSP-RM firmware version
570.144, and adds support for GH100, GB10x, and GB20x GPUs.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parents 7cf346fc 6cc6e08d
Loading
Loading
Loading
Loading
+23 −16
Original line number Diff line number Diff line
@@ -2137,6 +2137,8 @@ static int drm_dp_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,

	for (i = 0; i < num; i++) {
		msg.address = msgs[i].addr;

		if (!aux->no_zero_sized) {
			drm_dp_i2c_msg_set_request(&msg, &msgs[i]);
			/* Send a bare address packet to start the transaction.
			 * Zero sized messages specify an address only (bare
@@ -2145,6 +2147,7 @@ static int drm_dp_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
			msg.buffer = NULL;
			msg.size = 0;
			err = drm_dp_i2c_do_msg(aux, &msg);
		}

		/*
		 * Reset msg.request in case in case it got
@@ -2163,6 +2166,8 @@ static int drm_dp_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
			msg.buffer = msgs[i].buf + j;
			msg.size = min(transfer_size, msgs[i].len - j);

			if (j + msg.size == msgs[i].len && aux->no_zero_sized)
				msg.request &= ~DP_AUX_I2C_MOT;
			err = drm_dp_i2c_drain_msg(aux, &msg);

			/*
@@ -2180,6 +2185,8 @@ static int drm_dp_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
	}
	if (err >= 0)
		err = num;

	if (!aux->no_zero_sized) {
		/* Send a bare address packet to close out the transaction.
		 * Zero sized messages specify an address only (bare
		 * address) transaction.
@@ -2188,7 +2195,7 @@ static int drm_dp_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs,
		msg.buffer = NULL;
		msg.size = 0;
		(void)drm_dp_i2c_do_msg(aux, &msg);

	}
	return err;
}

+2 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
ccflags-y += -I $(src)/include
ccflags-y += -I $(src)/include/nvkm
ccflags-y += -I $(src)/nvkm
ccflags-y += -I $(src)/nvkm/subdev/gsp
ccflags-y += -I $(src)

# NVKM - HW resource manager
@@ -68,5 +69,6 @@ nouveau-y += nv17_fence.o
nouveau-y += nv50_fence.o
nouveau-y += nv84_fence.o
nouveau-y += nvc0_fence.o
nouveau-y += gv100_fence.o

obj-$(CONFIG_DRM_NOUVEAU) += nouveau.o
+5 −17
Original line number Diff line number Diff line
@@ -768,9 +768,7 @@ static void nv_crtc_destroy(struct drm_crtc *crtc)
		disp->image[nv_crtc->index] = NULL;
	}

	nouveau_bo_unmap(nv_crtc->cursor.nvbo);
	nouveau_bo_unpin(nv_crtc->cursor.nvbo);
	nouveau_bo_fini(nv_crtc->cursor.nvbo);
	nouveau_bo_unpin_del(&nv_crtc->cursor.nvbo);
	nvif_event_dtor(&nv_crtc->vblank);
	nvif_head_dtor(&nv_crtc->head);
	kfree(nv_crtc);
@@ -1303,6 +1301,7 @@ nv04_crtc_vblank_handler(struct nvif_event *event, void *repv, u32 repc)
int
nv04_crtc_create(struct drm_device *dev, int crtc_num)
{
	struct nouveau_cli *cli = &nouveau_drm(dev)->client;
	struct nouveau_display *disp = nouveau_display(dev);
	struct nouveau_crtc *nv_crtc;
	struct drm_plane *primary;
@@ -1336,20 +1335,9 @@ nv04_crtc_create(struct drm_device *dev, int crtc_num)
	drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs);
	drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256);

	ret = nouveau_bo_new(&nouveau_drm(dev)->client, 64*64*4, 0x100,
			     NOUVEAU_GEM_DOMAIN_VRAM, 0, 0x0000, NULL, NULL,
			     &nv_crtc->cursor.nvbo);
	if (!ret) {
		ret = nouveau_bo_pin(nv_crtc->cursor.nvbo,
				     NOUVEAU_GEM_DOMAIN_VRAM, false);
		if (!ret) {
			ret = nouveau_bo_map(nv_crtc->cursor.nvbo);
	ret = nouveau_bo_new_map(cli, NOUVEAU_GEM_DOMAIN_VRAM, 64 * 64 * 4, &nv_crtc->cursor.nvbo);
	if (ret)
				nouveau_bo_unpin(nv_crtc->cursor.nvbo);
		}
		if (ret)
			nouveau_bo_fini(nv_crtc->cursor.nvbo);
	}
		return ret;

	nv04_cursor_init(nv_crtc);

+4 −0
Original line number Diff line number Diff line
@@ -9,11 +9,13 @@ nouveau-y += dispnv50/core907d.o
nouveau-y += dispnv50/core917d.o
nouveau-y += dispnv50/corec37d.o
nouveau-y += dispnv50/corec57d.o
nouveau-y += dispnv50/coreca7d.o

nouveau-$(CONFIG_DEBUG_FS) += dispnv50/crc.o
nouveau-$(CONFIG_DEBUG_FS) += dispnv50/crc907d.o
nouveau-$(CONFIG_DEBUG_FS) += dispnv50/crcc37d.o
nouveau-$(CONFIG_DEBUG_FS) += dispnv50/crcc57d.o
nouveau-$(CONFIG_DEBUG_FS) += dispnv50/crcca7d.o

nouveau-y += dispnv50/dac507d.o
nouveau-y += dispnv50/dac907d.o
@@ -31,6 +33,7 @@ nouveau-y += dispnv50/head907d.o
nouveau-y += dispnv50/head917d.o
nouveau-y += dispnv50/headc37d.o
nouveau-y += dispnv50/headc57d.o
nouveau-y += dispnv50/headca7d.o

nouveau-y += dispnv50/wimm.o
nouveau-y += dispnv50/wimmc37b.o
@@ -39,6 +42,7 @@ nouveau-y += dispnv50/wndw.o
nouveau-y += dispnv50/wndwc37e.o
nouveau-y += dispnv50/wndwc57e.o
nouveau-y += dispnv50/wndwc67e.o
nouveau-y += dispnv50/wndwca7e.o

nouveau-y += dispnv50/base.o
nouveau-y += dispnv50/base507c.o
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ nv50_core_new(struct nouveau_drm *drm, struct nv50_core **pcore)
		int version;
		int (*new)(struct nouveau_drm *, s32, struct nv50_core **);
	} cores[] = {
		{ GB202_DISP_CORE_CHANNEL_DMA, 0, coreca7d_new },
		{ AD102_DISP_CORE_CHANNEL_DMA, 0, corec57d_new },
		{ GA102_DISP_CORE_CHANNEL_DMA, 0, corec57d_new },
		{ TU102_DISP_CORE_CHANNEL_DMA, 0, corec57d_new },
Loading