[PATCH] drm/amdgpu: don't skip attributes when powerplay is enabled

Dieter Nützel Dieter at nuetzel-hh.de
Tue Nov 21 03:39:24 UTC 2017


Am 20.11.2017 23:57, schrieb Alex Deucher:
> The function checks non-powerplay structures so regressed when
> the pp_enabled check was removed.  This should ideally be
> implemented similarly for powerplay.
> 
> Fixes: 6d07fe7bcae57 ("drm/amdgpu: delete pp_enable in adev")
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>

against 'amd-staging-drm-next' on RX580

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index 3506758349dc..6f56ff606e43 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -945,6 +945,10 @@ static umode_t hwmon_attributes_visible(struct 
> kobject *kobj,
>  	struct amdgpu_device *adev = dev_get_drvdata(dev);
>  	umode_t effective_mode = attr->mode;
> 
> +	/* no skipping for powerplay */
> +	if (adev->powerplay.cgs_device)
> +		return effective_mode;
> +
>  	/* Skip limit attributes if DPM is not enabled */
>  	if (!adev->pm.dpm_enabled &&
>  	    (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||


More information about the amd-gfx mailing list