<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:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">
case IP_VERSION(9, 4, 1):</span><br>
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">
case IP_VERSION(9, 4, 2):</span><br style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">
amdgpu_device_ip_block_add(adev, &gfx_v9_0_ip_block);</span><br style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">+
if (amdgpu_sriov_vf(adev) && adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2))</span><br style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">+
gfx_v9_0_set_rlc_funcs(adev);</span><br style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">
break;</span><br style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">
case IP_VERSION(10, 1, 10):</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">I
think for the above, it would be more clear just to separate them:</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">case
IP_VERSION(9, 4, 1):</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;">
amdgpu_device_ip_block_add(adev, &gfx_v9_0_ip_block);</span><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;">
break;</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;"><span style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;"><span style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;">case
IP_VERSION(9, 4, 2):</span><br>
<span style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;"> amdgpu_device_ip_block_add(adev, &gfx_v9_0_ip_block);</span><br style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;"> if (amdgpu_sriov_vf(adev))</span><br style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="margin: 0px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); display: inline !important;"> gfx_v9_0_set_rlc_funcs(adev);</span><br>
</span></span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
<span style="color: rgb(0, 0, 0); font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, "system-ui", Roboto, "Helvetica Neue", sans-serif; font-size: 14.6667px; background-color: rgb(255, 255, 255); display: inline !important;">
break;</span></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> Skvortsov, Victor <Victor.Skvortsov@amd.com><br>
<b>Sent:</b> Wednesday, December 15, 2021 10:55 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deng, Emily <Emily.Deng@amd.com>; Liu, Monk <Monk.Liu@amd.com>; Ming, Davis <Davis.Ming@amd.com>; Liu, Shaoyun <Shaoyun.Liu@amd.com>; Zhou, Peng Ju <PengJu.Zhou@amd.com>; Chen, JingWen
<JingWen.Chen2@amd.com>; Chen, Horace <Horace.Chen@amd.com>; Nieto, David M <David.Nieto@amd.com><br>
<b>Cc:</b> Skvortsov, Victor <Victor.Skvortsov@amd.com><br>
<b>Subject:</b> [PATCH 4/5] drm/amdgpu: Initialize Aldebaran RLC function pointers</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">In SRIOV, RLC function pointers must be initialized early as<br>
we rely on the RLCG interface for all GC register access.<br>
<br>
Signed-off-by: Victor Skvortsov <victor.skvortsov@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 ++<br>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 +--<br>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h | 2 ++<br>
3 files changed, 5 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
index 65e1f6cc59dd..1bc92a38d124 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
@@ -844,6 +844,8 @@ static int amdgpu_discovery_set_gc_ip_blocks(struct amdgpu_device *adev)<br>
case IP_VERSION(9, 4, 1):<br>
case IP_VERSION(9, 4, 2):<br>
amdgpu_device_ip_block_add(adev, &gfx_v9_0_ip_block);<br>
+ if (amdgpu_sriov_vf(adev) && adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 2))<br>
+ gfx_v9_0_set_rlc_funcs(adev);<br>
break;<br>
case IP_VERSION(10, 1, 10):<br>
case IP_VERSION(10, 1, 2):<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
index edb3e3b08eed..d252b06efa43 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
@@ -816,7 +816,6 @@ static void gfx_v9_0_sriov_wreg(struct amdgpu_device *adev, u32 offset,<br>
static void gfx_v9_0_set_ring_funcs(struct amdgpu_device *adev);<br>
static void gfx_v9_0_set_irq_funcs(struct amdgpu_device *adev);<br>
static void gfx_v9_0_set_gds_init(struct amdgpu_device *adev);<br>
-static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev);<br>
static int gfx_v9_0_get_cu_info(struct amdgpu_device *adev,<br>
struct amdgpu_cu_info *cu_info);<br>
static uint64_t gfx_v9_0_get_gpu_clock_counter(struct amdgpu_device *adev);<br>
@@ -7066,7 +7065,7 @@ static void gfx_v9_0_set_irq_funcs(struct amdgpu_device *adev)<br>
adev->gfx.cp_ecc_error_irq.funcs = &gfx_v9_0_cp_ecc_error_irq_funcs;<br>
}<br>
<br>
-static void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev)<br>
+void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev)<br>
{<br>
switch (adev->ip_versions[GC_HWIP][0]) {<br>
case IP_VERSION(9, 0, 1):<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h<br>
index dfe8d4841f58..1817e252354f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.h<br>
@@ -29,4 +29,6 @@ extern const struct amdgpu_ip_block_version gfx_v9_0_ip_block;<br>
void gfx_v9_0_select_se_sh(struct amdgpu_device *adev, u32 se_num, u32 sh_num,<br>
u32 instance);<br>
<br>
+void gfx_v9_0_set_rlc_funcs(struct amdgpu_device *adev);<br>
+<br>
#endif<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>