[PATCH 1/3] drm/amdkfd: device pgmap owner at the svm migrate init
Rodrigo Siqueira
Rodrigo.Siqueira at amd.com
Wed May 5 22:36:09 UTC 2021
On 05/05, Alex Sierra wrote:
> pgmap owner member at the svm migrate init could be referenced
> to either adev or hive, depending on device topology.
>
> Signed-off-by: Alex Sierra <alex.sierra at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> index 6b810863f6ba..21d92de235be 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
> @@ -426,7 +426,7 @@ svm_migrate_vma_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
> migrate.start = start;
> migrate.end = end;
> migrate.flags = MIGRATE_VMA_SELECT_SYSTEM;
> - migrate.pgmap_owner = adev;
> + migrate.pgmap_owner = (adev->hive)?(void *)adev->hive:(void *)adev;
I think you missed the spaces around "?" and ":" in this patch.
Thanks
>
> size = 2 * sizeof(*migrate.src) + sizeof(uint64_t) + sizeof(dma_addr_t);
> size *= npages;
> @@ -641,7 +641,7 @@ svm_migrate_vma_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
> migrate.start = start;
> migrate.end = end;
> migrate.flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE;
> - migrate.pgmap_owner = adev;
> + migrate.pgmap_owner = (adev->hive)?(void *)adev->hive:(void *)adev;
>
> size = 2 * sizeof(*migrate.src) + sizeof(uint64_t) + sizeof(dma_addr_t);
> size *= npages;
> @@ -907,7 +907,7 @@ int svm_migrate_init(struct amdgpu_device *adev)
> pgmap->range.start = res->start;
> pgmap->range.end = res->end;
> pgmap->ops = &svm_migrate_pgmap_ops;
> - pgmap->owner = adev;
> + pgmap->owner = (adev->hive)?adev->hive:adev;
> pgmap->flags = MIGRATE_VMA_SELECT_DEVICE_PRIVATE;
> r = devm_memremap_pages(adev->dev, pgmap);
> if (IS_ERR(r)) {
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CRodrigo.Siqueira%40amd.com%7Ccd057517621142c86d6d08d9100fd033%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637558482375385783%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=j2z4VJ8ZGKim3R5BxIOLNRwjj%2B6yanIKNd5JQp738P8%3D&reserved=0
--
Rodrigo Siqueira
https://siqueira.tech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20210505/83fb8bbb/attachment-0001.sig>
More information about the amd-gfx
mailing list