[igt-dev] [PATCH 1/4] lib/amdgpu: rename function parameter

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Jan 5 14:29:01 UTC 2023


Hi Vitaly,

On 2023-01-04 at 19:53:17 -0500, vitaly.prosyak at amd.com wrote:
> From: Vitaly Prosyak <vitaly.prosyak at amd.com>
> 
> No functional change just cosmetic.
> Rename flags parameter to alloc_flags for clarity.
> There are mapping flags.
--^
Maybe put these in same sentence ?

> 
> Signed-off-by: Vitaly Prosyak <vitaly.prosyak at amd.com>
> ---
>  lib/amdgpu/amd_memory.c | 10 ++++------
>  lib/amdgpu/amd_memory.h |  2 +-
>  2 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/amdgpu/amd_memory.c b/lib/amdgpu/amd_memory.c
> index 0aa400ac8..e3432a954 100644
> --- a/lib/amdgpu/amd_memory.c
> +++ b/lib/amdgpu/amd_memory.c
> @@ -41,7 +41,7 @@
>  				      uint64_t size,
>  				      uint64_t alignment,
>  				      uint32_t type,
> -				      uint64_t flags,
> +				      uint64_t alloc_flags,
>  				      uint64_t *vmc_addr,
>  				      amdgpu_va_handle *va_handle)
>  {
> @@ -49,7 +49,7 @@
>  		.alloc_size = size,
>  		.phys_alignment = alignment,
>  		.preferred_heap = type,
> -		.flags = flags,
> +		.flags = alloc_flags,
>  	};
>  	amdgpu_bo_handle buf_handle;
>  	int r;
> @@ -57,10 +57,8 @@
>  	r = amdgpu_bo_alloc(device_handle, &req, &buf_handle);
>  	igt_assert_eq(r, 0);
>  
> -	r = amdgpu_va_range_alloc(device_handle,
> -				  amdgpu_gpu_va_range_general,
> -				  size, alignment, 0, vmc_addr,
> -				  va_handle, 0);
> +	r = amdgpu_va_range_alloc(device_handle, amdgpu_gpu_va_range_general,
> +				   size, alignment, 0, vmc_addr, va_handle, 0);

This is unrelated to description.

Regards,
Kamil

>  	igt_assert_eq(r, 0);
>  
>  	r = amdgpu_bo_va_op(buf_handle, 0, size, *vmc_addr, 0, AMDGPU_VA_OP_MAP);
> diff --git a/lib/amdgpu/amd_memory.h b/lib/amdgpu/amd_memory.h
> index 77fd099b0..a06f88923 100644
> --- a/lib/amdgpu/amd_memory.h
> +++ b/lib/amdgpu/amd_memory.h
> @@ -35,7 +35,7 @@ gpu_mem_alloc(amdgpu_device_handle device_handle,
>  				      uint64_t size,
>  				      uint64_t alignment,
>  				      uint32_t type,
> -				      uint64_t flags,
> +				      uint64_t alloc_flags,
>  				      uint64_t *vmc_addr,
>  				      amdgpu_va_handle *va_handle);
>  int
> -- 
> 2.25.1
> 


More information about the igt-dev mailing list