diff options
author | Felix Kuehling <Felix.Kuehling@amd.com> | 2017-04-20 21:41:34 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-25 01:22:50 +0300 |
commit | e7f78b69aba479728865ef3ec4229b372fc79f94 (patch) | |
tree | 2b83271bce7ba877bc81d2b26e414237d7c27d61 /drivers/gpu/drm/radeon/radeon_kms.c | |
parent | 9c2e1ae3ae2fe4759359d76f1e639e0eb4f79030 (diff) | |
download | linux-e7f78b69aba479728865ef3ec4229b372fc79f94.tar.xz |
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.
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>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 6a68d440bc44..f0abba3caac2 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -98,6 +98,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; |