Skip to contentSkip to conversation

drm/amdgpu: Enable chained IB MCBP support

PATCH In review Trigger Huang 4 participants 4 messages Apr 27, 2017 1 message not in the archive

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

PATCH 1/1 drm/amdgpu: Enable chained IB MCBP support

Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +11 -6
index 2ff5f19..9a8c042 100644
@@ -941,12 +941,6 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)
 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
 	adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
 
-	/* chain ib ucode isn't formal released, just disable it by far
-	 * TODO: when ucod ready we should use ucode version to judge if
-	 * chain-ib support or not.
-	 */
-	adev->virt.chained_ib_support = false;
-
 	adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
 
 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce.bin", chip_name);
@@ -960,6 +954,17 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)
 	adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
 	adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
 
+	/*
+	 * Support for MCBP/Virtualization in combination with chained IBs is
+	 * formal released on feature version #46
+	 */
+	if (adev->gfx.ce_feature_version >= 46 &&
+	    adev->gfx.pfp_feature_version >= 46) {
+		adev->virt.chained_ib_support = true;
+		DRM_INFO("Chained IB support enabled!\n");
+	} else
+		adev->virt.chained_ib_support = false;
+
 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);
 	err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
 	if (err)
Signature · 6 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1493277503-14294-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org

Reviewed-by Monk Liu
#2 lore raw

-----Original Message-----
From: Trigger Huang [mailto:[email protected]]
Sent: Thursday, April 27, 2017 3:18 PM
To: [email protected]
Cc: Liu, Monk <[email protected]>; Yu, Xiangliang <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: Enable chained IB MCBP support

Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -6
index 2ff5f19..9a8c042 100644
@@ -941,12 +941,6 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)
 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
 	adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
 
-	/* chain ib ucode isn't formal released, just disable it by far
-	 * TODO: when ucod ready we should use ucode version to judge if
-	 * chain-ib support or not.
-	 */
-	adev->virt.chained_ib_support = false;
-
 	adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
 
 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce.bin", chip_name); @@ -960,6 +954,17 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)

adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version); adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);

+ /*
+ * Support for MCBP/Virtualization in combination with chained IBs is
+ * formal released on feature version #46
+ */
+ if (adev->gfx.ce_feature_version >= 46 &&
+ adev->gfx.pfp_feature_version >= 46) {
+ adev->virt.chained_ib_support = true;
+ DRM_INFO("Chained IB support enabled!\n");
+ } else
+ adev->virt.chained_ib_support = false;
+
snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name); err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev); if (err)
--
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Xiangliang Yu
#3 lore raw
In reply to a message not in the archive

Thanks!
Xiangliang Yu

Quoted 62 lines

-----Original Message-----
From: Trigger Huang [mailto:[email protected]]
Sent: Thursday, April 27, 2017 3:18 PM
To: [email protected]
Cc: Liu, Monk <[email protected]>; Yu, Xiangliang <[email protected]>; Huang, Trigger <[email protected]>
Subject: [PATCH] drm/amdgpu: Enable chained IB MCBP support

Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang.

---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -6
index 2ff5f19..9a8c042 100644
@@ -941,12 +941,6 @@ static int gfx_v8_0_init_microcode(struct
 amdgpu_device *adev)
 	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev-
 >gfx.me_fw->data;
 	adev->gfx.me_fw_version = le32_to_cpu(cp_hdr-
 >header.ucode_version);
 
-	/* chain ib ucode isn't formal released, just disable it by far
-	 * TODO: when ucod ready we should use ucode version to judge if
-	 * chain-ib support or not.
-	 */
-	adev->virt.chained_ib_support = false;
-

adev->gfx.me_feature_version = le32_to_cpu(cp_hdr-

Quoted 1 line

ucode_feature_version);

snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce.bin",
chip_name); @@ -960,6 +954,17 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)
adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr-

Quoted 1 line

header.ucode_version);

adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr-

Quoted 1 line

ucode_feature_version);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +11 -0
+	/*
+	 * Support for MCBP/Virtualization in combination with chained IBs is
+	 * formal released on feature version #46
+	 */
+	if (adev->gfx.ce_feature_version >= 46 &&
+	    adev->gfx.pfp_feature_version >= 46) {
+		adev->virt.chained_ib_support = true;
+		DRM_INFO("Chained IB support enabled!\n");
+	} else
+		adev->virt.chained_ib_support = false;
+
 	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin",

chip_name);

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +0 -1
 	err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
 	if (err)
--
Quoted 1 line

2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by
#4 lore raw
In reply to a message not in the archive

Am 27.04.2017 um 09:18 schrieb Trigger Huang:

Quoted 6 lines

Support for MCBP/Virtualization in combination with chained IBs is formal released on firmware feature version #46. So enable it according to firmware feature version, otherwise, world switch will hang.

Quoted 29 lines
---
  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 17 +++++++++++------
  1 file changed, 11 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +4 -6
index 2ff5f19..9a8c042 100644
@@ -941,12 +941,6 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)
  	cp_hdr = (const struct gfx_firmware_header_v1_0 *)adev->gfx.me_fw->data;
  	adev->gfx.me_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
 
-	/* chain ib ucode isn't formal released, just disable it by far
-	 * TODO: when ucod ready we should use ucode version to judge if
-	 * chain-ib support or not.
-	 */
-	adev->virt.chained_ib_support = false;
-
  	adev->gfx.me_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
 
  	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ce.bin", chip_name);
@@ -960,6 +954,17 @@ static int gfx_v8_0_init_microcode(struct amdgpu_device *adev)
  	adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);
  	adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);
 
+	/*
+	 * Support for MCBP/Virtualization in combination with chained IBs is
+	 * formal released on feature version #46
+	 */

drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c static int gfx_v8_0_init_microcode(struct amdgpu_device *adev) · line 970

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +7 -0
+	if (adev->gfx.ce_feature_version >= 46 &&
+	    adev->gfx.pfp_feature_version >= 46) {
+		adev->virt.chained_ib_support = true;
+		DRM_INFO("Chained IB support enabled!\n");
+	} else
+		adev->virt.chained_ib_support = false;
+
  	snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);
  	err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);
  	if (err)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx