* [PATCH] drm/amdgpu: Use dpm_enabled as the dpm state flag
@ 2018-03-26 8:23 Rex Zhu
[not found] ` <1522052612-26964-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Rex Zhu @ 2018-03-26 8:23 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Rex Zhu
driver will set dpm_enabled to true only when
module paramter amdgpu_dpm not set to 0 and
smu initialize successfully.
Change-Id: Ic835dc93e0cfdfc2be7d10109d0c63b3cc4c2dff
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 +-
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++--
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++-
7 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 369beb5..baa64e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -465,7 +465,7 @@ static ssize_t amdgpu_debugfs_sensor_read(struct file *f, char __user *buf,
if (size & 3 || *pos & 0x3)
return -EINVAL;
- if (amdgpu_dpm == 0)
+ if (!adev->pm.dpm_enabled)
return -EINVAL;
/* convert offset to sensor number */
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 7b0ae44..487d39e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -704,7 +704,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
struct pp_gpu_power query = {0};
int query_size = sizeof(query);
- if (amdgpu_dpm == 0)
+ if (!adev->pm.dpm_enabled)
return -ENOENT;
switch (info->sensor_info.type) {
diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
index 47ef3e6..be6b199 100644
--- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
@@ -6255,7 +6255,7 @@ static int ci_dpm_late_init(void *handle)
int ret;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- if (!amdgpu_dpm)
+ if (!adev->pm.dpm_enabled)
return 0;
/* init the sysfs and debugfs files late */
diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
index 26ba984..bc1720e 100644
--- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
@@ -2974,7 +2974,7 @@ static int kv_dpm_late_init(void *handle)
/* powerdown unused blocks for now */
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- if (!amdgpu_dpm)
+ if (!adev->pm.dpm_enabled)
return 0;
kv_dpm_powergate_acp(adev, true);
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
index 672eaff..6253b27 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
@@ -7580,7 +7580,7 @@ static int si_dpm_late_init(void *handle)
int ret;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
- if (!amdgpu_dpm)
+ if (!adev->pm.dpm_enabled)
return 0;
ret = si_set_temperature_range(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
index 948bb943..87cbb14 100644
--- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
@@ -688,7 +688,7 @@ static int uvd_v4_2_set_powergating_state(void *handle,
if (state == AMD_PG_STATE_GATE) {
uvd_v4_2_stop(adev);
- if (adev->pg_flags & AMD_PG_SUPPORT_UVD && amdgpu_dpm == 0) {
+ if (adev->pg_flags & AMD_PG_SUPPORT_UVD && !adev->pm.dpm_enabled) {
if (!(RREG32_SMC(ixCURRENT_PG_STATUS) &
CURRENT_PG_STATUS__UVD_PG_STATUS_MASK)) {
WREG32(mmUVD_PGFSM_CONFIG, (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK |
@@ -699,7 +699,7 @@ static int uvd_v4_2_set_powergating_state(void *handle,
}
return 0;
} else {
- if (adev->pg_flags & AMD_PG_SUPPORT_UVD && amdgpu_dpm == 0) {
+ if (adev->pg_flags & AMD_PG_SUPPORT_UVD && !adev->pm.dpm_enabled) {
if (RREG32_SMC(ixCURRENT_PG_STATUS) &
CURRENT_PG_STATUS__UVD_PG_STATUS_MASK) {
WREG32(mmUVD_PGFSM_CONFIG, (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK |
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 30ff8a9..bca67df 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
@@ -211,7 +211,6 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
!hwmgr->pptable_func->pptable_init ||
!hwmgr->hwmgr_func->backend_init) {
hwmgr->pm_en = false;
- ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = false;
pr_info("dpm not supported \n");
return 0;
}
@@ -240,6 +239,8 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
if (ret)
goto err2;
+ ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = true;
+
return 0;
err2:
if (hwmgr->hwmgr_func->backend_fini)
--
1.9.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amdgpu: Use dpm_enabled as the dpm state flag
[not found] ` <1522052612-26964-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
@ 2018-03-26 8:44 ` Quan, Evan
2018-03-26 8:55 ` Huang Rui
1 sibling, 0 replies; 3+ messages in thread
From: Quan, Evan @ 2018-03-26 8:44 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org; +Cc: Zhu, Rex
Reviewed-by: Evan Quan <evan.quan@amd.com>
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Rex Zhu
> Sent: Monday, March 26, 2018 4:24 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Zhu, Rex <Rex.Zhu@amd.com>
> Subject: [PATCH] drm/amdgpu: Use dpm_enabled as the dpm state flag
>
> driver will set dpm_enabled to true only when module paramter
> amdgpu_dpm not set to 0 and smu initialize successfully.
>
> Change-Id: Ic835dc93e0cfdfc2be7d10109d0c63b3cc4c2dff
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++--
> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++-
> 7 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 369beb5..baa64e2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -465,7 +465,7 @@ static ssize_t amdgpu_debugfs_sensor_read(struct
> file *f, char __user *buf,
> if (size & 3 || *pos & 0x3)
> return -EINVAL;
>
> - if (amdgpu_dpm == 0)
> + if (!adev->pm.dpm_enabled)
> return -EINVAL;
>
> /* convert offset to sensor number */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 7b0ae44..487d39e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -704,7 +704,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev,
> void *data, struct drm_file
> struct pp_gpu_power query = {0};
> int query_size = sizeof(query);
>
> - if (amdgpu_dpm == 0)
> + if (!adev->pm.dpm_enabled)
> return -ENOENT;
>
> switch (info->sensor_info.type) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> index 47ef3e6..be6b199 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> @@ -6255,7 +6255,7 @@ static int ci_dpm_late_init(void *handle)
> int ret;
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - if (!amdgpu_dpm)
> + if (!adev->pm.dpm_enabled)
> return 0;
>
> /* init the sysfs and debugfs files late */ diff --git
> a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> index 26ba984..bc1720e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> @@ -2974,7 +2974,7 @@ static int kv_dpm_late_init(void *handle)
> /* powerdown unused blocks for now */
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - if (!amdgpu_dpm)
> + if (!adev->pm.dpm_enabled)
> return 0;
>
> kv_dpm_powergate_acp(adev, true);
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> index 672eaff..6253b27 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> @@ -7580,7 +7580,7 @@ static int si_dpm_late_init(void *handle)
> int ret;
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - if (!amdgpu_dpm)
> + if (!adev->pm.dpm_enabled)
> return 0;
>
> ret = si_set_temperature_range(adev);
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> index 948bb943..87cbb14 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> @@ -688,7 +688,7 @@ static int uvd_v4_2_set_powergating_state(void
> *handle,
>
> if (state == AMD_PG_STATE_GATE) {
> uvd_v4_2_stop(adev);
> - if (adev->pg_flags & AMD_PG_SUPPORT_UVD &&
> amdgpu_dpm == 0) {
> + if (adev->pg_flags & AMD_PG_SUPPORT_UVD && !adev-
> >pm.dpm_enabled) {
> if (!(RREG32_SMC(ixCURRENT_PG_STATUS) &
>
> CURRENT_PG_STATUS__UVD_PG_STATUS_MASK)) {
> WREG32(mmUVD_PGFSM_CONFIG,
> (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK |
> @@ -699,7 +699,7 @@ static int uvd_v4_2_set_powergating_state(void
> *handle,
> }
> return 0;
> } else {
> - if (adev->pg_flags & AMD_PG_SUPPORT_UVD &&
> amdgpu_dpm == 0) {
> + if (adev->pg_flags & AMD_PG_SUPPORT_UVD && !adev-
> >pm.dpm_enabled) {
> if (RREG32_SMC(ixCURRENT_PG_STATUS) &
>
> CURRENT_PG_STATUS__UVD_PG_STATUS_MASK) {
> WREG32(mmUVD_PGFSM_CONFIG,
> (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK |
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> index 30ff8a9..bca67df 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> @@ -211,7 +211,6 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
> !hwmgr->pptable_func->pptable_init ||
> !hwmgr->hwmgr_func->backend_init) {
> hwmgr->pm_en = false;
> - ((struct amdgpu_device *)hwmgr->adev)-
> >pm.dpm_enabled = false;
> pr_info("dpm not supported \n");
> return 0;
> }
> @@ -240,6 +239,8 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
> if (ret)
> goto err2;
>
> + ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = true;
> +
> return 0;
> err2:
> if (hwmgr->hwmgr_func->backend_fini)
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: Use dpm_enabled as the dpm state flag
[not found] ` <1522052612-26964-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-26 8:44 ` Quan, Evan
@ 2018-03-26 8:55 ` Huang Rui
1 sibling, 0 replies; 3+ messages in thread
From: Huang Rui @ 2018-03-26 8:55 UTC (permalink / raw)
To: Rex Zhu; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On Mon, Mar 26, 2018 at 04:23:32PM +0800, Rex Zhu wrote:
> driver will set dpm_enabled to true only when
> module paramter amdgpu_dpm not set to 0 and
> smu initialize successfully.
>
Reviewed-by: Huang Rui <ray.huang@amd.com>
> Change-Id: Ic835dc93e0cfdfc2be7d10109d0c63b3cc4c2dff
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/si_dpm.c | 2 +-
> drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++--
> drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 3 ++-
> 7 files changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 369beb5..baa64e2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -465,7 +465,7 @@ static ssize_t amdgpu_debugfs_sensor_read(struct file *f, char __user *buf,
> if (size & 3 || *pos & 0x3)
> return -EINVAL;
>
> - if (amdgpu_dpm == 0)
> + if (!adev->pm.dpm_enabled)
> return -EINVAL;
>
> /* convert offset to sensor number */
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 7b0ae44..487d39e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -704,7 +704,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
> struct pp_gpu_power query = {0};
> int query_size = sizeof(query);
>
> - if (amdgpu_dpm == 0)
> + if (!adev->pm.dpm_enabled)
> return -ENOENT;
>
> switch (info->sensor_info.type) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> index 47ef3e6..be6b199 100644
> --- a/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/ci_dpm.c
> @@ -6255,7 +6255,7 @@ static int ci_dpm_late_init(void *handle)
> int ret;
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - if (!amdgpu_dpm)
> + if (!adev->pm.dpm_enabled)
> return 0;
>
> /* init the sysfs and debugfs files late */
> diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> index 26ba984..bc1720e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> @@ -2974,7 +2974,7 @@ static int kv_dpm_late_init(void *handle)
> /* powerdown unused blocks for now */
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - if (!amdgpu_dpm)
> + if (!adev->pm.dpm_enabled)
> return 0;
>
> kv_dpm_powergate_acp(adev, true);
> diff --git a/drivers/gpu/drm/amd/amdgpu/si_dpm.c b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> index 672eaff..6253b27 100644
> --- a/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/si_dpm.c
> @@ -7580,7 +7580,7 @@ static int si_dpm_late_init(void *handle)
> int ret;
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
> - if (!amdgpu_dpm)
> + if (!adev->pm.dpm_enabled)
> return 0;
>
> ret = si_set_temperature_range(adev);
> diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> index 948bb943..87cbb14 100644
> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
> @@ -688,7 +688,7 @@ static int uvd_v4_2_set_powergating_state(void *handle,
>
> if (state == AMD_PG_STATE_GATE) {
> uvd_v4_2_stop(adev);
> - if (adev->pg_flags & AMD_PG_SUPPORT_UVD && amdgpu_dpm == 0) {
> + if (adev->pg_flags & AMD_PG_SUPPORT_UVD && !adev->pm.dpm_enabled) {
> if (!(RREG32_SMC(ixCURRENT_PG_STATUS) &
> CURRENT_PG_STATUS__UVD_PG_STATUS_MASK)) {
> WREG32(mmUVD_PGFSM_CONFIG, (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK |
> @@ -699,7 +699,7 @@ static int uvd_v4_2_set_powergating_state(void *handle,
> }
> return 0;
> } else {
> - if (adev->pg_flags & AMD_PG_SUPPORT_UVD && amdgpu_dpm == 0) {
> + if (adev->pg_flags & AMD_PG_SUPPORT_UVD && !adev->pm.dpm_enabled) {
> if (RREG32_SMC(ixCURRENT_PG_STATUS) &
> CURRENT_PG_STATUS__UVD_PG_STATUS_MASK) {
> WREG32(mmUVD_PGFSM_CONFIG, (UVD_PGFSM_CONFIG__UVD_PGFSM_FSM_ADDR_MASK |
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> index 30ff8a9..bca67df 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
> @@ -211,7 +211,6 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
> !hwmgr->pptable_func->pptable_init ||
> !hwmgr->hwmgr_func->backend_init) {
> hwmgr->pm_en = false;
> - ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = false;
> pr_info("dpm not supported \n");
> return 0;
> }
> @@ -240,6 +239,8 @@ int hwmgr_hw_init(struct pp_hwmgr *hwmgr)
> if (ret)
> goto err2;
>
> + ((struct amdgpu_device *)hwmgr->adev)->pm.dpm_enabled = true;
> +
> return 0;
> err2:
> if (hwmgr->hwmgr_func->backend_fini)
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-26 8:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-26 8:23 [PATCH] drm/amdgpu: Use dpm_enabled as the dpm state flag Rex Zhu
[not found] ` <1522052612-26964-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2018-03-26 8:44 ` Quan, Evan
2018-03-26 8:55 ` Huang Rui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox