drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user
Subsystems (2)
PATCH v2 1/1 drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by user
If user disable uvd/vce/vcn/acp blocks via module
parameter ip_block_mask,
driver power off thoser blocks to save power.
v2: power off uvd/vce/vcn/acp via smu.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +19 -0
@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_powerfor (j =0 ; j < adev->num_ip_blocks; j++) { i = state ==AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j -1 ; + +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */ +if ((adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_UVD || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_VCE || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_VCN || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_ACP ) && + adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu (adev, adev->ip_blocks[i].version->type, state ==AMD_PG_STATE_GATE ? + true : false); +if (r) { +DRM_ERROR ("set_powergating_state(gate) of IP block <%s> failed %d\n" , + adev->ip_blocks[i].version->funcs->name, r); +return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ;/* skip CG for VCE/UVD, it's handled specially */
@@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power } } } +return 0 ; }
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1539714354-28375-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Quoted 8 lines · Rex Zhu
If user disable uvd/vce/vcn/acp blocks via module
parameterip_block_mask,
driver power off thoser blocks to save power.v2: power off uvd/vce/vcn/acp via smu.
Reviewed-by Alex Deucher <[email protected]>
RB of v2 as well.
Alex
Quoted 45 lines
Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +19
-1@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_powerfor (j =0 ; j < adev->num_ip_blocks; j++) { i = state ==AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j -1 ; + +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */ +if ((adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_UVD || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_VCE || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_VCN || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_ACP ) && + adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu (adev, adev->ip_blocks[i].version->type, state ==AMD_PG_STATE_GATE ? + true : false); +if (r) { +DRM_ERROR ("set_powergating_state(gate) of IP block <%s> failed %d\n" , + adev->ip_blocks[i].version->funcs->name, r); +return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ;/* skip CG for VCE/UVD, it's handled specially */ @@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power } } } +return 0 ; } --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 16.10.2018 um 20:25 schrieb Rex Zhu:
Quoted 5 lines
If user disable uvd/vce/vcn/acp blocks via module
parameterip_block_mask,
driver power off thoser blocks to save power.v2: power off uvd/vce/vcn/acp via smu.
I'm not sure if that is a good idea.
The meaning of the flag is to NOT touch the blocks at all, e.g. pretend they don't even exists.
Additional to that the ip_block_mask is only for bringup and debugging and not meant for production use and power saving shouldn't be an issue there.
So I would rather say that this is a NAK.
Christian.
Quoted 37 lines
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +18
-0@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_powerfor (j =0 ; j < adev->num_ip_blocks; j++) { i = state ==AMD_PG_STATE_GATE ? j : adev->num_ip_blocks - j -1 ; + +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */ +if ((adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_UVD || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_VCE || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_VCN || + adev->ip_blocks[i].version->type ==AMD_IP_BLOCK_TYPE_ACP ) && + adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu (adev, adev->ip_blocks[i].version->type, state ==AMD_PG_STATE_GATE ? + true : false); +if (r) { +DRM_ERROR ("set_powergating_state(gate) of IP block <%s> failed %d\n" , + adev->ip_blocks[i].version->funcs->name, r); +return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ;/* skip CG for VCE/UVD, it's handled specially */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power · line 1817
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0@@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power } } } +return 0 ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): db00a165-53c1-a1f3-3d79-4928d6956cac-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 15 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, October 17, 2018 2:31 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:25 schrieb Rex Zhu:
Quoted 4 lines
If user disable uvd/vce/vcn/acp blocks via module parameter
ip_block_mask, driver power off thoser blocks to save power.v2: power off uvd/vce/vcn/acp via smu.
Quoted 7 lines
I'm not sure if that is a good idea.
The meaning of the flag is to NOT touch the blocks at all, e.g. pretend they don't even exists.
Additional to that the
ip_block_maskis only for bringup and debugging and not meant for production use and power saving shouldn't be an issue there.
Hi Christian,
This is requested by Chrome project. As there is an S3 issue caused by VCE, and they still don't find the root cause. And in Chrome project, they don't need to use vce engine.
So as a workaround, they want to disable vce and power off the vce engine to save power.
Best Regards
Rex
Quoted 45 lines
So I would rather say that this is a NAK.
Christian.
Quoted 5 lines
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19+++++++++++++++++++
Quoted 10 lines
1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct
amdgpu_device*adev, enumamd_powerQuoted 2 lines
for (j = 0; j < adev->num_ip_blocks; j++) { i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks- j - 1;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+ +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ if ((adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_UVD||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCE||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCN||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_ACP) &&drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power · line 1796
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-0+ adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu(adev, adev-
Quoted 2 lines
ip_blocks[i].version->type, state ==
AMD_PG_STATE_GATE? +true : false);drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power · line 1796
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+if (r) { +DRM_ERROR("set_powergating_state(gate) of IP block <%s>
failed %d\n",
Quoted 19 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->funcs-name, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6
-0+return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ; /* skip CG for VCE/UVD, it's handled specially */ @@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device*adev, enum
amd_powerQuoted 7 lines
}
}
}
+
return 0;
}
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BYAPR12MB2775ED7A6917BEA91BA0CF61FBFE0-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Am 16.10.2018 um 20:54 schrieb Zhu, Rex:
Quoted 18 lines
Quoted 18 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, October 17, 2018 2:31 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:25 schrieb Rex Zhu:
Quoted 4 lines
If user disable uvd/vce/vcn/acp blocks via module parameter
ip_block_mask, driver power off thoser blocks to save power.v2: power off uvd/vce/vcn/acp via smu.
I'm not sure if that is a good idea.
The meaning of the flag is to NOT touch the blocks at all, e.g. pretend they don't even exists.
Quoted 7 lines
Quoted 2 lines
Additional to that the
ip_block_maskis only for bringup and debugging and not meant for production use and power saving shouldn't be an issue there.Hi Christian,
This is requested by Chrome project. As there is an S3 issue caused by VCE, and they still don't find the root cause. And in Chrome project, they don't need to use vce engine.
So as a workaround, they want to disable vce and power off the vce engine to save power.
Oh, please not that stupid idea again! In this case that is a clear NAK.
The mask isn't necessary stable and this module parameter is absolutely NOT intended for production use!
If we want to disable a specific block permanently in a project we should do so by adding a patch to the specific branch and NOT by abusing ip_block_mask for it.
Regards,
Christian.
Quoted 67 lines
Best Regards
RexQuoted 63 lines
So I would rather say that this is a NAK.
Christian.
Quoted 4 lines
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19+++++++++++++++++++
Quoted 10 lines
1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct
amdgpu_device*adev, enumamd_powerQuoted 2 lines
for (j = 0; j < adev->num_ip_blocks; j++) { i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks- j - 1;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+ +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ if ((adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_UVD||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCE||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCN||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_ACP) &&drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power · line 1796
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-0+ adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu(adev, adev-
Quoted 2 lines
ip_blocks[i].version->type, state ==
AMD_PG_STATE_GATE? +true : false);drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power · line 1796
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+if (r) { +DRM_ERROR("set_powergating_state(gate) of IP block <%s>
failed %d\n",drivers/gpu/drm/amd/amdgpu/amdgpu_device.c static int amdgpu_device_set_pg_state(struct amdgpu_device *adev, enum amd_power
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->funcs-name, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6
-0+return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ; /* skip CG for VCE/UVD, it's handled specially */ @@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct amdgpu_device*adev, enum
amd_powerQuoted 7 lines
} } } + return 0; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 6c9e7f4f-0bc0-f6e8-0183-81279f03ce77-5C7GfCeVMHo@public.gmane.org
Quoted 39 lines
-----Original Message-----
From: Koenig, Christian
Sent: Wednesday, October 17, 2018 2:59 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:54 schrieb Zhu, Rex:
Quoted 12 lines
Quoted 12 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, October 17, 2018 2:31 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:25 schrieb Rex Zhu:
Quoted 3 lines
If user disable uvd/vce/vcn/acp blocks via module parameter
ip_block_mask, driver power off thoser blocks to save power.Quoted 8 lines
Quoted 8 lines
Quoted 1 line
v2: power off uvd/vce/vcn/acp via smu.
I'm not sure if that is a good idea.
The meaning of the flag is to NOT touch the blocks at all, e.g. pretend they don't even exists.
Additional to that the
ip_block_maskis only for bringup and debugging and not meant for production use and power saving shouldn'tbe an issue there.
Quoted 3 lines
Hi Christian,
This is requested by Chrome project. As there is an S3 issue caused by VCE,
and they still don't find the root cause.
Quoted 2 lines
And in Chrome project, they don't need to use vce engine.
So as a workaround, they want to disable vce and power off the vce engineto save power.
Quoted 8 lines
Oh, please not that stupid idea again! In this case that is a clear NAK.
The mask isn't necessary stable and this module parameter is absolutely NOT intended for production use!
If we want to disable a specific block permanently in a project we should do so by adding a patch to the specific branch and NOT by abusing
ip_block_maskfor it.
This is also requested by Chrome project. Customer wish all the patches are cherry-pick from drm-next/linux kernel tree. Maybe we need to fix the vce issue on time.
Best Regards
Rex
Quoted 71 lines
Regards,
Christian.Quoted 68 lines
Best Regards
RexQuoted 64 lines
So I would rather say that this is a NAK.
Christian.
Quoted 4 lines
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19+++++++++++++++++++
Quoted 10 lines
1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct
amdgpu_device*adev, enumamd_powerQuoted 2 lines
for (j = 0; j < adev->num_ip_blocks; j++) { i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks- j - 1;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+ +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ if ((adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_UVD||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCE||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCN||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_ACP) &&drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-0+ adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu(adev, adev-
Quoted 2 lines
ip_blocks[i].version->type, state ==
AMD_PG_STATE_GATE? +true : false);drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+if (r) { +DRM_ERROR("set_powergating_state(gate) of IP block <%s> failed
%d\n",drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->funcs-name, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0+return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ; /* skip CG for VCE/UVD, it's handled specially */ @@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct +amdgpu_device*adev, enum
amd_powerQuoted 7 lines
} } } + return 0; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): BYAPR12MB27756B6EDFCD5E54231683BBFBFE0-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Am 16.10.2018 um 21:03 schrieb Zhu, Rex:
Quoted 39 lines
Quoted 39 lines
-----Original Message-----
From: Koenig, Christian
Sent: Wednesday, October 17, 2018 2:59 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:54 schrieb Zhu, Rex:
Quoted 11 lines
Quoted 11 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, October 17, 2018 2:31 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:25 schrieb Rex Zhu:
Quoted 3 lines
If user disable uvd/vce/vcn/acp blocks via module parameter
ip_block_mask, driver power off thoser blocks to save power.Quoted 8 lines
Quoted 8 lines
Quoted 1 line
v2: power off uvd/vce/vcn/acp via smu.
I'm not sure if that is a good idea.
The meaning of the flag is to NOT touch the blocks at all, e.g. pretend they don't even exists.
Additional to that the
ip_block_maskis only for bringup and debugging and not meant for production use and power saving shouldn'tbe an issue there.
Quoted 3 lines
Hi Christian,
This is requested by Chrome project. As there is an S3 issue caused by VCE,
and they still don't find the root cause.
Quoted 2 lines
And in Chrome project, they don't need to use vce engine.
So as a workaround, they want to disable vce and power off the vce engineto save power.
Oh, please not that stupid idea again! In this case that is a clear NAK.
Quoted 8 lines
Quoted 6 lines
The mask isn't necessary stable and this module parameter is absolutely NOT intended for production use!
If we want to disable a specific block permanently in a project we should do so by adding a patch to the specific branch and NOT by abusing
ip_block_maskfor it.This is also requested by Chrome project. Customer wish all the patches are cherry-pick from drm-next/linux kernel tree. Maybe we need to fix the vce issue on time.
Yeah, completely agree.
Exactly that's the kind of stuff why Chrome has the restriction to only cherry-pick patches from upstream.
So we can either go ahead and disable VCE upstream as well or we sit down and fix the issue.
Do you have a bug tracker for that?
Regards,
Christian.
Quoted 74 lines
Best Regards
RexQuoted 70 lines
Regards,
Christian.Quoted 67 lines
Best Regards
RexQuoted 64 lines
So I would rather say that this is a NAK.
Christian.
Quoted 4 lines
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19+++++++++++++++++++
Quoted 10 lines
1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -1776,6 +1776,24 @@ static int amdgpu_device_set_pg_state(struct
amdgpu_device*adev, enumamd_powerQuoted 2 lines
for (j = 0; j < adev->num_ip_blocks; j++) { i = state == AMD_PG_STATE_GATE ? j : adev->num_ip_blocks- j - 1;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+ +/* try to power off VCE/UVD/VCN/ACP if they were disabled by user */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ if ((adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_UVD||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCE||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCN||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_ACP) &&drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-0+ adev->powerplay.pp_funcs->set_powergating_by_smu) { +if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu(adev, adev-
Quoted 2 lines
ip_blocks[i].version->type, state ==
AMD_PG_STATE_GATE? +true : false);drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+if (r) { +DRM_ERROR("set_powergating_state(gate) of IP block <%s> failed
%d\n",drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 12 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->funcs-name, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +7
-0+return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ; /* skip CG for VCE/UVD, it's handled specially */ @@ -1793,6 +1811,7 @@ static int amdgpu_device_set_pg_state(struct +amdgpu_device*adev, enum
amd_powerQuoted 7 lines
} } } + return 0; }
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): ee7e608d-e5a5-aa0d-02ef-4db837f14810-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Quoted 65 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, October 17, 2018 3:11 AM
To: Zhu, Rex <[email protected]>; Koenig, Christian <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 21:03 schrieb Zhu, Rex:
Quoted 42 lines
Quoted 42 lines
-----Original Message-----
From: Koenig, Christian
Sent: Wednesday, October 17, 2018 2:59 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:54 schrieb Zhu, Rex:
Quoted 12 lines
Quoted 12 lines
-----Original Message-----
From: Christian König <[email protected]>
Sent: Wednesday, October 17, 2018 2:31 AM
To: Zhu, Rex <[email protected]>; [email protected]
Subject: Re: [PATCH v2] drm/amdgpu: Poweroff uvd/vce/vcn/acp block if they were disabled by userAm 16.10.2018 um 20:25 schrieb Rex Zhu:
Quoted 4 lines
If user disable uvd/vce/vcn/acp blocks via module parameter
ip_block_mask, driver power off thoser blocks to save power.v2: power off uvd/vce/vcn/acp via smu.
Quoted 8 lines
Quoted 8 lines
I'm not sure if that is a good idea.
The meaning of the flag is to NOT touch the blocks at all, e.g. pretend they don't even exists.
Additional to that the
ip_block_maskis only for bringup and debugging and not meant for production use and power saving shouldn'tbe an issue there.
Quoted 4 lines
Hi Christian,
This is requested by Chrome project. As there is an S3 issue caused by VCE,
and they still don't find the root cause.
Quoted 3 lines
And in Chrome project, they don't need to use vce engine. So as a workaround, they want to disable vce and power off the vce engine
to save power.
Oh, please not that stupid idea again! In this case that is a clear NAK.
Quoted 7 lines
Quoted 6 lines
The mask isn't necessary stable and this module parameter is absolutely NOT intended for production use!
If we want to disable a specific block permanently in a project we should do so by adding a patch to the specific branch and NOT by abusing
ip_block_maskfor it.This is also requested by Chrome project. Customer wish all the patches are
cherry-pick from drm-next/linux kernel tree.
Quoted 1 line
Maybe we need to fix the vce issue on time.
Yeah, completely agree.
Quoted 7 lines
Exactly that's the kind of stuff why Chrome has the restriction to only cherry- pick patches from upstream.
So we can either go ahead and disable VCE upstream as well or we sit down and fix the issue.
Do you have a bug tracker for that?
Yes, there is a ticket: SWDEV-168119
Regards
Rex
Quoted 63 lines
Regards,
Christian.Quoted 30 lines
Best Regards
RexQuoted 26 lines
Regards,
Christian.Quoted 23 lines
Best Regards
RexQuoted 20 lines
So I would rather say that this is a NAK.
Christian.
Quoted 4 lines
Reviewed-by Alex Deucher <[email protected]>Signed-off-by Rex Zhu <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 19+++++++++++++++++++
Quoted 11 lines
1 file changed, 19 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0
-0@@ -1776,6 +1776,24 @@ static intamdgpu_device_set_pg_state(struct
amdgpu_device*adev, enumamd_powerQuoted 6 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
for (j = 0; j < adev->num_ip_blocks; j++) { i = state == AMD_PG_STATE_GATE ? j : adev-
num_ip_blocksQuoted 3 lines
Quoted 3 lines
Quoted 3 lines
- j - 1;
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+ +/* try to power off VCE/UVD/VCN/ACP if they were disabled
Quoted 23 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
by user */
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ if ((adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_UVD||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCE||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_VCN||drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version->type ==
AMD_IP_BLOCK_TYPE_ACP) &&drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->powerplay.pp_funcs-
set_powergating_by_smu) {Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+if (!adev->ip_blocks[i].status.valid) { +amdgpu_dpm_set_powergating_by_smu(adev, adev-
Quoted 2 lines
ip_blocks[i].version->type, state ==
AMD_PG_STATE_GATE? +true : false);drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +2
-0+if (r) { +DRM_ERROR("set_powergating_state(gate) of IP block <%s> failed
%d\n",drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1
-0+ adev->ip_blocks[i].version-funcs-
Quoted 24 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Quoted 9 lines
name, r);
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +5
-0+return r; + } + } + } +if (!adev->ip_blocks[i].status.late_initialized)continue ; /* skip CG for VCE/UVD, it's handled specially */ @@-1793,6
Quoted 14 lines
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 2 lines
+1811,7 @@ static int amdgpu_device_set_pg_state(struct +amdgpu_device
*adev, enum
amd_powerQuoted 7 lines
} } } + return 0; }_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx