All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] amdgpu/pm: Disable managing power profiles on SRIOV for Sienna Cichlid
@ 2022-05-05 19:41 Danijel Slivka
  0 siblings, 0 replies; 3+ messages in thread
From: Danijel Slivka @ 2022-05-05 19:41 UTC (permalink / raw)
  To: amd-gfx; +Cc: Danijel Slivka

Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 70a0aad05426..e96216ab9a39 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -2025,6 +2025,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 	} else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
 		if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)
 			*states = ATTR_STATE_UNSUPPORTED;
+		else if (gc_ver == IP_VERSION(10, 3, 0) && amdgpu_sriov_vf(adev))
+			*states = ATTR_STATE_UNSUPPORTED;
 	}
 
 	switch (gc_ver) {
@@ -2038,6 +2040,12 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 			dev_attr->store = NULL;
 		}
 		break;
+	case IP_VERSION(10, 3, 0):
+		if (DEVICE_ATTR_IS(power_dpm_force_performance_level)) {
+			dev_attr->attr.mode &= ~S_IWUGO;
+			dev_attr->store = NULL;
+		}
+		break;
 	default:
 		break;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] amdgpu/pm: Disable managing power profiles on SRIOV for Sienna Cichlid
  2022-05-06  7:52 Danijel Slivka
@ 2022-05-06  8:14 ` Paul Menzel
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2022-05-06  8:14 UTC (permalink / raw)
  To: Danijel Slivka; +Cc: amd-gfx

Dear Danijel,


Am 06.05.22 um 09:52 schrieb Danijel Slivka:

Please add a reasoning/motivation in the commit message body.


Kind regards,

Paul


> Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
> ---
>   drivers/gpu/drm/amd/pm/amdgpu_pm.c | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 70a0aad05426..59a662aeaaf3 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -2025,6 +2025,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
>   	} else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
>   		if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)
>   			*states = ATTR_STATE_UNSUPPORTED;
> +		else if (gc_ver == IP_VERSION(10, 3, 0) && amdgpu_sriov_vf(adev))
> +			*states = ATTR_STATE_UNSUPPORTED;
>   	}
>   
>   	switch (gc_ver) {
> @@ -2038,6 +2040,13 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
>   			dev_attr->store = NULL;
>   		}
>   		break;
> +	case IP_VERSION(10, 3, 0):
> +		if (DEVICE_ATTR_IS(power_dpm_force_performance_level) &&
> +		    amdgpu_sriov_vf(adev)) {
> +			dev_attr->attr.mode &= ~S_IWUGO;
> +			dev_attr->store = NULL;
> +		}
> +		break;
>   	default:
>   		break;
>   	}

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] amdgpu/pm: Disable managing power profiles on SRIOV for Sienna Cichlid
@ 2022-05-06  7:52 Danijel Slivka
  2022-05-06  8:14 ` Paul Menzel
  0 siblings, 1 reply; 3+ messages in thread
From: Danijel Slivka @ 2022-05-06  7:52 UTC (permalink / raw)
  To: amd-gfx; +Cc: Danijel Slivka

Signed-off-by: Danijel Slivka <danijel.slivka@amd.com>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 70a0aad05426..59a662aeaaf3 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -2025,6 +2025,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 	} else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
 		if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)
 			*states = ATTR_STATE_UNSUPPORTED;
+		else if (gc_ver == IP_VERSION(10, 3, 0) && amdgpu_sriov_vf(adev))
+			*states = ATTR_STATE_UNSUPPORTED;
 	}
 
 	switch (gc_ver) {
@@ -2038,6 +2040,13 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 			dev_attr->store = NULL;
 		}
 		break;
+	case IP_VERSION(10, 3, 0):
+		if (DEVICE_ATTR_IS(power_dpm_force_performance_level) &&
+		    amdgpu_sriov_vf(adev)) {
+			dev_attr->attr.mode &= ~S_IWUGO;
+			dev_attr->store = NULL;
+		}
+		break;
 	default:
 		break;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-06  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 19:41 [PATCH] amdgpu/pm: Disable managing power profiles on SRIOV for Sienna Cichlid Danijel Slivka
2022-05-06  7:52 Danijel Slivka
2022-05-06  8:14 ` Paul Menzel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.