drm/amd/display: Align dcn314_smu logging with other DCNs
Subsystems (3)
PATCH 1/1 drm/amd/display: Align dcn314_smu logging with other DCNs
From: Roman Li <[email protected]>
[Why]
Assert on non-OK response from SMU is unnecessary. It was replaced with respective log message on other asics in the past with commit:
"drm/amd/display: Removing assert statements for Linux"
[How]
Remove asert and add dbg logging as on other DCNs.
--- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +9 -2
@@ -123,9 +123,10 @@ static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr,uint32_t result; result =dcn314_smu_wait_for_response (clk_mgr,10 ,200000 ); -ASSERT (result == VBIOSSMC_Result_OK); -smu_print ("SMU response after wait: %d\n" , result); +if (result != VBIOSSMC_Result_OK) +smu_print ("SMU Response was not OK. SMU response after wait received is: %d\n" , + result);if (result == VBIOSSMC_Status_BUSY)return -1 ;
@@ -216,6 +217,12 @@ int dcn314_smu_set_hard_min_dcfclk(struct clk_mgr_internal *clk_mgr, int request VBIOSSMC_MSG_SetHardMinDcfclkByFreq, khz_to_mhz_ceil(requested_dcfclk_khz)); +#ifdef DBG +smu_print ("actual_dcfclk_set_mhz %d is set to : %d\n" , + actual_dcfclk_set_mhz, + actual_dcfclk_set_mhz *1000 ); +#endif +return actual_dcfclk_set_mhz *1000 ; }
Signature · 1 line
2.17.1
[Public]
Conceptually makes sense to me, but please see below comments:
Quoted 34 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, November 14, 2022 15:07
To: [email protected]; Deucher, Alexander <[email protected]>; Wentland, Harry <[email protected]>; Limonciello, Mario <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNsFrom: Roman Li <[email protected]>
[Why]
Assert on non-OK response from SMU is unnecessary. It was replaced with respective log message on other asics in the past with commit:
"drm/amd/display: Removing assert statements for Linux"[How]
Remove asert and add dbg logging as on other DCNs.CC Saaem Rizvi <[email protected]>Signed-off-by Roman Li <[email protected]>--- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c static int · line 127
Quoted 5 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-1@@ -123,9 +123,10 @@ static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, uint32_t result; result =dcn314_smu_wait_for_response (clk_mgr,10 ,200000 ); -ASSERT (result == VBIOSSMC_Result_OK);
Does this flow actually happen still? I thought the assertion should have gone away as a result of 83293f7f3d15fc56e86bd5067a2c88b6b233ac3a.
Maybe we want to also undo the REG_WRITE() call there if pulling this in.
Quoted 9 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +3
-1-smu_print ("SMU response after wait: %d\n" , result); +if (result != VBIOSSMC_Result_OK) + smu_print("SMU Response was not OK. SMU response after wait received is: %d\n", + result);if (result == VBIOSSMC_Status_BUSY)return -1;
I think what is missing to clean up recent asserts is actually a little bit further in the code than this. It should be part of the error flow introduced by 03ad3093c7c069d6ab4403730009ebafeea9ee37
Quoted 16 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -216,6 +217,12 @@ int dcn314_smu_set_hard_min_dcfclk(struct
clk_mgr_internal*clk_mgr, int requestdrivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +6
-1VBIOSSMC_MSG_SetHardMinDcfclkByFreq, khz_to_mhz_ceil(requested_dcfclk_khz)); +#ifdef DBG +smu_print ("actual_dcfclk_set_mhz %d is set to : %d\n" , + actual_dcfclk_set_mhz, + actual_dcfclk_set_mhz *1000 ); +#endif +return actual_dcfclk_set_mhz *1000 ; } --2.17.1
Hi Mario,
Thanks for your comments.
I replied inline.
Quoted 12 lines
-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Monday, November 14, 2022 4:16 PM
To: Li, Roman <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Wentland, Harry <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: RE: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNs[Public]
Quoted 24 lines
Conceptually makes sense to me, but please see below comments:
Quoted 5 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, November 14, 2022 15:07
To: [email protected]; Deucher, Alexander <[email protected]>; Wentland, HarryQuoted 16 lines
Limonciello, Mario <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNsFrom: Roman Li <[email protected]>
[Why]
Assert on non-OK response from SMU is unnecessary.
It was replaced with respective log message on other asics in the past with commit:
"drm/amd/display: Removing assert statements for Linux"[How]
Remove asert and add dbg logging as on other DCNs.
I will fix "assert" spelling before merging.
Quoted 18 lines
Quoted 5 lines
CC Saaem Rizvi <[email protected]>Signed-off-by Roman Li <[email protected]>--- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11 +++++++++--
Quoted 12 lines
1 file changed, 9 insertions(+), 2 deletions(-)diff --git
a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.cb/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.cindexef0795b14a1f..2db595672a46100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -123,9 +123,10 @@ static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, uint32_t result;
Quoted 6 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, · line 126
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-1result =dcn314_smu_wait_for_response (clk_mgr,10 ,200000 ); -ASSERT (result == VBIOSSMC_Result_OK);Does this flow actually happen still? I thought the assertion should have gone away as a result of
83293f7f3d15fc56e86bd5067a2c88b6b233ac3a.
Happens or not, we don't assert here on other asics.
I don't try to fix any bugs with this patch, just align the dcn314 logging/bug reporting with other asics.
Quoted 9 lines
Maybe we want to also undo the
REG_WRITE()call there if pulling this in.Quoted 7 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +3
-1-smu_print ("SMU response after wait: %d\n" , result); +if (result != VBIOSSMC_Result_OK) + smu_print("SMU Response was not OK. SMU response after wait received is: %d\n", + result);
Quoted 6 lines
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0if (result == VBIOSSMC_Status_BUSY)return -1;
I think what is missing to clean up recent asserts is actually a little bit further in the code than this. It should be part of the error flow introduced by
03ad3093c7c069d6ab4403730009ebafeea9ee37
03ad3093c7c069d6a is for dcn3.1 initially.
If there's an issue with it (which I didn't experience) it should be addressed on all dcn3x, that reuse it, in a separate patch.
Quoted 14 lines
Quoted 14 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -216,6 +217,12 @@ int dcn314_smu_set_hard_min_dcfclk(struct
clk_mgr_internal*clk_mgr, int requestdrivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +6
-0VBIOSSMC_MSG_SetHardMinDcfclkByFreq, khz_to_mhz_ceil(requested_dcfclk_khz)); +#ifdef DBG +smu_print ("actual_dcfclk_set_mhz %d is set to : %d\n" , + actual_dcfclk_set_mhz, + actual_dcfclk_set_mhz *1000 ); +#endif +return actual_dcfclk_set_mhz *1000 ; }
Quoted 2 lines
Quoted 2 lines
--
2.17.1
Thanks,
Roman
[Public]
Quoted 80 lines
-----Original Message-----
From: Li, Roman <[email protected]>
Sent: Tuesday, November 15, 2022 11:52
To: Limonciello, Mario <[email protected]>; amd- [email protected]; Deucher, Alexander <[email protected]>; Wentland, Harry <[email protected]>; Rizvi, Saaem <[email protected]>
Subject: RE: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNsHi Mario,
Thanks for your comments.
I replied inline.Quoted 8 lines
-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Monday, November 14, 2022 4:16 PM
To: Li, Roman <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Wentland, Harry <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: RE: [PATCH] drm/amd/display: Aligndcn314_smulogging withother
Quoted 4 lines
DCNs
[Public]
Quoted 24 lines
Conceptually makes sense to me, but please see below comments:
Quoted 5 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, November 14, 2022 15:07
To: [email protected]; Deucher, Alexander <[email protected]>; Wentland, HarryQuoted 16 lines
Limonciello, Mario <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNsFrom: Roman Li <[email protected]>
[Why]
Assert on non-OK response from SMU is unnecessary.
It was replaced with respective log message on other asics in the past with commit:
"drm/amd/display: Removing assert statements for Linux"[How]
Remove asert and add dbg logging as on other DCNs.I will fix "assert" spelling before merging.
Quoted 5 lines
Quoted 5 lines
CC Saaem Rizvi <[email protected]>Signed-off-by Roman Li <[email protected]>--- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11+++++++++-
Quoted 13 lines
-
Quoted 12 lines
1 file changed, 9 insertions(+), 2 deletions(-)diff --git
a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.cb/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.cindexef0795b14a1f..2db595672a46100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -123,9 +123,10 @@ static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, uint32_t result;Quoted 6 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, · line 126
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-1result =dcn314_smu_wait_for_response (clk_mgr,10 ,200000 ); -ASSERT (result == VBIOSSMC_Result_OK);Does this flow actually happen still? I thought the assertion should have gone away as a result of
83293f7f3d15fc56e86bd5067a2c88b6b233ac3a.
Quoted 3 lines
Happens or not, we don't assert here on other asics.
I don't try to fix any bugs with this patch, just align the dcn314 logging/bug reporting with other asics.
Got it thanks.
Quoted 17 lines
Quoted 10 lines
Maybe we want to also undo the
REG_WRITE()call there if pulling this in.Quoted 7 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +3
-1-smu_print ("SMU response after wait: %d\n" , result); +if (result != VBIOSSMC_Result_OK) + smu_print("SMU Response was not OK. SMU response after wait received is: %d\n", + result);Quoted 6 lines
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0if (result == VBIOSSMC_Status_BUSY)return -1;
I think what is missing to clean up recent asserts is actually a little bit further in the code than this. It should be part of the error flow introduced by
03ad3093c7c069d6ab4403730009ebafeea9ee37
Quoted 3 lines
03ad3093c7c069d6ais for dcn3.1 initially.
If there's an issue with it (which I didn't experience) it should be addressed on all dcn3x, that reuse it, in a separate patch.
OK.
Quoted 21 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -216,6 +217,12 @@ int dcn314_smu_set_hard_min_dcfclk(struct
clk_mgr_internal*clk_mgr, int requestdrivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +6
-0VBIOSSMC_MSG_SetHardMinDcfclkByFreq, khz_to_mhz_ceil(requested_dcfclk_khz)); +#ifdef DBG +smu_print ("actual_dcfclk_set_mhz %d is set to : %d\n" , + actual_dcfclk_set_mhz, + actual_dcfclk_set_mhz *1000 ); +#endif +return actual_dcfclk_set_mhz *1000 ; }Quoted 2 lines
Quoted 2 lines
--
2.17.1Thanks,
Roman
Rizvi, Saaem
Reviewed-by[Public]
From: Limonciello, Mario<mailto:[email protected]>
Sent: Tuesday, November 15, 2022 1:02 PM
To: Li, Roman<mailto:[email protected]>; [email protected]<mailto:[email protected]>; Deucher, Alexander<mailto:[email protected]>; Wentland, Harry<mailto:[email protected]>; Rizvi, Saaem<mailto:[email protected]>
Subject: RE: [PATCH] drm/amd/display: Align dcn314_smu logging with other DCNs
[Public]
Quoted 80 lines
-----Original Message-----
From: Li, Roman <[email protected]>
Sent: Tuesday, November 15, 2022 11:52
To: Limonciello, Mario <[email protected]>; amd- [email protected]; Deucher, Alexander <[email protected]>; Wentland, Harry <[email protected]>; Rizvi, Saaem <[email protected]>
Subject: RE: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNsHi Mario,
Thanks for your comments.
I replied inline.Quoted 8 lines
-----Original Message-----
From: Limonciello, Mario <[email protected]>
Sent: Monday, November 14, 2022 4:16 PM
To: Li, Roman <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Wentland, Harry <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: RE: [PATCH] drm/amd/display: Aligndcn314_smulogging withother
Quoted 4 lines
DCNs
[Public]
Quoted 24 lines
Conceptually makes sense to me, but please see below comments:
Quoted 5 lines
-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, November 14, 2022 15:07
To: [email protected]; Deucher, Alexander <[email protected]>; Wentland, HarryQuoted 16 lines
Limonciello, Mario <[email protected]>; Rizvi, Saaem <[email protected]>
Cc: Li, Roman <[email protected]>
Subject: [PATCH] drm/amd/display: Aligndcn314_smulogging with other DCNsFrom: Roman Li <[email protected]>
[Why]
Assert on non-OK response from SMU is unnecessary.
It was replaced with respective log message on other asics in the past with commit:
"drm/amd/display: Removing assert statements for Linux"[How]
Remove asert and add dbg logging as on other DCNs.I will fix "assert" spelling before merging.
Quoted 5 lines
Quoted 5 lines
CC Saaem Rizvi <[email protected]>Signed-off-by Roman Li <[email protected]>--- .../drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c | 11+++++++++-
Quoted 13 lines
-
Quoted 12 lines
1 file changed, 9 insertions(+), 2 deletions(-)diff --git
a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.cb/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.cindexef0795b14a1f..2db595672a46100644drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -123,9 +123,10 @@ static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, uint32_t result;Quoted 6 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c static int dcn314_smu_send_msg_with_param(struct clk_mgr_internal *clk_mgr, · line 126
Quoted 2 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-1result =dcn314_smu_wait_for_response (clk_mgr,10 ,200000 ); -ASSERT (result == VBIOSSMC_Result_OK);Does this flow actually happen still? I thought the assertion should have gone away as a result of
83293f7f3d15fc56e86bd5067a2c88b6b233ac3a.
Quoted 3 lines
Happens or not, we don't assert here on other asics.
I don't try to fix any bugs with this patch, just align the dcn314 logging/bug reporting with other asics.
Got it thanks.
Quoted 13 lines
Quoted 13 lines
Maybe we want to also undo the
REG_WRITE()call there if pulling this in.Quoted 9 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +3
-1-smu_print ("SMU response after wait: %d\n" , result); +if (result != VBIOSSMC_Result_OK) + smu_print("SMU Response was not OK. SMU response after wait received is: %d\n", + result);if (result == VBIOSSMC_Status_BUSY)return -1;
Quoted 7 lines
Quoted 3 lines
I think what is missing to clean up recent asserts is actually a little bit further in the code than this. It should be part of the error flow introduced by
03ad3093c7c069d6ab4403730009ebafeea9ee37
03ad3093c7c069d6ais for dcn3.1 initially.
If there's an issue with it (which I didn't experience) it should be addressed on all dcn3x, that reuse it, in a separate patch.
OK.
Quoted 21 lines
Quoted 16 lines
Quoted 16 lines
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +0
-0@@ -216,6 +217,12 @@ int dcn314_smu_set_hard_min_dcfclk(struct
clk_mgr_internal*clk_mgr, int requestVBIOSSMC_MSG_SetHardMinDcfclkByFreq, khz_to_mhz_ceil(requested_dcfclk_khz));drivers/gpu/drm/amd/display/dc/clk_mgr/dcn314/dcn314_smu.c +6
-0+#ifdef DBG +smu_print ("actual_dcfclk_set_mhz %d is set to : %d\n" , + actual_dcfclk_set_mhz, + actual_dcfclk_set_mhz *1000 ); +#endif +return actual_dcfclk_set_mhz *1000 ; }Quoted 2 lines
Quoted 2 lines
--
2.17.1Thanks,
Roman