diff options
author | Huang Rui <ray.huang@amd.com> | 2019-01-30 19:50:04 +0800 |
---|---|---|
committer | Huang Rui <ray.huang@amd.com> | 2019-01-31 11:06:27 +0800 |
commit | 1cf54d615cb667ba510c01310731016252ca6ff8 (patch) | |
tree | 9936c599adcff1bb70896f3a1d0ebe036e420b11 | |
parent | c8dcca53157a47f657c25a5d2c171226b6828752 (diff) |
drm/amdgpu: fix the incorrect external id for raven series
This patch fixes the incorrect external id that kernel reports to user mode
driver. Raven2's rev_id is starts from 0x8, so its external id (0x81) should
start from rev_id + 0x79 (0x81 - 0x8). And Raven's rev_id should be 0x21 while
rev_id == 1.
Reported-by: Crystal Jin <Crystal.Jin@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc15.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index a741913b3dee..189a3b89282a 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -698,11 +698,13 @@ static int soc15_common_early_init(void *handle) break; case CHIP_RAVEN: if (adev->rev_id >= 0x8) - adev->external_rev_id = adev->rev_id + 0x81; + adev->external_rev_id = adev->rev_id + 0x79; else if (adev->pdev->device == 0x15d8) adev->external_rev_id = adev->rev_id + 0x41; + else if (adev->rev_id == 1) + adev->external_rev_id = adev->rev_id + 0x20; else - adev->external_rev_id = 0x1; + adev->external_rev_id = adev->rev_id + 0x01; if (adev->rev_id >= 0x8) { adev->cg_flags = AMD_CG_SUPPORT_GFX_MGCG | |