summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorKent Russell <kent.russell@amd.com>2020-04-03 17:42:21 +0300
committerAlex Deucher <alexander.deucher@amd.com>2020-04-09 17:43:17 +0300
commit1ea2b260eb6306b31dd6a932693519dd35da3774 (patch)
treec281cde0b91c0f56344cd046cb628f341cc2bfdb /drivers/gpu
parent3adf175e2e74aaa0b416cbf322eb8664081a63a9 (diff)
downloadlinux-1ea2b260eb6306b31dd6a932693519dd35da3774.tar.xz
drm/amdgpu: Re-enable FRU check for most models v5
There is at least 1 VG20 DID that does not have an FRU, and trying to read that will cause a hang. For now, explicitly support reading the FRU for Arcturus and for the WKS VG20 DIDs, and skip for everything else. This re-enables serial number reporting for server cards v2: Add ASIC check v3: Don't default to true for pre-VG20 v4: Use DID instead of parsing the VBIOS v5: Sqaush in overflow warning fix Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
index bfe4259f9508..c7e55fe170bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c
@@ -20,6 +20,8 @@
* OTHER DEALINGS IN THE SOFTWARE.
*
*/
+#include <linux/pci.h>
+
#include "amdgpu.h"
#include "amdgpu_i2c.h"
#include "smu_v11_0_i2c.h"
@@ -31,8 +33,16 @@
bool is_fru_eeprom_supported(struct amdgpu_device *adev)
{
- /* TODO: Resolve supported ASIC type */
-
+ /* TODO: Gaming SKUs don't have the FRU EEPROM.
+ * Use this hack to address hangs on modprobe on gaming SKUs
+ * until a proper solution can be implemented by only supporting
+ * it on Arcturus, and the explicit chip IDs for VG20 Server cards
+ */
+ if ((adev->asic_type == CHIP_ARCTURUS) ||
+ (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a0) ||
+ (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a1) ||
+ (adev->asic_type == CHIP_VEGA20 && adev->pdev->device == 0x66a4))
+ return true;
return false;
}
@@ -75,7 +85,7 @@ int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
{
- unsigned char buff[32];
+ unsigned char buff[34];
int addrptr = 0, size = 0;
if (!is_fru_eeprom_supported(adev))