<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: <font size="2"><span style="font-size:11pt">Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com></span></font><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Nicholas Kazlauskas <nicholas.kazlauskas@amd.com><br>
<b>Sent:</b> July 8, 2020 2:59 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/display: Use VUPDATE_NO_LOCK instead of VUPDATE for dcn30</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">[Why]<br>
Soft hangs occur when FreeSync is engaged since we utilize VUPDATE<br>
(which doesn't fire when holding the pipe lock) to send back vblank<br>
events when FreeSync is active.<br>
<br>
[How]<br>
The alternative (working) interrupt source for this mechanism is<br>
VUPDATE_NO_LOCK. We already use this all other DCN revisions so align<br>
dcn30 with those as well.<br>
<br>
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com><br>
---<br>
.../display/dc/irq/dcn30/irq_service_dcn30.c | 28 ++++++++++++-------<br>
1 file changed, 18 insertions(+), 10 deletions(-)<br>
<br>
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<br>
index dd4d7a1dc3b6..49689f71f4f1 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn30/irq_service_dcn30.c<br>
@@ -169,6 +169,11 @@ static const struct irq_source_info_funcs pflip_irq_info_funcs = {<br>
.ack = NULL<br>
};<br>
<br>
+static const struct irq_source_info_funcs vupdate_no_lock_irq_info_funcs = {<br>
+ .set = NULL,<br>
+ .ack = NULL<br>
+};<br>
+<br>
static const struct irq_source_info_funcs vblank_irq_info_funcs = {<br>
.set = NULL,<br>
.ack = NULL<br>
@@ -228,12 +233,15 @@ static const struct irq_source_info_funcs vblank_irq_info_funcs = {<br>
.funcs = &pflip_irq_info_funcs\<br>
}<br>
<br>
-#define vupdate_int_entry(reg_num)\<br>
+/* vupdate_no_lock_int_entry maps to DC_IRQ_SOURCE_VUPDATEx, to match semantic<br>
+ * of DCE's DC_IRQ_SOURCE_VUPDATEx.<br>
+ */<br>
+#define vupdate_no_lock_int_entry(reg_num)\<br>
[DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\<br>
IRQ_REG_ENTRY(OTG, reg_num,\<br>
- OTG_GLOBAL_SYNC_STATUS, VUPDATE_INT_EN,\<br>
- OTG_GLOBAL_SYNC_STATUS, VUPDATE_EVENT_CLEAR),\<br>
- .funcs = &vblank_irq_info_funcs\<br>
+ OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_INT_EN,\<br>
+ OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_EVENT_CLEAR),\<br>
+ .funcs = &vupdate_no_lock_irq_info_funcs\<br>
}<br>
<br>
#define vblank_int_entry(reg_num)\<br>
@@ -340,12 +348,12 @@ irq_source_info_dcn30[DAL_IRQ_SOURCES_NUMBER] = {<br>
dc_underflow_int_entry(6),<br>
[DC_IRQ_SOURCE_DMCU_SCP] = dummy_irq_entry(),<br>
[DC_IRQ_SOURCE_VBIOS_SW] = dummy_irq_entry(),<br>
- vupdate_int_entry(0),<br>
- vupdate_int_entry(1),<br>
- vupdate_int_entry(2),<br>
- vupdate_int_entry(3),<br>
- vupdate_int_entry(4),<br>
- vupdate_int_entry(5),<br>
+ vupdate_no_lock_int_entry(0),<br>
+ vupdate_no_lock_int_entry(1),<br>
+ vupdate_no_lock_int_entry(2),<br>
+ vupdate_no_lock_int_entry(3),<br>
+ vupdate_no_lock_int_entry(4),<br>
+ vupdate_no_lock_int_entry(5),<br>
vblank_int_entry(0),<br>
vblank_int_entry(1),<br>
vblank_int_entry(2),<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>