]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/radeon: Add module param to control SI support
authorFelix Kuehling <Felix.Kuehling@amd.com>
Mon, 5 Jun 2017 09:52:51 +0000 (18:52 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 8 Jun 2017 14:54:34 +0000 (10:54 -0400)
If 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.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Acked-by: Michel Dänzer <michel.daenzer@amd.com>
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon_drv.c
drivers/gpu/drm/radeon/radeon_kms.c

index 35e7c29f71e233a2dfd58b0e1dcf78050d0bae07..b9be8b30d89f0fa120bc373513222e1dd75a9d84 100644 (file)
@@ -116,6 +116,9 @@ extern int radeon_mst;
 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
index acb37386c9f8356e21f331dbe9355a6fd09d38d3..02df5135b4dee0993a592fe776dfa91e6301af4a 100644 (file)
@@ -295,6 +295,12 @@ module_param_named(uvd, radeon_uvd, int, 0444);
 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))");
index f0abba3caac29666004f4ceb03ee14e6ec3bcf33..dcb31633a72622edf0972fcd9a9547d33b50befc 100644 (file)
@@ -98,6 +98,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) {