AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Liu <leo.liu@amd.com>
To: Monk Liu <Monk.Liu@amd.com>, amd-gfx@lists.freedesktop.org
Subject: Re: [enable VCN2.0 for NV12 SRIOV 5/6] drm/amdgpu: disable clock/power gating for SRIOV
Date: Thu, 5 Mar 2020 11:11:53 -0500	[thread overview]
Message-ID: <37e35cc4-431f-8ec0-4c98-9770dc329259@amd.com> (raw)
In-Reply-To: <1583415187-16594-5-git-send-email-Monk.Liu@amd.com>

This patch is:

Acked-by: Leo Liu <leo.liu@amd.com>

On 2020-03-05 8:33 a.m., Monk Liu wrote:
> and disable MC resum in VCN2.0 as well
>
> those are not concerned by VF driver
>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 23 +++++++++++++++++++++++
>   1 file changed, 23 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> index dd500d1..f2745fd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
> @@ -320,6 +320,9 @@ static void vcn_v2_0_mc_resume(struct amdgpu_device *adev)
>   	uint32_t size = AMDGPU_GPU_PAGE_ALIGN(adev->vcn.fw->size + 4);
>   	uint32_t offset;
>   
> +	if (amdgpu_sriov_vf(adev))
> +		return;
> +
>   	/* cache window 0: fw */
>   	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
>   		WREG32_SOC15(UVD, 0, mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,
> @@ -464,6 +467,9 @@ static void vcn_v2_0_disable_clock_gating(struct amdgpu_device *adev)
>   {
>   	uint32_t data;
>   
> +	if (amdgpu_sriov_vf(adev))
> +		return;
> +
>   	/* UVD disable CGC */
>   	data = RREG32_SOC15(VCN, 0, mmUVD_CGC_CTRL);
>   	if (adev->cg_flags & AMD_CG_SUPPORT_VCN_MGCG)
> @@ -622,6 +628,9 @@ static void vcn_v2_0_enable_clock_gating(struct amdgpu_device *adev)
>   {
>   	uint32_t data = 0;
>   
> +	if (amdgpu_sriov_vf(adev))
> +		return;
> +
>   	/* enable UVD CGC */
>   	data = RREG32_SOC15(VCN, 0, mmUVD_CGC_CTRL);
>   	if (adev->cg_flags & AMD_CG_SUPPORT_VCN_MGCG)
> @@ -674,6 +683,9 @@ static void vcn_v2_0_disable_static_power_gating(struct amdgpu_device *adev)
>   	uint32_t data = 0;
>   	int ret;
>   
> +	if (amdgpu_sriov_vf(adev))
> +		return;
> +
>   	if (adev->pg_flags & AMD_PG_SUPPORT_VCN) {
>   		data = (1 << UVD_PGFSM_CONFIG__UVDM_PWR_CONFIG__SHIFT
>   			| 1 << UVD_PGFSM_CONFIG__UVDU_PWR_CONFIG__SHIFT
> @@ -721,6 +733,9 @@ static void vcn_v2_0_enable_static_power_gating(struct amdgpu_device *adev)
>   	uint32_t data = 0;
>   	int ret;
>   
> +	if (amdgpu_sriov_vf(adev))
> +		return;
> +
>   	if (adev->pg_flags & AMD_PG_SUPPORT_VCN) {
>   		/* Before power off, this indicator has to be turned on */
>   		data = RREG32_SOC15(VCN, 0, mmUVD_POWER_STATUS);
> @@ -1231,6 +1246,9 @@ static int vcn_v2_0_set_clockgating_state(void *handle,
>   	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>   	bool enable = (state == AMD_CG_STATE_GATE);
>   
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>   	if (enable) {
>   		/* wait for STATUS to clear */
>   		if (vcn_v2_0_is_idle(handle))
> @@ -1686,6 +1704,11 @@ static int vcn_v2_0_set_powergating_state(void *handle,
>   	int ret;
>   	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>   
> +	if (amdgpu_sriov_vf(adev)) {
> +		adev->vcn.cur_state = AMD_PG_STATE_UNGATE;
> +		return 0;
> +	}
> +
>   	if (state == adev->vcn.cur_state)
>   		return 0;
>   
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-03-05 16:11 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 13:33 [enable VCN2.0 for NV12 SRIOV 1/6] drm/amdgpu: introduce mmsch v2.0 header Monk Liu
2020-03-05 13:33 ` [enable VCN2.0 for NV12 SRIOV 2/6] drm/amdgpu: disable jpeg block for SRIOV Monk Liu
2020-03-05 13:37   ` Christian König
2020-03-05 13:39     ` Liu, Monk
2020-03-05 16:01       ` Leo Liu
2020-03-05 13:33 ` [enable VCN2.0 for NV12 SRIOV 3/6] drm/amdgpu: implement initialization part on VCN2.0 " Monk Liu
2020-03-05 16:07   ` Leo Liu
2020-03-06  2:43     ` Liu, Monk
2020-03-05 13:33 ` [enable VCN2.0 for NV12 SRIOV 4/6] drm/amdgpu: cleanup ring/ib test for SRIOV vcn2.0 Monk Liu
2020-03-05 16:10   ` Leo Liu
2020-03-05 13:33 ` [enable VCN2.0 for NV12 SRIOV 5/6] drm/amdgpu: disable clock/power gating for SRIOV Monk Liu
2020-03-05 16:11   ` Leo Liu [this message]
2020-03-05 13:33 ` [enable VCN2.0 for NV12 SRIOV 6/6] drm/amdgpu: clear warning on unused var Monk Liu
2020-03-05 13:37   ` Christian König
2020-03-06  3:31     ` Deng, Emily
2020-03-05 16:16   ` Leo Liu
2020-03-06  2:43     ` Liu, Monk
2020-03-05 15:59 ` [enable VCN2.0 for NV12 SRIOV 1/6] drm/amdgpu: introduce mmsch v2.0 header Leo Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37e35cc4-431f-8ec0-4c98-9770dc329259@amd.com \
    --to=leo.liu@amd.com \
    --cc=Monk.Liu@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox