Skip to contentSkip to conversation

drm/amdgpu: log TA versions on init

PATCH In review Bhawanpreet Lakha 3 participants 5 messages Feb 24, 2020 – Feb 25, 2020

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

PATCH 1/1 drm/amdgpu: log TA versions on init

It is helpful to know what version the TA's are for debugging

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5 -0
index a16c8101e250..09d1433677a6 100644
@@ -358,6 +358,7 @@ static int psp_asd_load(struct psp_context *psp)
 	if (!ret) {
 		psp->asd_context.asd_initialized = true;
 		psp->asd_context.session_id = cmd->resp.session_id;
+		DRM_INFO("ASD: Initialized (version: 0x%X)", psp->asd_fw_version);
 	}
 
 	kfree(cmd);
@@ -518,6 +519,7 @@ static int psp_xgmi_load(struct psp_context *psp)
 	if (!ret) {
 		psp->xgmi_context.initialized = 1;
 		psp->xgmi_context.session_id = cmd->resp.session_id;
+		DRM_INFO("XGMI: Initialized (version: 0x%X)", psp->ta_xgmi_ucode_version);
 	}
 
 	kfree(cmd);
@@ -658,6 +660,7 @@ static int psp_ras_load(struct psp_context *psp)
 	if (!ret) {
 		psp->ras.ras_initialized = true;
 		psp->ras.session_id = cmd->resp.session_id;
+		DRM_INFO("RAS: Initialized (version: 0x%X)", psp->ta_ras_ucode_version);
 	}
 
 	kfree(cmd);
@@ -832,6 +835,7 @@ static int psp_hdcp_load(struct psp_context *psp)
 	if (!ret) {
 		psp->hdcp_context.hdcp_initialized = true;
 		psp->hdcp_context.session_id = cmd->resp.session_id;
+		DRM_INFO("HDCP: Initialized (version: 0x%X)", psp->ta_hdcp_ucode_version);
 	}
 
 	kfree(cmd);
@@ -977,6 +981,7 @@ static int psp_dtm_load(struct psp_context *psp)
 	if (!ret) {
 		psp->dtm_context.dtm_initialized = true;
 		psp->dtm_context.session_id = cmd->resp.session_id;
+		DRM_INFO("DTM: Initialized (version: 0x%X)", psp->ta_dtm_ucode_version);
 	}
 
 	kfree(cmd);
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Bhawanpreet Lakha
Sent: 2020/February/24, Monday 2:45 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: [PATCH] drm/amdgpu: log TA versions on init

Quoted 3 lines

It is helpful to know what version the TA's are for debugging

Quoted 57 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
index a16c8101e250..09d1433677a6 100644
@@ -358,6 +358,7 @@ static int psp_asd_load(struct psp_context *psp)
 	if (!ret) {
 		psp->asd_context.asd_initialized = true;
 		psp->asd_context.session_id = cmd->resp.session_id;
+		DRM_INFO("ASD: Initialized (version: 0x%X)", psp-
 >asd_fw_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -518,6 +519,7 @@ static int psp_xgmi_load(struct psp_context *psp)
 	if (!ret) {
 		psp->xgmi_context.initialized = 1;
 		psp->xgmi_context.session_id = cmd->resp.session_id;
+		DRM_INFO("XGMI: Initialized (version: 0x%X)", psp-
 >ta_xgmi_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -658,6 +660,7 @@ static int psp_ras_load(struct psp_context *psp)
 	if (!ret) {
 		psp->ras.ras_initialized = true;
 		psp->ras.session_id = cmd->resp.session_id;
+		DRM_INFO("RAS: Initialized (version: 0x%X)", psp-
 >ta_ras_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -832,6 +835,7 @@ static int psp_hdcp_load(struct psp_context *psp)
 	if (!ret) {
 		psp->hdcp_context.hdcp_initialized = true;
 		psp->hdcp_context.session_id = cmd->resp.session_id;
+		DRM_INFO("HDCP: Initialized (version: 0x%X)", psp-
 >ta_hdcp_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -977,6 +981,7 @@ static int psp_dtm_load(struct psp_context *psp)
 	if (!ret) {
 		psp->dtm_context.dtm_initialized = true;
 		psp->dtm_context.session_id = cmd->resp.session_id;
+		DRM_INFO("DTM: Initialized (version: 0x%X)", psp-
 >ta_dtm_ucode_version);
 	}
 

kfree(cmd);
--
2.17.1

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

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

Reviewed-by Zhan Liu
#2 lore raw

[AMD Official Use Only - Internal Distribution Only]

Hold on please.

I don't think this is the best approach as we already had existing debugfs interface for that purpose. We shall centralize all the firmware information query under amdgpu_debugfs_firmware_info, and user should go through debugfs to query firmware information.

Regards,
Hawking
-----Original Message-----
From: Liu, Zhan <[email protected]>
Sent: Tuesday, February 25, 2020 04:55
To: Lakha, Bhawanpreet <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: log TA versions on init

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Bhawanpreet Lakha
Sent: 2020/February/24, Monday 2:45 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: [PATCH] drm/amdgpu: log TA versions on init

Quoted 3 lines

It is helpful to know what version the TA's are for debugging

Quoted 57 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
index a16c8101e250..09d1433677a6 100644
@@ -358,6 +358,7 @@ static int psp_asd_load(struct psp_context *psp)
 	if (!ret) {
 		psp->asd_context.asd_initialized = true;
 		psp->asd_context.session_id = cmd->resp.session_id;
+		DRM_INFO("ASD: Initialized (version: 0x%X)", psp-
 >asd_fw_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -518,6 +519,7 @@ static int psp_xgmi_load(struct psp_context *psp)
 	if (!ret) {
 		psp->xgmi_context.initialized = 1;
 		psp->xgmi_context.session_id = cmd->resp.session_id;
+		DRM_INFO("XGMI: Initialized (version: 0x%X)", psp-
 >ta_xgmi_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -658,6 +660,7 @@ static int psp_ras_load(struct psp_context *psp)
 	if (!ret) {
 		psp->ras.ras_initialized = true;
 		psp->ras.session_id = cmd->resp.session_id;
+		DRM_INFO("RAS: Initialized (version: 0x%X)", psp-
 >ta_ras_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -832,6 +835,7 @@ static int psp_hdcp_load(struct psp_context *psp)
 	if (!ret) {
 		psp->hdcp_context.hdcp_initialized = true;
 		psp->hdcp_context.session_id = cmd->resp.session_id;
+		DRM_INFO("HDCP: Initialized (version: 0x%X)", psp-
 >ta_hdcp_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -977,6 +981,7 @@ static int psp_dtm_load(struct psp_context *psp)
 	if (!ret) {
 		psp->dtm_context.dtm_initialized = true;
 		psp->dtm_context.session_id = cmd->resp.session_id;
+		DRM_INFO("DTM: Initialized (version: 0x%X)", psp-
 >ta_dtm_ucode_version);
 	}
 

kfree(cmd);
--
2.17.1

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

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

Reviewed-by Zhan Liu
#3 lore raw

[AMD Official Use Only - Internal Distribution Only]

Specific for your case, you just need add dtm and hdcp ta version in amdgpu_debugfs_firmware_info, Similar as xgmi and ras ta. The following cmd will give you all the firmware version information.

sudo cat /sys/kernel/debug/dri/x/amdgpu_firmware_info

Regards,
Hawking

-----Original Message-----
From: Zhang, Hawking
Sent: Tuesday, February 25, 2020 14:27
To: Liu, Zhan <[email protected]>; Lakha, Bhawanpreet <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: log TA versions on init

[AMD Official Use Only - Internal Distribution Only]

Hold on please.

I don't think this is the best approach as we already had existing debugfs interface for that purpose. We shall centralize all the firmware information query under amdgpu_debugfs_firmware_info, and user should go through debugfs to query firmware information.

Regards,
Hawking
-----Original Message-----
From: Liu, Zhan <[email protected]>
Sent: Tuesday, February 25, 2020 04:55
To: Lakha, Bhawanpreet <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: log TA versions on init

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Bhawanpreet Lakha
Sent: 2020/February/24, Monday 2:45 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: [PATCH] drm/amdgpu: log TA versions on init

Quoted 3 lines

It is helpful to know what version the TA's are for debugging

Quoted 57 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
index a16c8101e250..09d1433677a6 100644
@@ -358,6 +358,7 @@ static int psp_asd_load(struct psp_context *psp)
 	if (!ret) {
 		psp->asd_context.asd_initialized = true;
 		psp->asd_context.session_id = cmd->resp.session_id;
+		DRM_INFO("ASD: Initialized (version: 0x%X)", psp-
 >asd_fw_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -518,6 +519,7 @@ static int psp_xgmi_load(struct psp_context *psp)
 	if (!ret) {
 		psp->xgmi_context.initialized = 1;
 		psp->xgmi_context.session_id = cmd->resp.session_id;
+		DRM_INFO("XGMI: Initialized (version: 0x%X)", psp-
 >ta_xgmi_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -658,6 +660,7 @@ static int psp_ras_load(struct psp_context *psp)
 	if (!ret) {
 		psp->ras.ras_initialized = true;
 		psp->ras.session_id = cmd->resp.session_id;
+		DRM_INFO("RAS: Initialized (version: 0x%X)", psp-
 >ta_ras_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -832,6 +835,7 @@ static int psp_hdcp_load(struct psp_context *psp)
 	if (!ret) {
 		psp->hdcp_context.hdcp_initialized = true;
 		psp->hdcp_context.session_id = cmd->resp.session_id;
+		DRM_INFO("HDCP: Initialized (version: 0x%X)", psp-
 >ta_hdcp_ucode_version);
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
 	kfree(cmd);
@@ -977,6 +981,7 @@ static int psp_dtm_load(struct psp_context *psp)
 	if (!ret) {
 		psp->dtm_context.dtm_initialized = true;
 		psp->dtm_context.session_id = cmd->resp.session_id;
+		DRM_INFO("DTM: Initialized (version: 0x%X)", psp-
 >ta_dtm_ucode_version);
 	}
 

kfree(cmd);
--
2.17.1

Quoted 3 lines

_______________________________________________
amd-gfx mailing list
[email protected]

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

#4 lore raw

Hi Hawking,

The goal here was to know about the TA versions from just the dmesg only, its helpful as we don't have to ask the user to query data again as dmesg is the first thing that is usually shared for issues.

For now I will add it to the debugfs.

Bhawan

Quoted 41 lines · Hawking

[AMD Official Use Only - Internal Distribution Only]

Specific for your case, you just need add dtm and hdcp ta version in amdgpu_debugfs_firmware_info, Similar as xgmi and ras ta. The following cmd will give you all the firmware version information.

sudo cat /sys/kernel/debug/dri/x/amdgpu_firmware_info

Regards,
Hawking

-----Original Message-----
From: Zhang, Hawking
Sent: Tuesday, February 25, 2020 14:27
To: Liu, Zhan <[email protected]>; Lakha, Bhawanpreet <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: log TA versions on init

[AMD Official Use Only - Internal Distribution Only]

Hold on please.

I don't think this is the best approach as we already had existing debugfs interface for that purpose. We shall centralize all the firmware information query under amdgpu_debugfs_firmware_info, and user should go through debugfs to query firmware information.

Regards,
Hawking
-----Original Message-----
From: Liu, Zhan <[email protected]>
Sent: Tuesday, February 25, 2020 04:55
To: Lakha, Bhawanpreet <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: log TA versions on init

Quoted 9 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Bhawanpreet Lakha
Sent: 2020/February/24, Monday 2:45 PM
To: [email protected]; Deucher, Alexander <[email protected]>; Zhang, Hawking <[email protected]>
Cc: Lakha, Bhawanpreet <[email protected]>
Subject: [PATCH] drm/amdgpu: log TA versions on init

Quoted 65 lines
Quoted 3 lines

It is helpful to know what version the TA's are for debugging

Quoted 60 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
index a16c8101e250..09d1433677a6 100644
@@ -358,6 +358,7 @@ static int psp_asd_load(struct psp_context *psp)
  	if (!ret) {
  		psp->asd_context.asd_initialized = true;
  		psp->asd_context.session_id = cmd->resp.session_id;
+		DRM_INFO("ASD: Initialized (version: 0x%X)", psp-
 > asd_fw_version);
  	}
 
  	kfree(cmd);
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
@@ -518,6 +519,7 @@ static int psp_xgmi_load(struct psp_context *psp)
  	if (!ret) {
  		psp->xgmi_context.initialized = 1;
  		psp->xgmi_context.session_id = cmd->resp.session_id;
+		DRM_INFO("XGMI: Initialized (version: 0x%X)", psp-
 > ta_xgmi_ucode_version);
  	}
 
  	kfree(cmd);
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
@@ -658,6 +660,7 @@ static int psp_ras_load(struct psp_context *psp)
  	if (!ret) {
  		psp->ras.ras_initialized = true;
  		psp->ras.session_id = cmd->resp.session_id;
+		DRM_INFO("RAS: Initialized (version: 0x%X)", psp-
 > ta_ras_ucode_version);
  	}
 
  	kfree(cmd);
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
@@ -832,6 +835,7 @@ static int psp_hdcp_load(struct psp_context *psp)
  	if (!ret) {
  		psp->hdcp_context.hdcp_initialized = true;
  		psp->hdcp_context.session_id = cmd->resp.session_id;
+		DRM_INFO("HDCP: Initialized (version: 0x%X)", psp-
 > ta_hdcp_ucode_version);
  	}
 
  	kfree(cmd);
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -0
@@ -977,6 +981,7 @@ static int psp_dtm_load(struct psp_context *psp)
  	if (!ret) {
  		psp->dtm_context.dtm_initialized = true;
  		psp->dtm_context.session_id = cmd->resp.session_id;
+		DRM_INFO("DTM: Initialized (version: 0x%X)", psp-
 > ta_dtm_ucode_version);
  	}
 

kfree(cmd);
--
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]

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