]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/pm: Remove redundant check condition
authorYiPeng Chai <YiPeng.Chai@amd.com>
Thu, 8 Sep 2022 01:48:11 +0000 (09:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Sep 2022 19:17:58 +0000 (15:17 -0400)
commit419ad857e56a806b0c8308251ae7f84df13d62f5
treec43ea243c86a37c12ca2abdb6707930cb211eaae
parente79e6ef7a32649bef11a5c95f5430fd9116bf3f8
drm/amd/pm: Remove redundant check condition

V3:
[Why]:
  Since ASICs using smu v13_0_2 have called smu
.suspend before calling amdgpu_pm_sysfs_fini,
pm.dpm_enabled was already set to 0 when smu
.suspend was called. This makes it impossible
to delete all pm sys nodes.

[How]:
  Since all functions in amdgpu_pm_sysfs_fini
have their own condition checks, so the first
conditional check in amdgpu_pm_sysfs_fini can
be removed.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/amdgpu_pm.c