All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: amd-gfx@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Kenneth Feng <kenneth.feng@amd.com>,
	Jiansong Chen <Jiansong.Chen@amd.com>
Subject: [PATCH 38/42] drm/amd/powerplay: set VCN1 pg only for sienna_cichlid
Date: Tue, 14 Jul 2020 14:23:49 -0400	[thread overview]
Message-ID: <20200714182353.2164930-39-alexander.deucher@amd.com> (raw)
In-Reply-To: <20200714182353.2164930-1-alexander.deucher@amd.com>

From: Jiansong Chen <Jiansong.Chen@amd.com>

navy_flounder has one VCN instance, and the work around
is to avoid smu reponse error when setting VCN1 pg for
the chip. It is preferred VCN0 and VCN1 are separated
for the pg setting so better power efficiency can be
achieved.

Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 .../drm/amd/powerplay/sienna_cichlid_ppt.c    | 20 +++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
index 79d7159a871e..c74c4e866859 100644
--- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c
@@ -644,6 +644,8 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
 {
 	struct smu_power_context *smu_power = &smu->smu_power;
 	struct smu_power_gate *power_gate = &smu_power->power_gate;
+	struct amdgpu_device *adev = smu->adev;
+
 	int ret = 0;
 
 	if (enable) {
@@ -652,9 +654,12 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
 			ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 0, NULL);
 			if (ret)
 				return ret;
-			ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn, 0x10000, NULL);
-			if (ret)
-				return ret;
+			if (adev->asic_type == CHIP_SIENNA_CICHLID) {
+				ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerUpVcn,
+								  0x10000, NULL);
+				if (ret)
+					return ret;
+			}
 		}
 		power_gate->vcn_gated = false;
 	} else {
@@ -662,9 +667,12 @@ static int sienna_cichlid_dpm_set_vcn_enable(struct smu_context *smu, bool enabl
 			ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn, 0, NULL);
 			if (ret)
 				return ret;
-			ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn, 0x10000, NULL);
-			if (ret)
-				return ret;
+			if (adev->asic_type == CHIP_SIENNA_CICHLID) {
+				ret = smu_send_smc_msg_with_param(smu, SMU_MSG_PowerDownVcn,
+								  0x10000, NULL);
+				if (ret)
+					return ret;
+			}
 		}
 		power_gate->vcn_gated = true;
 	}
-- 
2.25.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2020-07-14 18:25 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-14 18:23 [PATCH 00/42] Navy Flounder support Alex Deucher
2020-07-14 18:23 ` [PATCH 01/42] drm/amdgpu: expand to add multiple trap event irq id Alex Deucher
2020-07-15  9:21   ` Christian König
2020-07-15 13:24     ` Alex Deucher
2020-07-15 16:20       ` Alex Deucher
2020-07-14 18:23 ` [PATCH 02/42] drm/amdgpu: add navy_flounder asic type Alex Deucher
2020-07-14 18:23 ` [PATCH 03/42] drm/amdgpu: add navy_flounder gpu info firmware Alex Deucher
2020-07-14 18:23 ` [PATCH 04/42] drm/amdgpu: set fw load type for navy_flounder Alex Deucher
2020-07-14 18:23 ` [PATCH 05/42] drm/amdgpu: set asic family and ip blocks " Alex Deucher
2020-07-14 18:23 ` [PATCH 06/42] drm/amdgpu/gfx10: add support for navy_flounder firmware Alex Deucher
2020-07-14 18:23 ` [PATCH 07/42] drm/amdgpu/gmc10: add navy_flounder support Alex Deucher
2020-07-14 18:23 ` [PATCH 08/42] drm/amdgpu/gfx10: add clockgating support for navy_flounder Alex Deucher
2020-07-14 18:23 ` [PATCH 09/42] drm/amdgpu/soc15: add " Alex Deucher
2020-07-14 18:23 ` [PATCH 10/42] drm/amdgpu: initialize IP offset " Alex Deucher
2020-07-14 18:23 ` [PATCH 11/42] drm/amdgpu: add support on mmhub " Alex Deucher
2020-07-14 18:23 ` [PATCH 12/42] drm/amdgpu: add common ip block " Alex Deucher
2020-07-14 18:23 ` [PATCH 13/42] drm/amdgpu: add gmc " Alex Deucher
2020-07-14 18:23 ` [PATCH 14/42] drm/amdgpu: add ih " Alex Deucher
2020-07-14 18:23 ` [PATCH 15/42] drm/amdgpu: add gfx " Alex Deucher
2020-07-14 18:23 ` [PATCH 16/42] drm/amdgpu: add sdma " Alex Deucher
2020-07-14 18:23 ` [PATCH 17/42] drm/amdgpu: add virtual display support " Alex Deucher
2020-07-14 18:23 ` [PATCH 18/42] drm/amdgpu: configure navy_flounder gfx according to gfx 10.3 Alex Deucher
2020-07-14 18:23 ` [PATCH 19/42] drm/amdgpu: force pa_sc_tile_steering_override to 0 for navy_flounder Alex Deucher
2020-07-14 18:23 ` [PATCH 20/42] drm/amdgpu: add gmc cg support " Alex Deucher
2020-07-14 18:23 ` [PATCH 21/42] drm/amdgpu/powerplay: add smu " Alex Deucher
2020-07-14 18:23 ` [PATCH 22/42] drm/amdgpu: add smu block " Alex Deucher
2020-07-14 18:23 ` [PATCH 23/42] drm/amdgpu: add psp support " Alex Deucher
2020-07-14 18:23 ` [PATCH 24/42] drm/amdgpu: add psp block " Alex Deucher
2020-07-14 18:23 ` [PATCH 25/42] drm/amdgpu: use front door firmware loading " Alex Deucher
2020-07-14 18:23 ` [PATCH 26/42] drm/amdkfd: Support navy_flounder KFD Alex Deucher
2020-07-14 18:23 ` [PATCH 27/42] drm/amdkfd: Add kfd2kgd_funcs for navy_flounder kfd support Alex Deucher
2020-07-14 18:23 ` [PATCH 28/42] drm/amdgpu/gfx10: add gc golden setting for navy_flounder Alex Deucher
2020-07-14 18:23 ` [PATCH 29/42] drm/amdgpu: add navy_flounder vcn firmware support Alex Deucher
2020-07-14 18:23 ` [PATCH 30/42] drm/amdgpu: add vcn ip block for navy_flounder Alex Deucher
2020-07-14 18:23 ` [PATCH 31/42] drm/amdgpu: enable cp_fw_write_wait " Alex Deucher
2020-07-14 18:23 ` [PATCH 32/42] drm/amdgpu: enable VCN3.0 PG and CG " Alex Deucher
2020-07-14 18:23 ` [PATCH 33/42] drm/amdgpu: enable VCN3.0 DPG " Alex Deucher
2020-07-14 18:23 ` [PATCH 34/42] drm/amdgpu: enable JPEG3.0 PG and CG " Alex Deucher
2020-07-14 18:23 ` [PATCH 35/42] drm/amdgpu: enable GFX clock gating " Alex Deucher
2020-07-14 18:23 ` [PATCH 36/42] drm/amdgpu: support athub cg setting " Alex Deucher
2020-07-14 18:23 ` [PATCH 37/42] drm/amd/display: add DC support for navy flounder Alex Deucher
2020-07-14 18:23 ` Alex Deucher [this message]
2020-07-14 18:23 ` [PATCH 39/42] drm/amdgpu: enable athub/mmhub PG for navy_flounder Alex Deucher
2020-07-14 18:23 ` [PATCH 40/42] drm/amdgpu: enable mc CG and LS " Alex Deucher
2020-07-14 18:23 ` [PATCH 41/42] drm/amdgpu: enable hdp " Alex Deucher
2020-07-14 18:23 ` [PATCH 42/42] drm/amdgpu: enable ih CG " Alex Deucher

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=20200714182353.2164930-39-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=Jiansong.Chen@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=kenneth.feng@amd.com \
    /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 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.