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>,
	Jiansong Chen <Jiansong.Chen@amd.com>,
	Tao Zhou <tao.zhou1@amd.com>,
	Hawking Zhang <Hawking.Zhang@amd.com>
Subject: [PATCH 15/50] drm/amdgpu: add sdma ip block for dimgrey_cavefish
Date: Wed,  7 Oct 2020 12:31:00 -0400	[thread overview]
Message-ID: <20201007163135.1944186-16-alexander.deucher@amd.com> (raw)
In-Reply-To: <20201007163135.1944186-1-alexander.deucher@amd.com>

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

Enable sdma block for dimgrey_cavefish, same as sienna_cichlid.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Jiansong Chen <Jiansong.Chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/nv.c        |  1 +
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 11 +++++++++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 573c16f2c537..2974f45c4571 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -631,6 +631,7 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
 		amdgpu_device_ip_block_add(adev, &gmc_v10_0_ip_block);
 		amdgpu_device_ip_block_add(adev, &navi10_ih_ip_block);
 		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
+		amdgpu_device_ip_block_add(adev, &sdma_v5_2_ip_block);
 		break;
 	default:
 		return -EINVAL;
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
index 100d0a921ede..18eca0d4dbcc 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c
@@ -46,6 +46,7 @@
 
 MODULE_FIRMWARE("amdgpu/sienna_cichlid_sdma.bin");
 MODULE_FIRMWARE("amdgpu/navy_flounder_sdma.bin");
+MODULE_FIRMWARE("amdgpu/dimgrey_cavefish_sdma.bin");
 
 MODULE_FIRMWARE("amdgpu/vangogh_sdma.bin");
 
@@ -90,6 +91,7 @@ static void sdma_v5_2_init_golden_registers(struct amdgpu_device *adev)
 	case CHIP_SIENNA_CICHLID:
 	case CHIP_NAVY_FLOUNDER:
 	case CHIP_VANGOGH:
+	case CHIP_DIMGREY_CAVEFISH:
 		break;
 	default:
 		break;
@@ -166,6 +168,9 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
 	case CHIP_VANGOGH:
 		chip_name = "vangogh";
 		break;
+	case CHIP_DIMGREY_CAVEFISH:
+		chip_name = "dimgrey_cavefish";
+		break;
 	default:
 		BUG();
 	}
@@ -181,8 +186,8 @@ static int sdma_v5_2_init_microcode(struct amdgpu_device *adev)
 		goto out;
 
 	for (i = 1; i < adev->sdma.num_instances; i++) {
-		if (adev->asic_type == CHIP_SIENNA_CICHLID ||
-		    adev->asic_type == CHIP_NAVY_FLOUNDER) {
+		if (adev->asic_type >= CHIP_SIENNA_CICHLID &&
+		    adev->asic_type <= CHIP_DIMGREY_CAVEFISH) {
 			memcpy((void*)&adev->sdma.instance[i],
 			       (void*)&adev->sdma.instance[0],
 			       sizeof(struct amdgpu_sdma_instance));
@@ -1175,6 +1180,7 @@ static int sdma_v5_2_early_init(void *handle)
 		adev->sdma.num_instances = 4;
 		break;
 	case CHIP_NAVY_FLOUNDER:
+	case CHIP_DIMGREY_CAVEFISH:
 		adev->sdma.num_instances = 2;
 		break;
 	case CHIP_VANGOGH:
@@ -1577,6 +1583,7 @@ static int sdma_v5_2_set_clockgating_state(void *handle,
 	case CHIP_SIENNA_CICHLID:
 	case CHIP_NAVY_FLOUNDER:
 	case CHIP_VANGOGH:
+	case CHIP_DIMGREY_CAVEFISH:
 		sdma_v5_2_update_medium_grain_clock_gating(adev,
 				state == AMD_CG_STATE_GATE ? true : false);
 		sdma_v5_2_update_medium_grain_light_sleep(adev,
-- 
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 ` Alex Deucher [this message]
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 ` [PATCH 23/50] drm/amdgpu/swsmu: add smu support for dimgrey_cavefish(v2) Alex Deucher
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-16-alexander.deucher@amd.com \
    --to=alexdeucher@gmail.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Jiansong.Chen@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.