<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:11pt;color:#0078D7;margin:5pt;" 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);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><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> Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com><br>
<b>Sent:</b> Wednesday, March 17, 2021 12:21 PM<br>
<b>To:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Wentland, Harry <Harry.Wentland@amd.com><br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Lin, Wayne <Wayne.Lin@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/display: Add irq register entry for dmub</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">DCN2.1 and DCN3.0 are missing some macros that register irq entries<br>
which cause compilation errors. This commit introduces those macros and<br>
fix the compilation error.<br>
<br>
Cc: Wayne Lin <Wayne.Lin@amd.com><br>
Cc: Solomon Chiu <solomon.chiu@amd.com><br>
Fixes: 53e9c0f651421136 ("drm/amd/display: Support vertical interrupt 0 for all dcn ASIC")<br>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com><br>
---<br>
.../display/dc/irq/dcn21/irq_service_dcn21.c | 17 +++++++++++++++++<br>
.../display/dc/irq/dcn30/irq_service_dcn30.c | 18 ++++++++++++++++++<br>
2 files changed, 35 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c<br>
index 48a3c360174e..bc1249a9858c 100644<br>
--- a/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c<br>
+++ b/drivers/gpu/drm/amd/display/dc/irq/dcn21/irq_service_dcn21.c<br>
@@ -209,6 +209,23 @@ static const struct irq_source_info_funcs vline0_irq_info_funcs = {<br>
BASE(mm ## block ## id ## _ ## reg_name ## _BASE_IDX) + \<br>
mm ## block ## id ## _ ## reg_name<br>
<br>
+#define SRI_DMUB(reg_name)\<br>
+ BASE(mm ## reg_name ## _BASE_IDX) + \<br>
+ mm ## reg_name<br>
+<br>
+#define IRQ_REG_ENTRY_DMUB(reg1, mask1, reg2, mask2)\<br>
+ .enable_reg = SRI_DMUB(reg1),\<br>
+ .enable_mask = \<br>
+ reg1 ## __ ## mask1 ## _MASK,\<br>
+ .enable_value = {\<br>
+ reg1 ## __ ## mask1 ## _MASK,\<br>
+ ~reg1 ## __ ## mask1 ## _MASK \<br>
+ },\<br>
+ .ack_reg = SRI_DMUB(reg2),\<br>
+ .ack_mask = \<br>
+ reg2 ## __ ## mask2 ## _MASK,\<br>
+ .ack_value = \<br>
+ reg2 ## __ ## mask2 ## _MASK \<br>
<br>
#define IRQ_REG_ENTRY(block, reg_num, reg1, mask1, reg2, mask2)\<br>
.enable_reg = SRI(reg1, block, reg_num),\<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 68f8f554c925..5af52ad49d7c 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>
@@ -276,6 +276,24 @@ static const struct irq_source_info_funcs vline0_irq_info_funcs = {<br>
.funcs = &vblank_irq_info_funcs\<br>
}<br>
<br>
+#define SRI_DMUB(reg_name)\<br>
+ BASE(mm ## reg_name ## _BASE_IDX) + \<br>
+ mm ## reg_name<br>
+<br>
+#define IRQ_REG_ENTRY_DMUB(reg1, mask1, reg2, mask2)\<br>
+ .enable_reg = SRI_DMUB(reg1),\<br>
+ .enable_mask = \<br>
+ reg1 ## __ ## mask1 ## _MASK,\<br>
+ .enable_value = {\<br>
+ reg1 ## __ ## mask1 ## _MASK,\<br>
+ ~reg1 ## __ ## mask1 ## _MASK \<br>
+ },\<br>
+ .ack_reg = SRI_DMUB(reg2),\<br>
+ .ack_mask = \<br>
+ reg2 ## __ ## mask2 ## _MASK,\<br>
+ .ack_value = \<br>
+ reg2 ## __ ## mask2 ## _MASK \<br>
+<br>
#define dmub_trace_int_entry()\<br>
[DC_IRQ_SOURCE_DMCUB_OUTBOX0] = {\<br>
IRQ_REG_ENTRY_DMUB(DMCUB_INTERRUPT_ENABLE, DMCUB_OUTBOX0_READY_INT_EN,\<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>