Re: [PATCH] drm/amd/display: Use VUPDATE_NO_LOCK instead of VUPDATE for dcn30

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - Internal Distribution Only]


Reviewed-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx>

From: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx>
Sent: July 8, 2020 2:59 PM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>
Cc: Kazlauskas, Nicholas <Nicholas.Kazlauskas@xxxxxxx>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@xxxxxxx>
Subject: [PATCH] drm/amd/display: Use VUPDATE_NO_LOCK instead of VUPDATE for dcn30
 
[Why]
Soft hangs occur when FreeSync is engaged since we utilize VUPDATE
(which doesn't fire when holding the pipe lock) to send back vblank
events when FreeSync is active.

[How]
The alternative (working) interrupt source for this mechanism is
VUPDATE_NO_LOCK. We already use this all other DCN revisions so align
dcn30 with those as well.

Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx>
---
 .../display/dc/irq/dcn30/irq_service_dcn30.c  | 28 ++++++++++++-------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c b/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c
index dd4d7a1dc3b6..49689f71f4f1 100644
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c
@@ -169,6 +169,11 @@ static const struct irq_source_info_funcs pflip_irq_info_funcs = {
         .ack = NULL
 };
 
+static const struct irq_source_info_funcs vupdate_no_lock_irq_info_funcs = {
+       .set = NULL,
+       .ack = NULL
+};
+
 static const struct irq_source_info_funcs vblank_irq_info_funcs = {
         .set = NULL,
         .ack = NULL
@@ -228,12 +233,15 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = {
                 .funcs = &pflip_irq_info_funcs\
         }
 
-#define vupdate_int_entry(reg_num)\
+/* vupdate_no_lock_int_entry maps to DC_IRQ_SOURCE_VUPDATEx, to match semantic
+ * of DCE's DC_IRQ_SOURCE_VUPDATEx.
+ */
+#define vupdate_no_lock_int_entry(reg_num)\
         [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\
                 IRQ_REG_ENTRY(OTG, reg_num,\
-                       OTG_GLOBAL_SYNC_STATUS, VUPDATE_INT_EN,\
-                       OTG_GLOBAL_SYNC_STATUS, VUPDATE_EVENT_CLEAR),\
-               .funcs = &vblank_irq_info_funcs\
+                       OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_INT_EN,\
+                       OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_EVENT_CLEAR),\
+               .funcs = &vupdate_no_lock_irq_info_funcs\
         }
 
 #define vblank_int_entry(reg_num)\
@@ -340,12 +348,12 @@ irq_source_info_dcn30[DAL_IRQ_SOURCES_NUMBER] = {
         dc_underflow_int_entry(6),
         [DC_IRQ_SOURCE_DMCU_SCP] = dummy_irq_entry(),
         [DC_IRQ_SOURCE_VBIOS_SW] = dummy_irq_entry(),
-       vupdate_int_entry(0),
-       vupdate_int_entry(1),
-       vupdate_int_entry(2),
-       vupdate_int_entry(3),
-       vupdate_int_entry(4),
-       vupdate_int_entry(5),
+       vupdate_no_lock_int_entry(0),
+       vupdate_no_lock_int_entry(1),
+       vupdate_no_lock_int_entry(2),
+       vupdate_no_lock_int_entry(3),
+       vupdate_no_lock_int_entry(4),
+       vupdate_no_lock_int_entry(5),
         vblank_int_entry(0),
         vblank_int_entry(1),
         vblank_int_entry(2),
--
2.25.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux