aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/pm/amdgpu_pm.c
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2025-06-30 19:11:33 +0530
committerAlex Deucher <alexander.deucher@amd.com>2025-07-07 13:41:37 -0400
commit127ed492ad2df0aa2351a1ad32a793ae7d91161b (patch)
treebaea857e20385cc8f72e16e4608b64abb8cf967a /drivers/gpu/drm/amd/pm/amdgpu_pm.c
parentMerge tag 'drm-misc-next-2025-07-03' of https://gitlab.freedesktop.org/drm/mi... (diff)
downloadlinux-127ed492ad2df0aa2351a1ad32a793ae7d91161b.tar.gz
linux-127ed492ad2df0aa2351a1ad32a793ae7d91161b.zip
drm/amdgpu: Pass adev pointer to functions
Pass amdgpu device context instead of drm device context to some amdgpu_device_* functions. DRM device context is not required in those functions. No functional change. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/pm/amdgpu_pm.c')
-rw-r--r--drivers/gpu/drm/amd/pm/amdgpu_pm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index edd9895b46c0..4b151bbaffaa 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -1890,7 +1890,7 @@ out:
static int ss_power_attr_update(struct amdgpu_device *adev, struct amdgpu_device_attr *attr,
uint32_t mask, enum amdgpu_device_attr_states *states)
{
- if (!amdgpu_device_supports_smart_shift(adev_to_drm(adev)))
+ if (!amdgpu_device_supports_smart_shift(adev))
*states = ATTR_STATE_UNSUPPORTED;
return 0;
@@ -1901,7 +1901,7 @@ static int ss_bias_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
{
uint32_t ss_power;
- if (!amdgpu_device_supports_smart_shift(adev_to_drm(adev)))
+ if (!amdgpu_device_supports_smart_shift(adev))
*states = ATTR_STATE_UNSUPPORTED;
else if (amdgpu_hwmon_get_sensor_generic(adev, AMDGPU_PP_SENSOR_SS_APU_SHARE,
(void *)&ss_power))