drm/radeon: Add module param to control CIK support
Subsystems (2)
PATCH 1/5 drm/radeon: Add module param to control CIK support
If AMDGPU supports CIK, add a module parameter to control CIK support in radeon. It's off by default in radeon, while it will be on by default in AMDGPU.
--- drivers/gpu/drm/radeon/radeon.h | 4 ++++ drivers/gpu/drm/radeon/radeon_drv.c | 6 ++++++ drivers/gpu/drm/radeon/radeon_kms.c | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+)
drivers/gpu/drm/radeon/radeon.h +4 -0
@@ -116,6 +116,10 @@extern int radeon_uvd;extern int radeon_vce; +#ifdef CONFIG_DRM_AMDGPU_CIK +extern int radeon_cik_support; +#endif +/* * Copy from radeon_drv.h so we don't have to include both and have conflicting * symbol;
drivers/gpu/drm/radeon/radeon_drv.c +6 -0
@@ -301,6 +301,12 @@ static inline void radeon_unregister_atpx_handler(void) {}MODULE_PARM_DESC (vce,"vce enable/disable vce support (1 = enable, 0 = disable)" );module_param_named (vce, radeon_vce, int,0444 ); +#ifdef CONFIG_DRM_AMDGPU_CIK +int radeon_cik_support =0 ; +MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled, 0 = disabled (default))" ); +module_param_named (cik_support, radeon_cik_support, int,0444 ); +#endif +static struct pci_device_id pciidlist[] = { radeon_PCI_IDS };
drivers/gpu/drm/radeon/radeon_kms.c +18 -0
@@ -99,6 +99,24 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)struct radeon_device *rdev;int r, acpi_status; +#ifdef CONFIG_DRM_AMDGPU_CIK +if (!radeon_cik_support) { +switch (flags &RADEON_FAMILY_MASK ) { +case CHIP_KAVERI : +case CHIP_BONAIRE : +case CHIP_HAWAII : +case CHIP_KABINI : +case CHIP_MULLINS : +dev_info (dev->dev, +"CIK support provided by amdgpu.\n" ); +dev_info (dev->dev, +"Use radeon.cik_support=1 amdgpu.cik_support=0 to override.\n" + ); +return -ENODEV ; + } + } +#endif + rdev =kzalloc (sizeof (struct radeon_device ),GFP_KERNEL );if (rdev ==NULL ) {return -ENOMEM ;
Signature · 6 lines
1.9.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): 1495143874-10874-1-git-send-email-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org
PATCH 2/5 drm/amdgpu: Add module param to control CIK support
If AMDGPU supports CIK, add a module parameter to control CIK support. It's on by default in AMDGPU, while it is off by default in radeon.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 15 +++++++++++++++ 3 files changed, 25 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +4 -0
@@ -114,6 +114,10 @@extern int amdgpu_param_buf_per_se;extern int amdgpu_job_hang_limit; +#ifdef CONFIG_DRM_AMDGPU_CIK +extern int amdgpu_cik_support; +#endif +#define AMDGPU_DEFAULT_GTT_SIZE_MB 3072ULL/* 3GB by default */ #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000#define AMDGPU_MAX_USEC_TIMEOUT 100000/* 100 ms */
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +6 -0
@@ -241,6 +241,12 @@MODULE_PARM_DESC (job_hang_limit,"how much time allow a job hang and not drop it (default 0)" );module_param_named (job_hang_limit, amdgpu_job_hang_limit, int ,0444 ); +#ifdef CONFIG_DRM_AMDGPU_CIK +int amdgpu_cik_support =1 ; +MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled (default), 0 = disabled)" ); +module_param_named (cik_support, amdgpu_cik_support, int,0444 ); +#endif +static const struct pci_device_id pciidlist[] = { #ifdef CONFIG_DRM_AMDGPU_SI
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +15 -0
@@ -88,6 +88,21 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)struct amdgpu_device *adev;int r, acpi_status; +#ifdef CONFIG_DRM_AMDGPU_CIK +if (!amdgpu_cik_support) { +switch (flags &AMD_ASIC_MASK ) { +case CHIP_KAVERI : +case CHIP_BONAIRE : +case CHIP_HAWAII : +case CHIP_KABINI : +case CHIP_MULLINS : +dev_info (dev->dev, +"CIK support disabled by module param\n" ); +return -ENODEV ; + } + } +#endif + adev =kzalloc (sizeof (struct amdgpu_device ),GFP_KERNEL );if (adev ==NULL ) {return -ENOMEM ;
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/5 drm/radeon: Add module param to control SI support
In reply to a message not in the archiveIf AMDGPU supports SI, add a module parameter to control SI support in radeon. It's on by default in radeon, while it will be off by default in AMDGPU as long as SI support is experimental.
--- drivers/gpu/drm/radeon/radeon.h | 3 +++ drivers/gpu/drm/radeon/radeon_drv.c | 6 ++++++ drivers/gpu/drm/radeon/radeon_kms.c | 14 ++++++++++++++ 3 files changed, 23 insertions(+)
drivers/gpu/drm/radeon/radeon.h +3 -0
@@ -116,6 +116,9 @@extern int radeon_uvd;extern int radeon_vce; +#ifdef CONFIG_DRM_AMDGPU_SI +extern int radeon_si_support; +#endif #ifdef CONFIG_DRM_AMDGPU_CIK extern int radeon_cik_support;#endif
drivers/gpu/drm/radeon/radeon_drv.c +6 -0
@@ -301,6 +301,12 @@ static inline void radeon_unregister_atpx_handler(void) {}MODULE_PARM_DESC (vce,"vce enable/disable vce support (1 = enable, 0 = disable)" );module_param_named (vce, radeon_vce, int,0444 ); +#ifdef CONFIG_DRM_AMDGPU_SI +int radeon_si_support =1 ; +MODULE_PARM_DESC (si_support,"SI support (1 = enabled (default), 0 = disabled)" ); +module_param_named (si_support, radeon_si_support, int,0444 ); +#endif +#ifdef CONFIG_DRM_AMDGPU_CIK int radeon_cik_support =0 ;MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled, 0 = disabled (default))" );
drivers/gpu/drm/radeon/radeon_kms.c +14 -0
@@ -99,6 +99,20 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)struct radeon_device *rdev;int r, acpi_status; +#ifdef CONFIG_DRM_AMDGPU_SI +if (!radeon_si_support) { +switch (flags &RADEON_FAMILY_MASK ) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : +case CHIP_OLAND : +case CHIP_HAINAN : +dev_info (dev->dev, +"SI support disabled by module param\n" ); +return -ENODEV ; + } + } +#endif #ifdef CONFIG_DRM_AMDGPU_CIK if (!radeon_cik_support) {switch (flags &RADEON_FAMILY_MASK ) {
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/5 drm/amdgpu: Add module param to control SI support
In reply to a message not in the archiveIf AMDGPU supports SI, add a module parameter to control SI support. It's off by default in AMDGPU as long as SI suppost is experimental, while it is on by default in radeon.
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +3 -0
@@ -114,6 +114,9 @@extern int amdgpu_param_buf_per_se;extern int amdgpu_job_hang_limit; +#ifdef CONFIG_DRM_AMDGPU_SI +extern int amdgpu_si_support; +#endif #ifdef CONFIG_DRM_AMDGPU_CIK extern int amdgpu_cik_support;#endif
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +6 -0
@@ -241,6 +241,12 @@MODULE_PARM_DESC (job_hang_limit,"how much time allow a job hang and not drop it (default 0)" );module_param_named (job_hang_limit, amdgpu_job_hang_limit, int ,0444 ); +#ifdef CONFIG_DRM_AMDGPU_SI +int amdgpu_si_support =1 ; +MODULE_PARM_DESC (si_support,"SI support (1 = enabled, 0 = disabled (default))" ); +module_param_named (si_support, amdgpu_si_support, int,0444 ); +#endif +#ifdef CONFIG_DRM_AMDGPU_CIK int amdgpu_cik_support =1 ;MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled (default), 0 = disabled)" );
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +17 -0
@@ -88,6 +88,23 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)struct amdgpu_device *adev;int r, acpi_status; +#ifdef CONFIG_DRM_AMDGPU_SI +if (!amdgpu_si_support) { +switch (flags &AMD_ASIC_MASK ) { +case CHIP_TAHITI : +case CHIP_PITCAIRN : +case CHIP_VERDE : +case CHIP_OLAND : +case CHIP_HAINAN : +dev_info (dev->dev, +"SI support provided by radeon.\n" ); +dev_info (dev->dev, +"Use radeon.si_support=0 amdgpu.si_support=1 to override.\n" + ); +return -ENODEV ; + } + } +#endif #ifdef CONFIG_DRM_AMDGPU_CIK if (!amdgpu_cik_support) {switch (flags &AMD_ASIC_MASK ) {
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 5/5 drm/amdgpu: Update Kconfig help for SI and CIK support
In reply to a message not in the archive--- drivers/gpu/drm/amd/amdgpu/Kconfig | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/Kconfig +12 -4
@@ -5,15 +5,23 @@ config DRM_AMDGPU_SI Choose this option if you want to enable experimental support for SI asics. + SI is already supported in radeon. Experimental support for SI + in amdgpu will be disabled by default and is still provided by + radeon. Use module options to override this: + + radeon.si_support=0 amdgpu.si_support=1 + config DRM_AMDGPU_CIK bool "Enable amdgpu support for CIK parts" depends on DRM_AMDGPU help - Choose this option if you want to enable experimental support - for CIK asics. + Choose this option if you want to enable support for CIK asics. + + CIK is already supported in radeon. If you enable this option, + support for CIK will be provided by amdgpu and disabled in + radeon by default. Use module options to override this: - CIK is already supported in radeon. CIK support in amdgpu - is for experimentation and testing. + radeon.cik_support=1 amdgpu.cik_support=0 config DRM_AMDGPU_USERPTR bool "Always enable userptr write support"
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 18.05.2017 um 23:44 schrieb Felix Kuehling:
Quoted 5 lines
If AMDGPU supports CIK, add a module parameter to control CIK support in radeon. It's off by default in radeon, while it will be on by default in AMDGPU.
Signed-off-by Felix Kuehling <[email protected]>
I'm not 100% sure if amdgpu should be the default for CIK either, but let's give that a try for now.
Patches are Reviewed-by: Christian König <[email protected]>.
Quoted 57 lines
--- drivers/gpu/drm/radeon/radeon.h | 4 ++++ drivers/gpu/drm/radeon/radeon_drv.c | 6 ++++++ drivers/gpu/drm/radeon/radeon_kms.c | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+)drivers/gpu/drm/radeon/radeon.h +4
-0@@ -116,6 +116,10 @@extern int radeon_uvd;extern int radeon_vce; +#ifdef CONFIG_DRM_AMDGPU_CIK +extern int radeon_cik_support; +#endif +/* * Copy from radeon_drv.h so we don't have to include both and have conflicting * symbol; drivers/gpu/drm/radeon/radeon_drv.c +6
-0@@ -301,6 +301,12 @@ static inline void radeon_unregister_atpx_handler(void) {}MODULE_PARM_DESC (vce,"vce enable/disable vce support (1 = enable, 0 = disable)" );module_param_named (vce, radeon_vce, int,0444 ); +#ifdef CONFIG_DRM_AMDGPU_CIK +int radeon_cik_support =0 ; +MODULE_PARM_DESC (cik_support,"CIK support (1 = enabled, 0 = disabled (default))" ); +module_param_named (cik_support, radeon_cik_support, int,0444 ); +#endif +static struct pci_device_id pciidlist[] = { radeon_PCI_IDS };drivers/gpu/drm/radeon/radeon_kms.c +11
-0@@ -99,6 +99,24 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)struct radeon_device *rdev;int r, acpi_status; +#ifdef CONFIG_DRM_AMDGPU_CIK +if (!radeon_cik_support) { +switch (flags &RADEON_FAMILY_MASK ) { +case CHIP_KAVERI : +case CHIP_BONAIRE : +case CHIP_HAWAII : +case CHIP_KABINI : +case CHIP_MULLINS : +dev_info (dev->dev, +"CIK support provided by amdgpu.\n" ); + dev_info(dev->dev,
drivers/gpu/drm/radeon/radeon_kms.c int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) · line 122
Quoted 10 lines
drivers/gpu/drm/radeon/radeon_kms.c +7
-0+"Use radeon.cik_support=1 amdgpu.cik_support=0 to override.\n" + ); + return -ENODEV; + } + } +#endif + rdev =kzalloc (sizeof (struct radeon_device ),GFP_KERNEL );if (rdev ==NULL ) {return -ENOMEM ;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx