drm/amdgpu: correct clock gating settings on feature unsupported
authorEvan Quan <evan.quan@amd.com>
Tue, 25 May 2021 10:24:47 +0000 (18:24 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Jun 2021 04:18:22 +0000 (00:18 -0400)
commit754e9883d48c2e3a50c4d53c42905e25df3862c7
treec18d4abd56ae1705fc5179a29bf3fa1f17024084
parentadcf949e664a8b04df2fb8aa916892e58561653c
drm/amdgpu: correct clock gating settings on feature unsupported

Clock gating setting is still performed even when the corresponding
CG feature is not supported. And the tricky part is disablement is
actually performed no matter for enablement or disablement request.
That seems not logically right.
Considering HW should already properly take care of the CG state, we
will just skip the corresponding clock gating setting when the feature
is not supported.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/athub_v2_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c
drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c
drivers/gpu/drm/amd/amdgpu/smuio_v11_0.c