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>,
	Tao Zhou <tao.zhou1@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: [PATCH 23/50] drm/amdgpu/swsmu: add smu support for dimgrey_cavefish(v2)
Date: Wed,  7 Oct 2020 12:31:08 -0400	[thread overview]
Message-ID: <20201007163135.1944186-24-alexander.deucher@amd.com> (raw)
In-Reply-To: <20201007163135.1944186-1-alexander.deucher@amd.com>

From: Tao Zhou <tao.zhou1@amd.com>

Reuse sienna_cichlid pp table for dimgrey_cavefish.

v2: update related comment.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/pm/inc/smu_v11_0.h         |  1 +
 drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c      |  1 +
 drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 17 ++++++++++++++---
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h b/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h
index 8885bde3ea3d..9351abf99b31 100644
--- a/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h
+++ b/drivers/gpu/drm/amd/pm/inc/smu_v11_0.h
@@ -33,6 +33,7 @@
 #define SMU11_DRIVER_IF_VERSION_Sienna_Cichlid 0x39
 #define SMU11_DRIVER_IF_VERSION_Navy_Flounder 0x5
 #define SMU11_DRIVER_IF_VERSION_VANGOGH 0x01
+#define SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish 0x1
 
 /* MP Apertures */
 #define MP0_Public			0x03800000
diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
index fc482ce4b400..e84b40d9b8c7 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c
@@ -397,6 +397,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
 		break;
 	case CHIP_SIENNA_CICHLID:
 	case CHIP_NAVY_FLOUNDER:
+	case CHIP_DIMGREY_CAVEFISH:
 		sienna_cichlid_set_ppt_funcs(smu);
 		break;
 	case CHIP_RENOIR:
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
index 8248e557cd1a..983cee668da1 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
@@ -62,6 +62,7 @@ MODULE_FIRMWARE("amdgpu/navi14_smc.bin");
 MODULE_FIRMWARE("amdgpu/navi12_smc.bin");
 MODULE_FIRMWARE("amdgpu/sienna_cichlid_smc.bin");
 MODULE_FIRMWARE("amdgpu/navy_flounder_smc.bin");
+MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_smc.bin");
 
 #define SMU11_VOLTAGE_SCALE 4
 
@@ -109,6 +110,9 @@ int smu_v11_0_init_microcode(struct smu_context *smu)
 	case CHIP_NAVY_FLOUNDER:
 		chip_name = "navy_flounder";
 		break;
+	case CHIP_DIMGREY_CAVEFISH:
+		chip_name = "dimgrey_cavefish";
+		break;
 	default:
 		dev_err(adev->dev, "Unsupported ASIC type %d\n", adev->asic_type);
 		return -EINVAL;
@@ -247,6 +251,9 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
 	case CHIP_VANGOGH:
 		smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_VANGOGH;
 		break;
+	case CHIP_DIMGREY_CAVEFISH:
+		smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_Dimgrey_Cavefish;
+		break;
 	default:
 		dev_err(smu->adev->dev, "smu unsupported asic type:%d.\n", smu->adev->asic_type);
 		smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_INV;
@@ -330,7 +337,8 @@ int smu_v11_0_setup_pptable(struct smu_context *smu)
 		version_major = le16_to_cpu(hdr->header.header_version_major);
 		version_minor = le16_to_cpu(hdr->header.header_version_minor);
 		if ((version_major == 2 && smu->smu_table.boot_values.pp_table_id > 0) ||
-			adev->asic_type == CHIP_NAVY_FLOUNDER) {
+		    adev->asic_type == CHIP_NAVY_FLOUNDER ||
+		    adev->asic_type == CHIP_DIMGREY_CAVEFISH) {
 			dev_info(adev->dev, "use driver provided pptable %d\n", smu->smu_table.boot_values.pp_table_id);
 			switch (version_minor) {
 			case 0:
@@ -702,8 +710,11 @@ int smu_v11_0_init_display_count(struct smu_context *smu, uint32_t count)
 {
 	struct amdgpu_device *adev = smu->adev;
 
-	/* Navy_Flounder do not support to change display num currently */
-	if (adev->asic_type == CHIP_NAVY_FLOUNDER)
+	/* Navy_Flounder/Dimgrey_Cavefish do not support to change
+	 * display num currently
+	 */
+	if (adev->asic_type >= CHIP_NAVY_FLOUNDER &&
+	    adev->asic_type <= CHIP_DIMGREY_CAVEFISH)
 		return 0;
 
 	return smu_cmn_send_smc_msg_with_param(smu,
-- 
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-10-07 16:32 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 16:30 [PATCH 00/50] Add support for Dimgrey Cavefish Alex Deucher
2020-10-07 16:30 ` [PATCH 01/50] drm/amdgpu: add dimgrey_cavefish asic type Alex Deucher
2020-10-07 16:30 ` [PATCH 02/50] drm/amdgpu: add dimgrey_cavefish gpu info firmware Alex Deucher
2020-10-07 16:30 ` [PATCH 03/50] drm/amdgpu: set fw load type for dimgrey_cavefish Alex Deucher
2020-10-07 16:30 ` [PATCH 04/50] drm/amdgpu: set asic family and ip blocks " Alex Deucher
2020-10-07 16:30 ` [PATCH 05/50] drm/amdgpu: add support for dimgrey_cavefish firmware Alex Deucher
2020-10-07 16:30 ` [PATCH 06/50] drm/amdgpu: add gmc support for dimgrey_cavefish Alex Deucher
2020-10-07 16:30 ` [PATCH 07/50] drm/amdgpu: add gfx clock gating " Alex Deucher
2020-10-07 16:30 ` [PATCH 08/50] drm/amdgpu: add common " Alex Deucher
2020-10-07 16:30 ` [PATCH 09/50] drm/amdgpu: initialize IP offset " Alex Deucher
2020-10-07 16:30 ` [PATCH 10/50] drm/amdgpu: add mmhub support " Alex Deucher
2020-10-07 16:30 ` [PATCH 11/50] drm/amdgpu: add common ip block " Alex Deucher
2020-10-07 16:30 ` [PATCH 12/50] drm/amdgpu: add gmc " Alex Deucher
2020-10-07 16:30 ` [PATCH 13/50] drm/amdgpu: add ih " Alex Deucher
2020-10-07 16:30 ` [PATCH 14/50] drm/amdgpu: add gfx " Alex Deucher
2020-10-07 16:31 ` [PATCH 15/50] drm/amdgpu: add sdma " Alex Deucher
2020-10-07 16:31 ` [PATCH 16/50] drm/amdgpu: configure dimgrey_cavefish gfx according to gfx 10.3's definition Alex Deucher
2020-10-07 16:31 ` [PATCH 17/50] drm/amdgpu: add virtual display support for dimgrey_cavefish Alex Deucher
2020-10-07 16:31 ` [PATCH 18/50] drm/amdgpu: force pa_sc_tile_steering_override to 0 " Alex Deucher
2020-10-07 16:31 ` [PATCH 19/50] drm/amdgpu/vcn: add firmware support " Alex Deucher
2020-10-07 16:31 ` [PATCH 20/50] drm/amdgpu/vcn: enable VCN DPG mode " Alex Deucher
2020-10-07 16:31 ` [PATCH 21/50] drm/amdgpu: add gmc cg support " Alex Deucher
2020-10-07 16:31 ` [PATCH 22/50] drm/amdgpu/swsmu: increase size for smu fw_name string Alex Deucher
2020-10-07 16:31 ` Alex Deucher [this message]
2020-10-07 16:31 ` [PATCH 24/50] drm/amdgpu: increase size of psp fw_name string(v2) Alex Deucher
2020-10-07 16:31 ` [PATCH 25/50] drm/amdgpu: add psp support for dimgrey_cavefish(v2) Alex Deucher
2020-10-07 16:31 ` [PATCH 26/50] drm/amdgpu: skip reroute ih for some ASICs Alex Deucher
2020-10-07 16:31 ` [PATCH 27/50] drm/amdgpu: support cp_fw_write_wait for dimgrey_cavefish Alex Deucher
2020-10-07 16:31 ` [PATCH 28/50] drm/amdgpu: add gc golden setting " Alex Deucher
2020-10-07 16:31 ` [PATCH 29/50] drm/amdkfd: Support dimgrey_cavefish KFD (v2) Alex Deucher
2020-10-07 16:31 ` [PATCH 30/50] drm/amdkfd: Add kfd2kgd_funcs for dimgrey_cavefish kfd support Alex Deucher
2020-10-07 16:31 ` [PATCH 31/50] drm/amdgpu: enable VCN3.0 PG and CG for dimgrey_cavefish Alex Deucher
2020-10-07 16:31 ` [PATCH 32/50] drm/amdgpu: enable jpeg3.0 " Alex Deucher
2020-10-07 16:31 ` [PATCH 33/50] drm/amdgpu: enable front door loading " Alex Deucher
2020-10-07 16:31 ` [PATCH 34/50] drm/amdgpu: support athub cg setting " Alex Deucher
2020-10-07 16:31 ` [PATCH 35/50] drm/amdgpu/swsmu: update driver if version " Alex Deucher
2020-10-07 16:31 ` [PATCH 36/50] drm/amdgpu: enable GFX clock gating " Alex Deucher
2020-10-07 16:31 ` [PATCH 37/50] drm/amdgpu: enable mc CG and LS " Alex Deucher
2020-10-07 16:31 ` [PATCH 38/50] drm/amdgpu: enable athub/mmhub PG " Alex Deucher
2020-10-07 16:31 ` [PATCH 39/50] drm/amdgpu/swsmu: update driver if version " Alex Deucher
2020-10-07 16:31 ` [PATCH 40/50] drm/amdgpu: enable vcn3.0 for dimgrey_cavefis Alex Deucher
2020-10-07 16:31 ` [PATCH 41/50] drm/amdgpu: enable jpeg3.0 for dimgrey_cavefish Alex Deucher
2020-10-07 16:31 ` [PATCH 42/50] drm/amdgpu/swsmu: update driver if version " Alex Deucher
2020-10-07 16:31 ` [PATCH 43/50] drm/amdgpu/swsmu: update driver if version for dimgrey_cavefish(v2) Alex Deucher
2020-10-07 16:31 ` [PATCH 44/50] drm/amdgpu: add psp and smu block for dimgrey_cavefish Alex Deucher
2020-10-07 16:31 ` [PATCH 45/50] drm/amdgpu: enable hdp CG and LS " Alex Deucher
2020-10-07 16:31 ` [PATCH 46/50] drm/amdgpu: enable ih CG " Alex Deucher
2020-10-07 16:31 ` [PATCH 47/50] drm/amdgpu: remove gpu_info fw support " Alex Deucher
2020-10-07 16:31 ` [PATCH 48/50] drm/amdgpu/swsmu: update driver if version " Alex Deucher
2020-10-07 16:31 ` [PATCH 49/50] drm/amd/display: Add support for DCN302 (v2) Alex Deucher
2020-10-07 16:31 ` [PATCH 50/50] drm/amd/display: Add DCN302 support in amdgpu_dm (v2) 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=20201007163135.1944186-24-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=tao.zhou1@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.