[PATCH] drm/amdgpu/ttm: make some functions static

Russell, Kent Kent.Russell at amd.com
Fri Jul 5 20:22:30 UTC 2019


How would we handle that? Having a revert on amd-kfd-staging? We can ensure that amd-staging-dkms doesn't cherrypick it in, but since KFD merges, it would be more complicated.

Kent

KENT RUSSELL
Sr. Software Engineer | Linux Compute Kernel
1 Commerce Valley Drive East
Markham, ON L3T 7X6
O +(1) 289-695-2122 | Ext 72122
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Kuehling, Felix <Felix.Kuehling at amd.com>
Sent: Friday, July 5, 2019 2:59:31 PM
To: Alex Deucher; amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander
Subject: Re: [PATCH] drm/amdgpu/ttm: make some functions static

On 2019-07-05 1:12 p.m., Alex Deucher wrote:
> Noticed while reviewing the code.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>

We'll need to be careful not to merge this change on amd-kfd-staging and
amd-staging-dkms. On those branches, this function is called from
amdgpu_amdkfd_gpuvm.c.

Regards,
   Felix


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 14 +++++++-------
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h |  6 ------
>   2 files changed, 7 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index c9faa69cd677..d090106ef23b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -299,12 +299,12 @@ static struct drm_mm_node *amdgpu_find_mm_node(struct ttm_mem_reg *mem,
>    *
>    * @f: Returns the last fence if multiple jobs are submitted.
>    */
> -int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev,
> -                            struct amdgpu_copy_mem *src,
> -                            struct amdgpu_copy_mem *dst,
> -                            uint64_t size,
> -                            struct reservation_object *resv,
> -                            struct dma_fence **f)
> +static int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev,
> +                                   struct amdgpu_copy_mem *src,
> +                                   struct amdgpu_copy_mem *dst,
> +                                   uint64_t size,
> +                                   struct reservation_object *resv,
> +                                   struct dma_fence **f)
>   {
>        struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
>        struct drm_mm_node *src_mm, *dst_mm;
> @@ -949,7 +949,7 @@ static void amdgpu_ttm_tt_unpin_userptr(struct ttm_tt *ttm)
>   #endif
>   }
>
> -int amdgpu_ttm_gart_bind(struct amdgpu_device *adev,
> +static int amdgpu_ttm_gart_bind(struct amdgpu_device *adev,
>                                struct ttm_buffer_object *tbo,
>                                uint64_t flags)
>   {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> index c2b7669004ba..de89c218db26 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
> @@ -86,12 +86,6 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset,
>                       struct reservation_object *resv,
>                       struct dma_fence **fence, bool direct_submit,
>                       bool vm_needs_flush);
> -int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev,
> -                            struct amdgpu_copy_mem *src,
> -                            struct amdgpu_copy_mem *dst,
> -                            uint64_t size,
> -                            struct reservation_object *resv,
> -                            struct dma_fence **f);
>   int amdgpu_fill_buffer(struct amdgpu_bo *bo,
>                        uint32_t src_data,
>                        struct reservation_object *resv,
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190705/bb6c46aa/attachment-0001.html>


More information about the amd-gfx mailing list