<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:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
This patch is missing your signed-off-by.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Victor Zhao <Victor.Zhao@amd.com><br>
<b>Sent:</b> Thursday, October 13, 2022 4:27 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com>; Lazar, Lijo <Lijo.Lazar@amd.com>; Zhao, Victor <Victor.Zhao@amd.com><br>
<b>Subject:</b> [PATCH 1/3] Revert "drm/amdgpu: add debugfs amdgpu_reset_level"</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This reverts commit 3ae992d5e1194a16e3d977076eb5722fa6e410d8.<br>
<br>
This commit breaks the reset logic for aldebaran, revert it for now.<br>
Will move the mask inside the reset handler.<br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ----<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 --<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 8 --------<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 3 ---<br>
4 files changed, 17 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
index 3ce91f660c3f..0e6ddf05c23c 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
@@ -274,9 +274,6 @@ extern int amdgpu_vcnfw_log;<br>
#define AMDGPU_RESET_VCE (1 << 13)<br>
#define AMDGPU_RESET_VCE1 (1 << 14)<br>
<br>
-#define AMDGPU_RESET_LEVEL_SOFT_RECOVERY (1 << 0)<br>
-#define AMDGPU_RESET_LEVEL_MODE2 (1 << 1)<br>
-<br>
/* max cursor sizes (in pixels) */<br>
#define CIK_CURSOR_WIDTH 128<br>
#define CIK_CURSOR_HEIGHT 128<br>
@@ -1065,7 +1062,6 @@ struct amdgpu_device {<br>
<br>
struct work_struct reset_work;<br>
<br>
- uint32_t amdgpu_reset_level_mask;<br>
bool job_hang;<br>
};<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c<br>
index 6066aebf491c..de61a85c4b02 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c<br>
@@ -1954,8 +1954,6 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)<br>
return PTR_ERR(ent);<br>
}<br>
<br>
- debugfs_create_u32("amdgpu_reset_level", 0600, root, &adev->amdgpu_reset_level_mask);<br>
-<br>
/* Register debugfs entries for amdgpu_ttm */<br>
amdgpu_ttm_debugfs_init(adev);<br>
amdgpu_debugfs_pm_init(adev);<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c<br>
index 9da5ead50c90..831fb222139c 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c<br>
@@ -37,8 +37,6 @@ int amdgpu_reset_init(struct amdgpu_device *adev)<br>
{<br>
int ret = 0;<br>
<br>
- adev->amdgpu_reset_level_mask = 0x1;<br>
-<br>
switch (adev->ip_versions[MP1_HWIP][0]) {<br>
case IP_VERSION(13, 0, 2):<br>
ret = aldebaran_reset_init(adev);<br>
@@ -76,9 +74,6 @@ int amdgpu_reset_prepare_hwcontext(struct amdgpu_device *adev,<br>
{<br>
struct amdgpu_reset_handler *reset_handler = NULL;<br>
<br>
- if (!(adev->amdgpu_reset_level_mask & AMDGPU_RESET_LEVEL_MODE2))<br>
- return -ENOSYS;<br>
-<br>
if (test_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context->flags))<br>
return -ENOSYS;<br>
<br>
@@ -98,9 +93,6 @@ int amdgpu_reset_perform_reset(struct amdgpu_device *adev,<br>
int ret;<br>
struct amdgpu_reset_handler *reset_handler = NULL;<br>
<br>
- if (!(adev->amdgpu_reset_level_mask & AMDGPU_RESET_LEVEL_MODE2))<br>
- return -ENOSYS;<br>
-<br>
if (test_bit(AMDGPU_SKIP_MODE2_RESET, &reset_context->flags))<br>
return -ENOSYS;<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c<br>
index 3e316b013fd9..d3558c34d406 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c<br>
@@ -405,9 +405,6 @@ bool amdgpu_ring_soft_recovery(struct amdgpu_ring *ring, unsigned int vmid,<br>
{<br>
ktime_t deadline = ktime_add_us(ktime_get(), 10000);<br>
<br>
- if (!(ring->adev->amdgpu_reset_level_mask & AMDGPU_RESET_LEVEL_SOFT_RECOVERY))<br>
- return false;<br>
-<br>
if (amdgpu_sriov_vf(ring->adev) || !ring->funcs->soft_recovery || !fence)<br>
return false;<br>
<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>