Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 135f9711 authored by Alex Deucher's avatar Alex Deucher
Browse files

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



The function checks non-powerplay structures so regressed when
the pp_enabled check was removed.  This should ideally be
implemented similarly for powerplay.

Fixes: 6d07fe7b ("drm/amdgpu: delete pp_enable in adev")
Tested-by: default avatarDieter Nützel <Dieter@nuetzel-hh.de>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8d8258bd
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -946,6 +946,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 ||