Skip to contentSkip to conversation

drm/amd/amdgpu/sriov temporarily skip ras, dtm, hdcp for arcturus VF

PATCH In review Jack Zhang 2 participants 3 messages Nov 21, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Jack Zhang

author
#0 lore raw

PATCH 1/2 drm/amd/amdgpu/sriov temporarily skip ras, dtm, hdcp for arcturus VF

Temporarily skip ras,dtm,hdcp initialize and terminate for arcturus VF Currently the three features haven't been enabled at SRIOV, it would trigger guest driver load fail with the bare-metal path of the three features.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +36 -0
index 2a8a08a..c3a42d3 100644
@@ -756,6 +756,12 @@ int psp_ras_enable_features(struct psp_context *psp,
 
 static int psp_ras_terminate(struct psp_context *psp)
 {
+	/*
+	 * TODO: bypass the terminate in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->ras.ras_initialized)
@@ -777,6 +783,12 @@ static int psp_ras_terminate(struct psp_context *psp)
 
 static int psp_ras_initialize(struct psp_context *psp)
 {
+	/*
+	 * TODO: bypass the initialize in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->adev->psp.ta_ras_ucode_size ||
@@ -872,6 +884,12 @@ static int psp_hdcp_load(struct psp_context *psp)
 }
 static int psp_hdcp_initialize(struct psp_context *psp)
 {
+	/*
+	 * TODO: bypass the initialize in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->adev->psp.ta_hdcp_ucode_size ||
@@ -960,6 +978,12 @@ int psp_hdcp_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
 
 static int psp_hdcp_terminate(struct psp_context *psp)
 {
+	/*
+	 * TODO: bypass the terminate in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->hdcp_context.hdcp_initialized)
@@ -1051,6 +1075,12 @@ static int psp_dtm_load(struct psp_context *psp)
 
 static int psp_dtm_initialize(struct psp_context *psp)
 {
+	/*
+	 * TODO: bypass the initialize in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->adev->psp.ta_dtm_ucode_size ||
@@ -1109,6 +1139,12 @@ int psp_dtm_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
 
 static int psp_dtm_terminate(struct psp_context *psp)
 {
+	/*
+	 * TODO: bypass the terminate in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->dtm_context.dtm_initialized)
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): [email protected]

#2 lore raw

Hi, Team,

Would you please help to take a look this patch?

BR
Jack

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jack Zhang
Sent: Thursday, November 21, 2019 2:17 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH 1/2] drm/amd/amdgpu/sriov temporarily skip ras, dtm, hdcp for arcturus VF

Temporarily skip ras,dtm,hdcp initialize and terminate for arcturus VF Currently the three features haven't been enabled at SRIOV, it would trigger guest driver load fail with the bare-metal path of the three features.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +13 -0
index 2a8a08a..c3a42d3 100644
@@ -756,6 +756,12 @@ int psp_ras_enable_features(struct psp_context *psp,
 
 static int psp_ras_terminate(struct psp_context *psp)  {
+	/*
+	 * TODO: bypass the terminate in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->ras.ras_initialized)
@@ -777,6 +783,12 @@ static int psp_ras_terminate(struct psp_context *psp)
 
 static int psp_ras_initialize(struct psp_context *psp)  {
+	/*
+	 * TODO: bypass the initialize in sriov for now
+	 */
+	if (amdgpu_sriov_vf(psp->adev))
+		return 0;
+
 	int ret;
 
 	if (!psp->adev->psp.ta_ras_ucode_size || @@ -872,6 +884,12 @@ static int psp_hdcp_load(struct psp_context *psp)  }  static int psp_hdcp_initialize(struct psp_context *psp)  {
+	/*

+ * TODO: bypass the initialize in sriov for now
+ */
+ if (amdgpu_sriov_vf(psp->adev))
+ return 0;
+
int ret;

if (!psp->adev->psp.ta_hdcp_ucode_size || @@ -960,6 +978,12 @@ int psp_hdcp_invoke(struct psp_context *psp, uint32_t ta_cmd_id)

static int psp_hdcp_terminate(struct psp_context *psp) {
+ /*
+ * TODO: bypass the terminate in sriov for now
+ */
+ if (amdgpu_sriov_vf(psp->adev))
+ return 0;
+
int ret;

if (!psp->hdcp_context.hdcp_initialized)
@@ -1051,6 +1075,12 @@ static int psp_dtm_load(struct psp_context *psp)

static int psp_dtm_initialize(struct psp_context *psp) {
+ /*
+ * TODO: bypass the initialize in sriov for now
+ */
+ if (amdgpu_sriov_vf(psp->adev))
+ return 0;
+
int ret;

if (!psp->adev->psp.ta_dtm_ucode_size || @@ -1109,6 +1139,12 @@ int psp_dtm_invoke(struct psp_context *psp, uint32_t ta_cmd_id)

static int psp_dtm_terminate(struct psp_context *psp) {
+ /*
+ * TODO: bypass the terminate in sriov for now
+ */
+ if (amdgpu_sriov_vf(psp->adev))
+ return 0;
+
int ret;

if (!psp->dtm_context.dtm_initialized)
--
2.7.4

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

#3 lore raw
In reply to a message not in the archive
Quoted 16 lines · Jack Zhang

Temporarily skip ras,dtm,hdcp initialize and terminate for arcturus VF Currently the three features haven't been enabled at SRIOV, it would trigger guest driver load fail with the bare-metal path of the three features.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 2a8a08a..c3a42d3 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c int psp_ras_enable_features(struct psp_context *psp, · line 764

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +6 -0
@@ -756,6 +756,12 @@ int psp_ras_enable_features(struct psp_context *psp,
 
 static int psp_ras_terminate(struct psp_context *psp)
 {
+       /*
+        * TODO: bypass the terminate in sriov for now
+        */
+       if (amdgpu_sriov_vf(psp->adev))
+               return 0;
+

Please move this below the stack variables. You are introducing warnings here. Same comment for all hunks of this patch.

Alex

Quoted 71 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +30 -1
        int ret;
 
        if (!psp->ras.ras_initialized)
@@ -777,6 +783,12 @@ static int psp_ras_terminate(struct psp_context *psp)
 
 static int psp_ras_initialize(struct psp_context *psp)
 {
+       /*
+        * TODO: bypass the initialize in sriov for now
+        */
+       if (amdgpu_sriov_vf(psp->adev))
+               return 0;
+
        int ret;
 
        if (!psp->adev->psp.ta_ras_ucode_size ||
@@ -872,6 +884,12 @@ static int psp_hdcp_load(struct psp_context *psp)
 }
 static int psp_hdcp_initialize(struct psp_context *psp)
 {
+       /*
+        * TODO: bypass the initialize in sriov for now
+        */
+       if (amdgpu_sriov_vf(psp->adev))
+               return 0;
+
        int ret;
 
        if (!psp->adev->psp.ta_hdcp_ucode_size ||
@@ -960,6 +978,12 @@ int psp_hdcp_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
 
 static int psp_hdcp_terminate(struct psp_context *psp)
 {
+       /*
+        * TODO: bypass the terminate in sriov for now
+        */
+       if (amdgpu_sriov_vf(psp->adev))
+               return 0;
+
        int ret;
 
        if (!psp->hdcp_context.hdcp_initialized)
@@ -1051,6 +1075,12 @@ static int psp_dtm_load(struct psp_context *psp)
 
 static int psp_dtm_initialize(struct psp_context *psp)
 {
+       /*
+        * TODO: bypass the initialize in sriov for now
+        */
+       if (amdgpu_sriov_vf(psp->adev))
+               return 0;
+
        int ret;
 
        if (!psp->adev->psp.ta_dtm_ucode_size ||
@@ -1109,6 +1139,12 @@ int psp_dtm_invoke(struct psp_context *psp, uint32_t ta_cmd_id)
 
 static int psp_dtm_terminate(struct psp_context *psp)
 {
+       /*
+        * TODO: bypass the terminate in sriov for now
+        */
+       if (amdgpu_sriov_vf(psp->adev))
+               return 0;
+
        int ret;
 
        if (!psp->dtm_context.dtm_initialized)
--

2.7.4

Quoted 4 lines

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

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