[PATCH 1/2] drm/amdgpu: add amdgpu.ttm_dma_allocation parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2018-01-25 07:50 AM, Chunming Zhou wrote:
> it will be used to set ttm dma allocation path.
> 
> Change-Id: I9fa936db751811779cea66598bba0b8cf4cfd869
> Signed-off-by: Chunming Zhou <david1.zhou at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h     | 1 +
>  drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 353186f3e58c..443bedb288e6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -128,6 +128,7 @@ extern int amdgpu_job_hang_limit;
>  extern int amdgpu_lbpw;
>  extern int amdgpu_compute_multipipe;
>  extern int amdgpu_gpu_recovery;
> +extern int amdgpu_ttm_dma_allocation;
>  
>  #ifdef CONFIG_DRM_AMDGPU_SI
>  extern int amdgpu_si_support;
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index d1a695864793..556135020c4d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -131,6 +131,7 @@ int amdgpu_job_hang_limit = 0;
>  int amdgpu_lbpw = -1;
>  int amdgpu_compute_multipipe = -1;
>  int amdgpu_gpu_recovery = -1; /* auto */
> +int amdgpu_ttm_dma_allocation = 0;
>  
>  MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
>  module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
> @@ -286,6 +287,9 @@ module_param_named(compute_multipipe, amdgpu_compute_multipipe, int, 0444);
>  MODULE_PARM_DESC(gpu_recovery, "Enable GPU recovery mechanism, (1 = enable, 0 = disable, -1 = auto");
>  module_param_named(gpu_recovery, amdgpu_gpu_recovery, int, 0444);
>  
> +MODULE_PARM_DESC(ttm_dma_allocation, "Enable TTM dma allocation, (1 = enable, 0 = disable");
> +module_param_named(amdgpu_ttm_dma_allocation, amdgpu_ttm_dma_allocation, int, 0444);
> +
>  #ifdef CONFIG_DRM_AMDGPU_SI
>  
>  #if defined(CONFIG_DRM_RADEON) || defined(CONFIG_DRM_RADEON_MODULE)
> 

NAK from me as well.

This isn't something that the administrator/user needs to decide.
Somebody needs to figure out the exact conditions under which the DMA
allocation path is needed, and make the code match those.


In general, amdgpu already has way too many module parameters. If we
keep adding more like this, it'll become completely unmanageable soon.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux