drm/amd/pm: disbale dcefclk device sysnode on GFX v9.4.3 chip
Subsystems (3)
PATCH v2 1/1 drm/amd/pm: disbale dcefclk device sysnode on GFX v9.4.3 chip
v1:
the dceflck sysnode is not aviable on GFX v9.4.3 chip.
v2:
simplify code logic using helper function: amdgpu_device_has_display_hardware().
Signed-off-by Yang Wang <[email protected]>
Reviewed-by Kenneth Feng <[email protected]>
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +1 -3
@@ -2048,9 +2048,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_if (gc_ver <IP_VERSION (9 ,0 ,0 )) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (pp_dpm_dcefclk)) { -if (gc_ver <IP_VERSION (9 ,0 ,0 ) || - gc_ver ==IP_VERSION (9 ,4 ,1 ) || - gc_ver ==IP_VERSION (9 ,4 ,2 )) +if (!amdgpu_device_has_display_hardware (adev)) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (pp_dpm_fclk)) {if (mp1_ver <IP_VERSION (10 ,0 ,0 ))
Signature · 1 line
2.34.1
Quoted 17 lines · Yang Wang
v1:
the dceflck sysnode is not aviable on GFX v9.4.3 chip.v2:
simplify code logic using helper function:amdgpu_device_has_display_hardware().Signed-off-by Yang Wang <[email protected]>Reviewed-by Kenneth Feng <[email protected]>--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/gpu/drm/amd/pm/amdgpu_pm.c +0
-0
drivers/gpu/drm/amd/pm/amdgpu_pm.c static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ · line 2051
Quoted 4 lines
drivers/gpu/drm/amd/pm/amdgpu_pm.c +0
-1@@ -2048,9 +2048,7 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_if (gc_ver <IP_VERSION (9 ,0 ,0 )) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (pp_dpm_dcefclk)) { - if (gc_ver < IP_VERSION(9, 0, 0) ||
Missed this - this remains (no DCEF for old HW) and rest may be replaced with presence of display controller.
Thanks,
Lijo
Quoted 6 lines
drivers/gpu/drm/amd/pm/amdgpu_pm.c +1
-2- gc_ver ==IP_VERSION (9 ,4 ,1 ) || - gc_ver == IP_VERSION(9, 4, 2)) +if (!amdgpu_device_has_display_hardware (adev)) *states =ATTR_STATE_UNSUPPORTED ; }else if (DEVICE_ATTR_IS (pp_dpm_fclk)) {if (mp1_ver <IP_VERSION (10 ,0 ,0 ))