diff options
author | Huang Rui <[email protected]> | 2020-08-28 22:54:32 +0800 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2020-10-05 15:14:03 -0400 |
commit | fced3c3a4655a55db34b2729007dee554e4c2306 (patch) | |
tree | 568237bc4f94c11fbb532cca53f7ee9f3cdf4376 | |
parent | 026570e633105023a9b8ea2d296df5abd2bf1134 (diff) |
drm/amdgpu: skip sdma1 in nv_allowed_read_registers list for van gogh (v2)
Van gogh only has one sdma.
v2: use num_instances rather than APU flag
Signed-off-by: Huang Rui <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/nv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c index 622bcbb56e17..1a15422d3afd 100644 --- a/drivers/gpu/drm/amd/amdgpu/nv.c +++ b/drivers/gpu/drm/amd/amdgpu/nv.c @@ -254,7 +254,8 @@ static int nv_read_register(struct amdgpu_device *adev, u32 se_num, *value = 0; for (i = 0; i < ARRAY_SIZE(nv_allowed_read_registers); i++) { en = &nv_allowed_read_registers[i]; - if (reg_offset != + if ((i == 7 && (adev->sdma.num_instances == 1)) || /* some asics don't have SDMA1 */ + reg_offset != (adev->reg_offset[en->hwip][en->inst][en->seg] + en->reg_offset)) continue; |