Skip to contentSkip to conversation

drm/amdmgpu: don't enable secure display on incompatible platforms

PATCH In review Jesse Zhang 2 participants 2 messages May 19, 2023

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

PATCH 1/1 drm/amdmgpu: don't enable secure display on incompatible platforms

[why]
[drm] psp gfx command LOAD_TA(0x1) failed and response status is (0x7) [drm] psp gfx command INVOKE_CMD(0x3) failed and response status is (0x4) amdgpu 0000:04:00.0: amdgpu: Secure display: Generic Failure.

[how]
don't enable secure display on incompatible platforms

---
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +7 -1
index e1b7fca09666..5f10883da6a2 100644
@@ -57,7 +57,13 @@ static int psp_v10_0_init_microcode(struct psp_context *psp)
 	if (err)
 		return err;
 
-	return psp_init_ta_microcode(psp, ucode_prefix);
+	err = psp_init_ta_microcode(psp, ucode_prefix);
+	if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 1, 0)) &&
+		(adev->pdev->revision == 0xa1) &&
+		(psp->securedisplay_context.context.bin_desc.fw_version >= 0x27000008)) {
+		adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0;
+	}
+	return err;
 }
 
 static int psp_v10_0_ring_create(struct psp_context *psp,
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only - General]

Just a nit-pick for "drm/amdgpu".
With this fixed, Reviewed-by: Aaron Liu <[email protected]>

Quoted 49 lines

-----Original Message-----
From: Jesse Zhang <[email protected]>
Sent: Friday, May 19, 2023 9:53 AM
To: Deucher, Alexander <[email protected]>
Cc: Shavakh, Shadi <[email protected]>; Strauss, Andrew <[email protected]>; [email protected]; Zhang, Jesse(Jie) <[email protected]>; Liu, Aaron <[email protected]>
Subject: [PATCH] drm/amdmgpu: don't enable secure display on incompatible platforms

[why]
[drm] psp gfx command LOAD_TA(0x1) failed and response status is (0x7) [drm] psp gfx command INVOKE_CMD(0x3) failed and response status is (0x4) amdgpu 0000:04:00.0: amdgpu: Secure display: Generic Failure.

[how]
don't enable secure display on incompatible platforms

---
 drivers/gpu/drm/amd/amdgpu/psp_v10_0.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/psp_v10_0.c +7 -1
index e1b7fca09666..5f10883da6a2 100644
@@ -57,7 +57,13 @@ static int psp_v10_0_init_microcode(struct psp_context
 *psp)
      if (err)
              return err;
 
-     return psp_init_ta_microcode(psp, ucode_prefix);
+     err = psp_init_ta_microcode(psp, ucode_prefix);
+     if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 1, 0)) &&
+             (adev->pdev->revision == 0xa1) &&
+             (psp->securedisplay_context.context.bin_desc.fw_version >=
 0x27000008)) {
+             adev->psp.securedisplay_context.context.bin_desc.size_bytes =
 0;
+     }
+     return err;

}

static int psp_v10_0_ring_create(struct psp_context *psp,
--
2.25.1