diff --git a/target/linux/rockchip/patches-6.6/034-01-v6.7-drm-gpuvm-rename-struct-drm_gpuva_manager-to-struct.patch b/target/linux/rockchip/patches-6.6/034-01-v6.7-drm-gpuvm-rename-struct-drm_gpuva_manager-to-struct.patch index 72a2eb931b..a9449ac064 100644 --- a/target/linux/rockchip/patches-6.6/034-01-v6.7-drm-gpuvm-rename-struct-drm_gpuva_manager-to-struct.patch +++ b/target/linux/rockchip/patches-6.6/034-01-v6.7-drm-gpuvm-rename-struct-drm_gpuva_manager-to-struct.patch @@ -3618,7 +3618,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-2-dakr@ op->va.addr, op->va.range); if (IS_ERR(op->ops)) { -@@ -1836,11 +1836,11 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1838,11 +1838,11 @@ nouveau_uvmm_init(struct nouveau_uvmm *u uvmm->kernel_managed_addr = kernel_managed_addr; uvmm->kernel_managed_size = kernel_managed_size; @@ -3635,7 +3635,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-2-dakr@ ret = nvif_vmm_ctor(&cli->mmu, "uvmm", cli->vmm.vmm.object.oclass, RAW, -@@ -1855,7 +1855,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1857,7 +1857,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u return 0; out_free_gpuva_mgr: @@ -3644,7 +3644,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-2-dakr@ out_unlock: mutex_unlock(&cli->mutex); return ret; -@@ -1877,7 +1877,7 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1879,7 +1879,7 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u wait_event(entity->job.wq, list_empty(&entity->job.list.head)); nouveau_uvmm_lock(uvmm); @@ -3653,7 +3653,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-2-dakr@ struct nouveau_uvma *uvma = uvma_from_va(va); struct drm_gem_object *obj = va->gem.obj; -@@ -1910,7 +1910,7 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1912,7 +1912,7 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u mutex_lock(&cli->mutex); nouveau_vmm_fini(&uvmm->vmm); diff --git a/target/linux/rockchip/patches-6.6/034-03-v6.7-drm-nouveau-uvmm-rename-umgr-to-base-.patch b/target/linux/rockchip/patches-6.6/034-03-v6.7-drm-nouveau-uvmm-rename-umgr-to-base-.patch index 85762381d1..fcd5a8b09d 100644 --- a/target/linux/rockchip/patches-6.6/034-03-v6.7-drm-nouveau-uvmm-rename-umgr-to-base-.patch +++ b/target/linux/rockchip/patches-6.6/034-03-v6.7-drm-nouveau-uvmm-rename-umgr-to-base-.patch @@ -122,7 +122,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-4-dakr@ op->ops = NULL; goto unwind_continue; } -@@ -1404,7 +1404,7 @@ unwind: +@@ -1406,7 +1406,7 @@ unwind: break; } @@ -131,7 +131,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-4-dakr@ op->ops = NULL; op->reg = NULL; } -@@ -1509,7 +1509,7 @@ nouveau_uvmm_bind_job_free_work_fn(struc +@@ -1511,7 +1511,7 @@ nouveau_uvmm_bind_job_free_work_fn(struc } if (!IS_ERR_OR_NULL(op->ops)) @@ -140,7 +140,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-4-dakr@ if (obj) drm_gem_object_put(obj); -@@ -1836,7 +1836,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1838,7 +1838,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u uvmm->kernel_managed_addr = kernel_managed_addr; uvmm->kernel_managed_size = kernel_managed_size; @@ -149,7 +149,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-4-dakr@ NOUVEAU_VA_SPACE_START, NOUVEAU_VA_SPACE_END, kernel_managed_addr, kernel_managed_size, -@@ -1855,7 +1855,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1857,7 +1857,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u return 0; out_free_gpuva_mgr: @@ -158,7 +158,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-4-dakr@ out_unlock: mutex_unlock(&cli->mutex); return ret; -@@ -1877,11 +1877,11 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1879,11 +1879,11 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u wait_event(entity->job.wq, list_empty(&entity->job.list.head)); nouveau_uvmm_lock(uvmm); @@ -172,7 +172,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20230920144343.64830-4-dakr@ continue; drm_gpuva_remove(va); -@@ -1910,7 +1910,7 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1912,7 +1912,7 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u mutex_lock(&cli->mutex); nouveau_vmm_fini(&uvmm->vmm); diff --git a/target/linux/rockchip/patches-6.6/034-05-v6.8-drm-gpuvm-convert-WARN-to-drm_WARN-variants.patch b/target/linux/rockchip/patches-6.6/034-05-v6.8-drm-gpuvm-convert-WARN-to-drm_WARN-variants.patch index 64e1719688..7735ee5e6d 100644 --- a/target/linux/rockchip/patches-6.6/034-05-v6.8-drm-gpuvm-convert-WARN-to-drm_WARN-variants.patch +++ b/target/linux/rockchip/patches-6.6/034-05-v6.8-drm-gpuvm-convert-WARN-to-drm_WARN-variants.patch @@ -116,7 +116,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-2-dakr@ --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c -@@ -1808,6 +1808,7 @@ int +@@ -1810,6 +1810,7 @@ int nouveau_uvmm_init(struct nouveau_uvmm *uvmm, struct nouveau_cli *cli, u64 kernel_managed_addr, u64 kernel_managed_size) { @@ -124,7 +124,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-2-dakr@ int ret; u64 kernel_managed_end = kernel_managed_addr + kernel_managed_size; -@@ -1836,7 +1837,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1838,7 +1839,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u uvmm->kernel_managed_addr = kernel_managed_addr; uvmm->kernel_managed_size = kernel_managed_size; diff --git a/target/linux/rockchip/patches-6.6/034-07-v6.8-drm-nouveau-make-use-of-drm_gpuvm_range_valid.patch b/target/linux/rockchip/patches-6.6/034-07-v6.8-drm-nouveau-make-use-of-drm_gpuvm_range_valid.patch index 3d790e64b5..09f616bde0 100644 --- a/target/linux/rockchip/patches-6.6/034-07-v6.8-drm-nouveau-make-use-of-drm_gpuvm_range_valid.patch +++ b/target/linux/rockchip/patches-6.6/034-07-v6.8-drm-nouveau-make-use-of-drm_gpuvm_range_valid.patch @@ -42,7 +42,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-5-dakr@ return -EINVAL; return 0; -@@ -1834,9 +1822,6 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1836,9 +1824,6 @@ nouveau_uvmm_init(struct nouveau_uvmm *u goto out_unlock; } diff --git a/target/linux/rockchip/patches-6.6/034-08-v6.8-drm-gpuvm-add-common-dma-resv-per-struct-drm_gpuvm.patch b/target/linux/rockchip/patches-6.6/034-08-v6.8-drm-gpuvm-add-common-dma-resv-per-struct-drm_gpuvm.patch index c5626509e2..b50d1d09e9 100644 --- a/target/linux/rockchip/patches-6.6/034-08-v6.8-drm-gpuvm-add-common-dma-resv-per-struct-drm_gpuvm.patch +++ b/target/linux/rockchip/patches-6.6/034-08-v6.8-drm-gpuvm-add-common-dma-resv-per-struct-drm_gpuvm.patch @@ -118,7 +118,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-6-dakr@ --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c -@@ -1797,8 +1797,9 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1799,8 +1799,9 @@ nouveau_uvmm_init(struct nouveau_uvmm *u u64 kernel_managed_addr, u64 kernel_managed_size) { struct drm_device *drm = cli->drm->dev; @@ -129,7 +129,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-6-dakr@ mutex_init(&uvmm->mutex); dma_resv_init(&uvmm->resv); -@@ -1822,11 +1823,19 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1824,11 +1825,19 @@ nouveau_uvmm_init(struct nouveau_uvmm *u goto out_unlock; } diff --git a/target/linux/rockchip/patches-6.6/034-09-v6.8-drm-nouveau-make-use-of-the-GPUVM-s-shared-dma-resv.patch b/target/linux/rockchip/patches-6.6/034-09-v6.8-drm-nouveau-make-use-of-the-GPUVM-s-shared-dma-resv.patch index 90d3fecf42..160be4aba4 100644 --- a/target/linux/rockchip/patches-6.6/034-09-v6.8-drm-nouveau-make-use-of-the-GPUVM-s-shared-dma-resv.patch +++ b/target/linux/rockchip/patches-6.6/034-09-v6.8-drm-nouveau-make-use-of-the-GPUVM-s-shared-dma-resv.patch @@ -96,7 +96,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-7-dakr@ } --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c -@@ -1802,7 +1802,6 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1804,7 +1804,6 @@ nouveau_uvmm_init(struct nouveau_uvmm *u int ret; mutex_init(&uvmm->mutex); @@ -104,7 +104,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-7-dakr@ mt_init_flags(&uvmm->region_mt, MT_FLAGS_LOCK_EXTERN); mt_set_external_lock(&uvmm->region_mt, &uvmm->mutex); -@@ -1842,14 +1841,14 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1844,14 +1843,14 @@ nouveau_uvmm_init(struct nouveau_uvmm *u kernel_managed_addr, kernel_managed_size, NULL, 0, &cli->uvmm.vmm.vmm); if (ret) @@ -121,7 +121,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-7-dakr@ drm_gpuvm_destroy(&uvmm->base); out_unlock: mutex_unlock(&cli->mutex); -@@ -1907,6 +1906,4 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1909,6 +1908,4 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u nouveau_vmm_fini(&uvmm->vmm); drm_gpuvm_destroy(&uvmm->base); mutex_unlock(&cli->mutex); diff --git a/target/linux/rockchip/patches-6.6/034-10-v6.8-drm-gpuvm-add-drm_gpuvm_flags-to-drm_gpuvm.patch b/target/linux/rockchip/patches-6.6/034-10-v6.8-drm-gpuvm-add-drm_gpuvm_flags-to-drm_gpuvm.patch index fd95b76b49..c86f2a8e98 100644 --- a/target/linux/rockchip/patches-6.6/034-10-v6.8-drm-gpuvm-add-drm_gpuvm_flags-to-drm_gpuvm.patch +++ b/target/linux/rockchip/patches-6.6/034-10-v6.8-drm-gpuvm-add-drm_gpuvm_flags-to-drm_gpuvm.patch @@ -48,7 +48,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-8-dakr@ gpuvm->r_obj = r_obj; --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c -@@ -1828,7 +1828,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1830,7 +1830,7 @@ nouveau_uvmm_init(struct nouveau_uvmm *u goto out_unlock; } diff --git a/target/linux/rockchip/patches-6.6/034-11-v6.8-drm-nouveau-separately-allocate-struct-nouveau_uvmm.patch b/target/linux/rockchip/patches-6.6/034-11-v6.8-drm-nouveau-separately-allocate-struct-nouveau_uvmm.patch index 7876d5dd0a..2b74ca2b0e 100644 --- a/target/linux/rockchip/patches-6.6/034-11-v6.8-drm-nouveau-separately-allocate-struct-nouveau_uvmm.patch +++ b/target/linux/rockchip/patches-6.6/034-11-v6.8-drm-nouveau-separately-allocate-struct-nouveau_uvmm.patch @@ -68,7 +68,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-9-dakr@ static inline struct nouveau_uvmm * --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c -@@ -1636,18 +1636,6 @@ err_free: +@@ -1638,18 +1638,6 @@ err_free: return ret; } @@ -87,7 +87,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-9-dakr@ static int nouveau_uvmm_vm_bind(struct nouveau_uvmm_bind_job_args *args) { -@@ -1793,17 +1781,25 @@ nouveau_uvmm_bo_unmap_all(struct nouveau +@@ -1795,17 +1783,25 @@ nouveau_uvmm_bo_unmap_all(struct nouveau } int @@ -119,7 +119,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-9-dakr@ mutex_lock(&cli->mutex); -@@ -1812,44 +1808,49 @@ nouveau_uvmm_init(struct nouveau_uvmm *u +@@ -1814,44 +1810,49 @@ nouveau_uvmm_init(struct nouveau_uvmm *u goto out_unlock; } @@ -180,7 +180,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-9-dakr@ out_unlock: mutex_unlock(&cli->mutex); return ret; -@@ -1864,9 +1865,6 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1866,9 +1867,6 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u struct nouveau_sched_entity *entity = &cli->sched_entity; struct drm_gpuva *va, *next; @@ -190,7 +190,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-9-dakr@ rmb(); /* for list_empty to work without lock */ wait_event(entity->job.wq, list_empty(&entity->job.list.head)); -@@ -1905,5 +1903,6 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1907,5 +1905,6 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u mutex_lock(&cli->mutex); nouveau_vmm_fini(&uvmm->vmm); drm_gpuvm_destroy(&uvmm->base); diff --git a/target/linux/rockchip/patches-6.6/034-12-v6.8-drm-gpuvm-reference-count-drm_gpuvm-structures.patch b/target/linux/rockchip/patches-6.6/034-12-v6.8-drm-gpuvm-reference-count-drm_gpuvm-structures.patch index 5c5d1d2f72..e3dd5fa46c 100644 --- a/target/linux/rockchip/patches-6.6/034-12-v6.8-drm-gpuvm-reference-count-drm_gpuvm-structures.patch +++ b/target/linux/rockchip/patches-6.6/034-12-v6.8-drm-gpuvm-reference-count-drm_gpuvm-structures.patch @@ -118,7 +118,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-10-dakr --- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c +++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c -@@ -1780,6 +1780,18 @@ nouveau_uvmm_bo_unmap_all(struct nouveau +@@ -1782,6 +1782,18 @@ nouveau_uvmm_bo_unmap_all(struct nouveau } } @@ -137,7 +137,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-10-dakr int nouveau_uvmm_ioctl_vm_init(struct drm_device *dev, void *data, -@@ -1830,7 +1842,7 @@ nouveau_uvmm_ioctl_vm_init(struct drm_de +@@ -1832,7 +1844,7 @@ nouveau_uvmm_ioctl_vm_init(struct drm_de NOUVEAU_VA_SPACE_END, init->kernel_managed_addr, init->kernel_managed_size, @@ -146,7 +146,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-10-dakr /* GPUVM takes care from here on. */ drm_gem_object_put(r_obj); -@@ -1849,8 +1861,7 @@ nouveau_uvmm_ioctl_vm_init(struct drm_de +@@ -1851,8 +1863,7 @@ nouveau_uvmm_ioctl_vm_init(struct drm_de return 0; out_gpuvm_fini: @@ -156,7 +156,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-10-dakr out_unlock: mutex_unlock(&cli->mutex); return ret; -@@ -1902,7 +1913,6 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u +@@ -1904,7 +1915,6 @@ nouveau_uvmm_fini(struct nouveau_uvmm *u mutex_lock(&cli->mutex); nouveau_vmm_fini(&uvmm->vmm); diff --git a/target/linux/rockchip/patches-6.6/034-13-v6.8-drm-gpuvm-add-an-abstraction-for-a-VM-BO-combination.patch b/target/linux/rockchip/patches-6.6/034-13-v6.8-drm-gpuvm-add-an-abstraction-for-a-VM-BO-combination.patch index 37aa2f633d..33eb4845f7 100644 --- a/target/linux/rockchip/patches-6.6/034-13-v6.8-drm-gpuvm-add-an-abstraction-for-a-VM-BO-combination.patch +++ b/target/linux/rockchip/patches-6.6/034-13-v6.8-drm-gpuvm-add-an-abstraction-for-a-VM-BO-combination.patch @@ -645,7 +645,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-11-dakr } ret = bind_validate_op(job, op); -@@ -1352,7 +1367,7 @@ nouveau_uvmm_bind_job_submit(struct nouv +@@ -1354,7 +1369,7 @@ nouveau_uvmm_bind_job_submit(struct nouv case OP_UNMAP_SPARSE: case OP_MAP: case OP_UNMAP: @@ -654,7 +654,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-11-dakr break; default: break; -@@ -1499,6 +1514,12 @@ nouveau_uvmm_bind_job_free_work_fn(struc +@@ -1501,6 +1516,12 @@ nouveau_uvmm_bind_job_free_work_fn(struc if (!IS_ERR_OR_NULL(op->ops)) drm_gpuva_ops_free(&uvmm->base, op->ops); @@ -667,7 +667,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-11-dakr if (obj) drm_gem_object_put(obj); } -@@ -1752,15 +1773,18 @@ void +@@ -1754,15 +1775,18 @@ void nouveau_uvmm_bo_map_all(struct nouveau_bo *nvbo, struct nouveau_mem *mem) { struct drm_gem_object *obj = &nvbo->bo.base; @@ -690,7 +690,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231108001259.15123-11-dakr } } -@@ -1768,15 +1792,18 @@ void +@@ -1770,15 +1794,18 @@ void nouveau_uvmm_bo_unmap_all(struct nouveau_bo *nvbo) { struct drm_gem_object *obj = &nvbo->bo.base; diff --git a/target/linux/rockchip/patches-6.6/034-15-v6.8-drm-nouveau-use-GPUVM-common-infrastructure.patch b/target/linux/rockchip/patches-6.6/034-15-v6.8-drm-nouveau-use-GPUVM-common-infrastructure.patch index f90fc12777..0b9e8a2fe0 100644 --- a/target/linux/rockchip/patches-6.6/034-15-v6.8-drm-nouveau-use-GPUVM-common-infrastructure.patch +++ b/target/linux/rockchip/patches-6.6/034-15-v6.8-drm-nouveau-use-GPUVM-common-infrastructure.patch @@ -338,7 +338,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@r list_for_each_op(op, &bind_job->ops) { switch (op->op) { case OP_MAP_SPARSE: -@@ -1290,55 +1337,13 @@ nouveau_uvmm_bind_job_submit(struct nouv +@@ -1290,57 +1337,13 @@ nouveau_uvmm_bind_job_submit(struct nouv } } @@ -376,6 +376,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@r - - drm_gpuva_for_each_op(va_op, op->ops) { - struct drm_gem_object *obj = op_gem_obj(va_op); +- struct nouveau_bo *nvbo; - - if (unlikely(!obj)) - continue; @@ -386,8 +387,9 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@r - if (unlikely(va_op->op == DRM_GPUVA_OP_UNMAP)) - continue; - -- ret = nouveau_bo_validate(nouveau_gem_object(obj), -- true, false); +- nvbo = nouveau_gem_object(obj); +- nouveau_bo_placement_set(nvbo, nvbo->valid_domains, 0); +- ret = nouveau_bo_validate(nvbo, true, false); - if (ret) { - op = list_last_op(&bind_job->ops); - goto unwind; @@ -400,7 +402,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@r } } -@@ -1413,21 +1418,17 @@ unwind: +@@ -1415,21 +1418,17 @@ unwind: } nouveau_uvmm_unlock(uvmm); @@ -428,7 +430,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@r } static struct dma_fence * -@@ -1815,8 +1816,17 @@ nouveau_uvmm_free(struct drm_gpuvm *gpuv +@@ -1817,8 +1816,18 @@ nouveau_uvmm_free(struct drm_gpuvm *gpuv kfree(uvmm); } @@ -437,6 +439,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20231113221202.7203-1-dakr@r +{ + struct nouveau_bo *nvbo = nouveau_gem_object(vm_bo->obj); + ++ nouveau_bo_placement_set(nvbo, nvbo->valid_domains, 0); + return nouveau_bo_validate(nvbo, true, false); +} + diff --git a/target/linux/rockchip/patches-6.6/034-20-v6.7-drm-sched-Convert-the-GPU-scheduler-to-variable-number-of.patch b/target/linux/rockchip/patches-6.6/034-20-v6.7-drm-sched-Convert-the-GPU-scheduler-to-variable-number-of.patch index 6ae0e54f5e..2be6dad657 100644 --- a/target/linux/rockchip/patches-6.6/034-20-v6.7-drm-sched-Convert-the-GPU-scheduler-to-variable-number-of.patch +++ b/target/linux/rockchip/patches-6.6/034-20-v6.7-drm-sched-Convert-the-GPU-scheduler-to-variable-number-of.patch @@ -63,7 +63,7 @@ Link: https://lore.kernel.org/r/20231023032251.164775-1-luben.tuikov@amd.com ring->sched_score, ring->name, --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c -@@ -328,8 +328,8 @@ void amdgpu_job_stop_all_jobs_on_sched(s +@@ -327,8 +327,8 @@ void amdgpu_job_stop_all_jobs_on_sched(s int i; /* Signal all jobs not yet scheduled */ diff --git a/target/linux/rockchip/patches-6.6/034-21-v6.8-drm-sched-Add-drm_sched_wqueue_-helpers.patch b/target/linux/rockchip/patches-6.6/034-21-v6.8-drm-sched-Add-drm_sched_wqueue_-helpers.patch index 2385d67417..184bd7e9f5 100644 --- a/target/linux/rockchip/patches-6.6/034-21-v6.8-drm-sched-Add-drm_sched_wqueue_-helpers.patch +++ b/target/linux/rockchip/patches-6.6/034-21-v6.8-drm-sched-Add-drm_sched_wqueue_-helpers.patch @@ -92,7 +92,7 @@ Signed-off-by: Luben Tuikov --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c -@@ -4613,7 +4613,7 @@ bool amdgpu_device_has_job_running(struc +@@ -4614,7 +4614,7 @@ bool amdgpu_device_has_job_running(struc for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; @@ -101,7 +101,7 @@ Signed-off-by: Luben Tuikov continue; spin_lock(&ring->sched.job_list_lock); -@@ -4755,7 +4755,7 @@ int amdgpu_device_pre_asic_reset(struct +@@ -4756,7 +4756,7 @@ int amdgpu_device_pre_asic_reset(struct for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; @@ -110,7 +110,7 @@ Signed-off-by: Luben Tuikov continue; /* Clear job fence from fence drv to avoid force_completion -@@ -5295,7 +5295,7 @@ int amdgpu_device_gpu_recover(struct amd +@@ -5296,7 +5296,7 @@ int amdgpu_device_gpu_recover(struct amd for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = tmp_adev->rings[i]; @@ -119,7 +119,7 @@ Signed-off-by: Luben Tuikov continue; drm_sched_stop(&ring->sched, job ? &job->base : NULL); -@@ -5370,7 +5370,7 @@ skip_hw_reset: +@@ -5371,7 +5371,7 @@ skip_hw_reset: for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = tmp_adev->rings[i]; @@ -128,7 +128,7 @@ Signed-off-by: Luben Tuikov continue; drm_sched_start(&ring->sched, true); -@@ -5696,7 +5696,7 @@ pci_ers_result_t amdgpu_pci_error_detect +@@ -5697,7 +5697,7 @@ pci_ers_result_t amdgpu_pci_error_detect for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i]; @@ -137,7 +137,7 @@ Signed-off-by: Luben Tuikov continue; drm_sched_stop(&ring->sched, NULL); -@@ -5824,7 +5824,7 @@ void amdgpu_pci_resume(struct pci_dev *p +@@ -5825,7 +5825,7 @@ void amdgpu_pci_resume(struct pci_dev *p for (i = 0; i < AMDGPU_MAX_RINGS; ++i) { struct amdgpu_ring *ring = adev->rings[i];