[PATCH] drm: Harmonize CIK ASIC support in radeon and amdgpu (v2)

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

 



On 11/04/17 08:21 AM, Felix Kuehling wrote:
> Provide convenient compile time and boot time options for selecting
> CIK ASIC support in either or both drivers.
> 
> v2: git add missing files
> 
> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>

[...]

> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 6238e2e..84d393d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -109,6 +109,11 @@
>  int amdgpu_pos_buf_per_se = 0;
>  int amdgpu_cntl_sb_buf_per_se = 0;
>  int amdgpu_param_buf_per_se = 0;
> +#ifdef CONFIG_DRM_AMDGPU_CIK_ENABLED
> +int amdgpu_enable_cik = 1;
> +#else
> +int amdgpu_enable_cik = 0;
> +#endif
>  
>  MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
>  module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
> @@ -234,6 +239,10 @@
>  MODULE_PARM_DESC(param_buf_per_se, "the size of Off-Chip Pramater Cache per Shader Engine (default depending on gfx)");
>  module_param_named(param_buf_per_se, amdgpu_param_buf_per_se, int, 0444);
>  
> +#ifdef DRM_AMDGPU_CIK
> +MODULE_PARAM_DESC(enable_cik, "Enable CIK support");
> +module_param_named(enable_cik, amdgpu_enable_cik, int, 0444);
> +#endif

One issue with this per-driver enable_cik option is that if the user
only enables it in the driver where it's disabled by default, without
also disabling it in the driver where it's enabled by default, it's back
to the current situation where both drivers try to use the same GPUs,
and it's up to chance which one actually gets to.

That's why I was thinking about also having a shared command line option
respected by both drivers, e.g. amd_cik_driver=amdgpu/radeon . That
would be the preferred way to choose the driver at runtime.

Note that the per-driver enable_cik option will still be needed to be
able to override the kernel command line when manually loading the drivers.

Maybe there's a better way to handle both cases that I haven't thought of.


-- 
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