Commit 3e3eb55e authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-misc-next-fixes-2024-05-16' of...

Merge tag 'drm-misc-next-fixes-2024-05-16' of https://gitlab.freedesktop.org/drm/misc/kernel

 into drm-next

drm-misc-next-fixes for v6.10-rc1:
- VM_BIND fix for nouveau.
- Lots of panthor fixes:
  * Fixes for panthor's heap logical block.
  * Reset on unrecoverable fault
  * Fix VM references.
  * Reset fix.
- xlnx compile and doc fixes.

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/54d2c8b9-8b04-45fc-b483-200ffac9d344@linux.intel.com
parents 5a5a10d9 959314c4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -272,6 +272,9 @@ nouveau_abi16_ioctl_getparam(ABI16_IOCTL_ARGS)
		getparam->value = (u64)ttm_resource_manager_usage(vram_mgr);
		break;
	}
	case NOUVEAU_GETPARAM_HAS_VMA_TILEMODE:
		getparam->value = 1;
		break;
	default:
		NV_PRINTK(dbg, cli, "unknown parameter %lld\n", getparam->param);
		return -EINVAL;
+19 −25
Original line number Diff line number Diff line
@@ -241,8 +241,7 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 domain,
	}

	nvbo->contig = !(tile_flags & NOUVEAU_GEM_TILE_NONCONTIG);
	if (!nouveau_cli_uvmm(cli) || internal) {
		/* for BO noVM allocs, don't assign kinds */

	if (cli->device.info.family >= NV_DEVICE_INFO_V0_FERMI) {
		nvbo->kind = (tile_flags & 0x0000ff00) >> 8;
		if (!nvif_mmu_kind_valid(mmu, nvbo->kind)) {
@@ -263,6 +262,7 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 domain,
	}
	nvbo->mode = tile_mode;

	if (!nouveau_cli_uvmm(cli) || internal) {
		/* Determine the desirable target GPU page size for the buffer. */
		for (i = 0; i < vmm->page_nr; i++) {
			/* Because we cannot currently allow VMM maps to fail
@@ -304,12 +304,6 @@ nouveau_bo_alloc(struct nouveau_cli *cli, u64 *size, int *align, u32 domain,
		}
		nvbo->page = vmm->page[pi].shift;
	} else {
		/* reject other tile flags when in VM mode. */
		if (tile_mode)
			return ERR_PTR(-EINVAL);
		if (tile_flags & ~NOUVEAU_GEM_TILE_NONCONTIG)
			return ERR_PTR(-EINVAL);

		/* Determine the desirable target GPU page size for the buffer. */
		for (i = 0; i < vmm->page_nr; i++) {
			/* Because we cannot currently allow VMM maps to fail
+2 −6
Original line number Diff line number Diff line
@@ -129,13 +129,8 @@ static void panthor_device_reset_work(struct work_struct *work)
	panthor_gpu_l2_power_on(ptdev);
	panthor_mmu_post_reset(ptdev);
	ret = panthor_fw_post_reset(ptdev);
	if (ret)
		goto out_dev_exit;

	atomic_set(&ptdev->reset.pending, 0);
	panthor_sched_post_reset(ptdev);

out_dev_exit:
	panthor_sched_post_reset(ptdev, ret != 0);
	drm_dev_exit(cookie);

	if (ret) {
@@ -293,6 +288,7 @@ static const struct panthor_exception_info panthor_exception_infos[] = {
	PANTHOR_EXCEPTION(ACTIVE),
	PANTHOR_EXCEPTION(CS_RES_TERM),
	PANTHOR_EXCEPTION(CS_CONFIG_FAULT),
	PANTHOR_EXCEPTION(CS_UNRECOVERABLE),
	PANTHOR_EXCEPTION(CS_ENDPOINT_FAULT),
	PANTHOR_EXCEPTION(CS_BUS_FAULT),
	PANTHOR_EXCEPTION(CS_INSTR_INVALID),
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,7 @@ enum drm_panthor_exception_type {
	DRM_PANTHOR_EXCEPTION_CS_RES_TERM = 0x0f,
	DRM_PANTHOR_EXCEPTION_MAX_NON_FAULT = 0x3f,
	DRM_PANTHOR_EXCEPTION_CS_CONFIG_FAULT = 0x40,
	DRM_PANTHOR_EXCEPTION_CS_UNRECOVERABLE = 0x41,
	DRM_PANTHOR_EXCEPTION_CS_ENDPOINT_FAULT = 0x44,
	DRM_PANTHOR_EXCEPTION_CS_BUS_FAULT = 0x48,
	DRM_PANTHOR_EXCEPTION_CS_INSTR_INVALID = 0x49,
+3 −2
Original line number Diff line number Diff line
@@ -453,7 +453,7 @@ panthor_fw_alloc_queue_iface_mem(struct panthor_device *ptdev,

	ret = panthor_kernel_bo_vmap(mem);
	if (ret) {
		panthor_kernel_bo_destroy(panthor_fw_vm(ptdev), mem);
		panthor_kernel_bo_destroy(mem);
		return ERR_PTR(ret);
	}

@@ -1134,7 +1134,7 @@ void panthor_fw_unplug(struct panthor_device *ptdev)
	panthor_fw_stop(ptdev);

	list_for_each_entry(section, &ptdev->fw->sections, node)
		panthor_kernel_bo_destroy(panthor_fw_vm(ptdev), section->mem);
		panthor_kernel_bo_destroy(section->mem);

	/* We intentionally don't call panthor_vm_idle() and let
	 * panthor_mmu_unplug() release the AS we acquired with
@@ -1142,6 +1142,7 @@ void panthor_fw_unplug(struct panthor_device *ptdev)
	 * state to keep the active_refcnt balanced.
	 */
	panthor_vm_put(ptdev->fw->vm);
	ptdev->fw->vm = NULL;

	panthor_gpu_power_off(ptdev, L2, ptdev->gpu_info.l2_present, 20000);
}
Loading