Skip to contentSkip to conversation

Add vpe v2.2.0 support

PATCH In review Caden Chien 2 participants 5 messages May 26

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Add vpe v2.2.0 support

This series adds vpe v2.2.0 support in ip discovery and ip funcs setup. No register update on vpe v2.2.0. Doorbell range initialization is updated accordingly in the same way as vpe v2.0.0 on nbio v7.11.4

Caden Chien (3):
drm/amdgpu/nbio: remove doorbell entry5 for vcn on v7.11.5 drm/amdgpu/nbio: enable doorbell range init for vpe on v7.11.5 drm/amdgpu/vpe: add vpe v2.2.0 support

 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c       |  1 +
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c      | 12 ++++++++----
 drivers/gpu/drm/amd/amdgpu/vpe_v2_0.c         |  1 +
 4 files changed, 11 insertions(+), 4 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/3 drm/amdgpu/nbio: remove doorbell entry5 for vcn on v7.11.5

S2A doorbell entry 5 on nbio v7.11.5 is used by vpe v2.2

---
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c +4 -2
index 28a99b52f59f..872ebb4b3820 100644
@@ -145,7 +145,8 @@ static void nbif_v6_3_1_vcn_doorbell_range(struct amdgpu_device *adev,
 	u32 doorbell_range;
 
 	if (instance) {
-		if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4))
+		if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4) ||
+			amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 5))
 			return;
 		doorbell_range = RREG32_SOC15(NBIO, 0, regGDC_S2A0_S2A_DOORBELL_ENTRY_5_CTRL);
 	} else {
@@ -179,7 +180,8 @@ static void nbif_v6_3_1_vcn_doorbell_range(struct amdgpu_device *adev,
 					       S2A_DOORBELL_PORT4_RANGE_SIZE,
 					       0);
 
-	if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4)) {
+	if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4) ||
+		amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 5)) {
 		WREG32_SOC15(NBIO, 0, regGDC_S2A0_S2A_DOORBELL_ENTRY_4_CTRL_nbif_4_10, doorbell_range);
 	} else {
 		if (instance)
Signature · 1 line
2.53.0
#2 lore raw

PATCH 2/3 drm/amdgpu/nbio: enable doorbell range init for vpe on v7.11.5

In reply to Caden Chien

This initializes doorbell entry 5 for vpe on v7.11.5

---
 drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c +4 -2
index 872ebb4b3820..5c527a15c086 100644
@@ -229,10 +229,12 @@ static void nbif_v6_3_1_vpe_doorbell_range(struct amdgpu_device *adev,
 					       0);
 	}
 
-	if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4))
+	if (amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 4) ||
+		amdgpu_ip_version(adev, NBIO_HWIP, 0) == IP_VERSION(7, 11, 5)) {
 		WREG32_SOC15(NBIO, 0, regGDC_S2A0_S2A_DOORBELL_ENTRY_5_CTRL_nbif_4_10, doorbell_range);
-	else
+	} else {
 		WREG32_SOC15(NBIO, 0, regGDC_S2A0_S2A_DOORBELL_ENTRY_5_CTRL, doorbell_range);
+	}
 
 }
 
Signature · 1 line
2.53.0
#3 lore raw

PATCH 3/3 drm/amdgpu/vpe: add vpe v2.2.0 support

In reply to Caden Chien

This initializes VPE IP version 2.2.0

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c       | 1 +
 drivers/gpu/drm/amd/amdgpu/vpe_v2_0.c         | 1 +
 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index 8e3b6a4050e9..9d95a4f915f9 100644
@@ -2740,6 +2740,7 @@ static int amdgpu_discovery_set_vpe_ip_blocks(struct amdgpu_device *adev)
 		amdgpu_device_ip_block_add(adev, &vpe_v6_1_ip_block);
 		break;
 	case IP_VERSION(2, 0, 0):
+	case IP_VERSION(2, 2, 0):
 		amdgpu_device_ip_block_add(adev, &vpe_v2_0_ip_block);
 		break;
 	default:
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -0
index 601420491477..7bf74ff93fbd 100644
@@ -312,6 +312,7 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)
 		vpe->collaborate_mode = true;
 		break;
 	case IP_VERSION(2, 0, 0):
+	case IP_VERSION(2, 2, 0):
 		vpe_v2_0_set_funcs(vpe);
 		break;
 	default:
drivers/gpu/drm/amd/amdgpu/vpe_v2_0.c +1 -0
index 0d91e01fbf3a..c92c5fc59aeb 100644
@@ -31,6 +31,7 @@
 #include "vpe/vpe_2_0_0_sh_mask.h"
 
 MODULE_FIRMWARE("amdgpu/vpe_2_0_0.bin");
+MODULE_FIRMWARE("amdgpu/vpe_2_2_0.bin");
 
 #define VPE_THREAD1_UCODE_OFFSET	0x8000
 
Signature · 1 line
2.53.0
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] drm/amdgpu/vpe: add vpe v2.2.0 support

Quoted 4 lines · Caden Chien

This initializes VPE IP version 2.2.0

Series is:

Quoted 45 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c       | 1 +
 drivers/gpu/drm/amd/amdgpu/vpe_v2_0.c         | 1 +
 3 files changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -0
index 8e3b6a4050e9..9d95a4f915f9 100644
@@ -2740,6 +2740,7 @@ static int amdgpu_discovery_set_vpe_ip_blocks(struct amdgpu_device *adev)
                amdgpu_device_ip_block_add(adev, &vpe_v6_1_ip_block);
                break;
        case IP_VERSION(2, 0, 0):
+       case IP_VERSION(2, 2, 0):
                amdgpu_device_ip_block_add(adev, &vpe_v2_0_ip_block);
                break;
        default:
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.c +1 -0
index 601420491477..7bf74ff93fbd 100644
@@ -312,6 +312,7 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)
                vpe->collaborate_mode = true;
                break;
        case IP_VERSION(2, 0, 0):
+       case IP_VERSION(2, 2, 0):
                vpe_v2_0_set_funcs(vpe);
                break;
        default:
drivers/gpu/drm/amd/amdgpu/vpe_v2_0.c +1 -1
index 0d91e01fbf3a..c92c5fc59aeb 100644
@@ -31,6 +31,7 @@
 #include "vpe/vpe_2_0_0_sh_mask.h"
 
 MODULE_FIRMWARE("amdgpu/vpe_2_0_0.bin");
+MODULE_FIRMWARE("amdgpu/vpe_2_2_0.bin");
 
 #define VPE_THREAD1_UCODE_OFFSET       0x8000
 
--

2.53.0