amdgpu: Set cik/si_support to 1 by default if radeon isn't built
Subsystems (2)
PATCH 1/1 amdgpu: Set cik/si_support to 1 by default if radeon isn't built
From: Michel Dänzer <[email protected]>
It was required to explicitly set these parameters to 1, even if the radeon driver isn't built at all, which is not intuitive.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +14 -0
@@ -234,14 +234,28 @@ MODULE_PARM_DESC(param_buf_per_se, "the size of Off-Chip Pramater Cache per Shadmodule_param_named (param_buf_per_se, amdgpu_param_buf_per_se, int,0444 );#ifdef CONFIG_DRM_AMDGPU_SI + +#if defined(CONFIG_DRM_RADEON ) || defined(CONFIG_DRM_RADEON_MODULE )int amdgpu_si_support =0 ;MODULE_PARM_DESC (si_support,"SI support (1 = enabled, 0 = disabled (default))" ); +#else +int amdgpu_si_support =1 ; +MODULE_PARM_DESC (si_support,"SI support (1 = enabled (default), 0 = disabled)" ); +#endif +module_param_named (si_support, amdgpu_si_support, int,0444 );#endif #ifdef CONFIG_DRM_AMDGPU_CIK + +#if defined(CONFIG_DRM_RADEON ) || defined(CONFIG_DRM_RADEON_MODULE )int amdgpu_cik_support =0 ;MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled, 0 = disabled (default))" ); +#else +int amdgpu_cik_support =1 ; +MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled (default), 0 = disabled)" ); +#endif +module_param_named (cik_support, amdgpu_cik_support, int,0444 );#endif
Signature · 6 lines
2.13.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170630083607.28826-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Reviewed-byQuoted 7 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
It was required to explicitly set these parameters to 1, even if the radeon driver isn't built at all, which is not intuitive.
Reported-by Shawn Starr <[email protected]>Signed-off-by Michel Dänzer <[email protected]>
Quoted 40 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +14
-1@@ -234,14 +234,28 @@ MODULE_PARM_DESC(param_buf_per_se, "the size of Off-Chip Pramater Cache per Shadmodule_param_named (param_buf_per_se, amdgpu_param_buf_per_se, int,0444 );#ifdef CONFIG_DRM_AMDGPU_SI + +#if defined(CONFIG_DRM_RADEON ) || defined(CONFIG_DRM_RADEON_MODULE )int amdgpu_si_support =0 ;MODULE_PARM_DESC (si_support,"SI support (1 = enabled, 0 = disabled (default))" ); +#else +int amdgpu_si_support =1 ; +MODULE_PARM_DESC (si_support,"SI support (1 = enabled (default), 0 = disabled)" ); +#endif +module_param_named (si_support, amdgpu_si_support, int,0444 );#endif #ifdef CONFIG_DRM_AMDGPU_CIK + +#if defined(CONFIG_DRM_RADEON ) || defined(CONFIG_DRM_RADEON_MODULE )int amdgpu_cik_support =0 ;MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled, 0 = disabled (default))" ); +#else +int amdgpu_cik_support =1 ; +MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled (default), 0 = disabled)" ); +#endif +module_param_named (cik_support, amdgpu_cik_support, int,0444 );#endif --2.13.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Michel,
MODULE_PARM_DESC is "used to document arguments that the module can take. It takes two parameters: a variable name and a free form string describing that variable"
I think we should avoid changing document when config change.
How about changing it to something like the following example?
MODULE_PARM_DESC(pos_buf_per_se, "the size of Position Buffer per Shader Engine (default depending on gfx)");
Thanks,
Alex Bin
Quoted 34 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
It was required to explicitly set these parameters to 1, even if the radeon driver isn't built at all, which is not intuitive.
Reported-by Shawn Starr <[email protected]>Signed-off-by Michel Dänzer <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +9
-0@@ -234,14 +234,28 @@ MODULE_PARM_DESC(param_buf_per_se, "the size of Off-Chip Pramater Cache per Shadmodule_param_named (param_buf_per_se, amdgpu_param_buf_per_se, int,0444 );#ifdef CONFIG_DRM_AMDGPU_SI + +#if defined(CONFIG_DRM_RADEON ) || defined(CONFIG_DRM_RADEON_MODULE )int amdgpu_si_support =0 ;MODULE_PARM_DESC (si_support,"SI support (1 = enabled, 0 = disabled (default))" ); +#else +int amdgpu_si_support =1 ; +MODULE_PARM_DESC (si_support,"SI support (1 = enabled (default), 0 = disabled)" ); +#endif +module_param_named (si_support, amdgpu_si_support, int,0444 );#endif #ifdef CONFIG_DRM_AMDGPU_CIK + +#if defined(CONFIG_DRM_RADEON ) || defined(CONFIG_DRM_RADEON_MODULE )
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c MODULE_PARM_DESC(param_buf_per_se, "the size of Off-Chip Pramater Cache per Shad · line 261
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +5
-0int amdgpu_cik_support =0 ;MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled, 0 = disabled (default))" ); +#else +int amdgpu_cik_support =1 ; +MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled (default), 0 = disabled)" ); +#endif +module_param_named (cik_support, amdgpu_cik_support, int,0444 );#endif
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 9c8973c2-dd93-de86-78cc-1e3a6c23e785-5C7GfCeVMHo@public.gmane.org
Quoted 6 lines · axie
Hi Michel,
MODULE_PARM_DESCis "used to document arguments that the module can take. It takes two parameters: a variable name and a free form string describing that variable"
Quoted 6 lines
I think we should avoid changing document when config change.
How about changing it to something like the following example?
MODULE_PARM_DESC(pos_buf_per_se, "the size of Position Buffer per Shader Engine (default depending on gfx)");
What would be the benefit of that? With this patch, the parameter description as printed by modinfo always explicitly and accurately documents the default value.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx