drm/amdgpu: enable smart shift on dGPU (v5)
authorSathishkumar S <sathishkumar.sundararaju@amd.com>
Wed, 26 May 2021 10:36:19 +0000 (16:06 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Jun 2021 02:55:38 +0000 (22:55 -0400)
commit3fa8f89d72073206cad0a8840ce65afa239911ad
tree27c4ca5fb354df0d694698acda314083ce482f89
parent19a1d9350be632ac2d82573c4497318179c22af5
drm/amdgpu: enable smart shift on dGPU (v5)

enable smart shift on dGPU if it is part of HG system and
the platform supports ATCS method to handle power shift.

V2: avoid psc updates in baco enter and exit (Lijo)
    fix alignment (Shashank)
V3: rebased on unified ATCS handling. (Alex)
V4: check for return value and warn on failed update (Shashank)
    return 0 if device does not support smart shift.  (Lizo)
V5: rebased on ATPX/ATCS structures global (Alex)

Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c