drm/amd/pm: consistent approach for smartshift
authorSathishkumar S <sathishkumar.sundararaju@amd.com>
Wed, 11 May 2022 11:48:31 +0000 (17:18 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 May 2022 18:20:55 +0000 (14:20 -0400)
commit494c1432542b33f8577bd59e5b084fd50bade6d0
tree570f50661a251f522aa5855a07a364069a8fd8df
parentf3106c9424138ffd33bf0b491707c8722b57c18d
drm/amd/pm: consistent approach for smartshift

create smartshift sysfs attributes from dGPU device even
on smartshift 1.0 platform to be consistent. Do not populate
the attributes on platforms that have APU only but not dGPU
or vice versa.

V2:
 avoid checking for the number of VGA/DISPLAY devices (Lijo)
 move code to read from dGPU or APU into a function and reuse (Lijo)

Suggested-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sathishkumar S <sathishkumar.sundararaju@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c