<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Christian, <br>
</p>
<p><br>
</p>
<p>I realized we are still missing this patch while reading dmesg of
<a href="https://gitlab.freedesktop.org/drm/amd/-/issues/1158">https://gitlab.freedesktop.org/drm/amd/-/issues/1158</a></p>
<p><br>
</p>
<p>Regards,</p>
<p>Nirmoy<br>
</p>
<div class="moz-cite-prefix">On 2/28/20 4:24 PM, Li, Dennis wrote:<br>
</div>
<blockquote type="cite" cite="mid:MN2PR12MB3167D3C9AB617B2B7DF3F016EDE80@MN2PR12MB3167.namprd12.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
p.msipheader87abd423, li.msipheader87abd423, div.msipheader87abd423
{mso-style-name:msipheader87abd423;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="msipheader87abd423" style="margin:0in;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#317100">[AMD
Public Use]</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Looks good to me<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Test-by: Dennis Li <<a href="mailto:dennis.li@amd.com" moz-do-not-send="true">dennis.li@amd.com</a>><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards<o:p></o:p></p>
<p class="MsoNormal">Dennis Li<o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> amd-gfx
<a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org"><amd-gfx-bounces@lists.freedesktop.org></a>
<b>On Behalf Of </b>Deucher, Alexander<br>
<b>Sent:</b> Thursday, February 27, 2020 11:18 PM<br>
<b>To:</b> Christian König
<a class="moz-txt-link-rfc2396E" href="mailto:ckoenig.leichtzumerken@gmail.com"><ckoenig.leichtzumerken@gmail.com></a>; Das, Nirmoy
<a class="moz-txt-link-rfc2396E" href="mailto:Nirmoy.Das@amd.com"><Nirmoy.Das@amd.com></a>; <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: stop disable the
scheduler during HW fini<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:15.0pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#317100">[AMD
Public Use]<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Looks good to me.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Reviewed-by: Alex
Deucher <<a href="mailto:alexander.deucher@amd.com" moz-do-not-send="true">alexander.deucher@amd.com</a>><o:p></o:p></span></p>
</div>
<div class="MsoNormal" style="text-align:center" align="center">
<hr width="98%" size="2" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Christian König <<a href="mailto:ckoenig.leichtzumerken@gmail.com" moz-do-not-send="true">ckoenig.leichtzumerken@gmail.com</a>><br>
<b>Sent:</b> Thursday, February 27, 2020 9:50 AM<br>
<b>To:</b> Das, Nirmoy <<a href="mailto:Nirmoy.Das@amd.com" moz-do-not-send="true">Nirmoy.Das@amd.com</a>>;
<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a>
<<a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a>>;
Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" moz-do-not-send="true">Alexander.Deucher@amd.com</a>><br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: stop disable the
scheduler during HW fini</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Alex any
comment on this?<br>
<br>
Am 25.02.20 um 14:16 schrieb Nirmoy:<br>
> Acked-by: Nirmoy Das <<a href="mailto:nirmoy.das@amd.com" moz-do-not-send="true">nirmoy.das@amd.com</a>><br>
><br>
> On 2/25/20 2:07 PM, Christian König wrote:<br>
>> When we stop the HW for example for GPU reset
we should not stop the<br>
>> front-end scheduler. Otherwise we run into
intermediate failures during<br>
>> command submission.<br>
>><br>
>> The scheduler should only be stopped in very
few cases:<br>
>> 1. We can't get the hardware working in ring or
IB test after a GPU <br>
>> reset.<br>
>> 2. The KIQ scheduler is not used in the
front-end and should be <br>
>> disabled during GPU reset.<br>
>> 3. In amdgpu_ring_fini() when the driver
unloads.<br>
>><br>
>> Signed-off-by: Christian König <<a href="mailto:christian.koenig@amd.com" moz-do-not-send="true">christian.koenig@amd.com</a>><br>
>> ---<br>
>> drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2
--<br>
>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 8
--------<br>
>> drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 5
-----<br>
>> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 25
+++++++++----------------<br>
>> drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7
-------<br>
>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 9
---------<br>
>> drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c | 3
---<br>
>> drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2
--<br>
>> drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2
--<br>
>> drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 4
----<br>
>> drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 3
---<br>
>> drivers/gpu/drm/amd/amdgpu/si_dma.c | 1 -<br>
>> drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3
---<br>
>> drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 3
---<br>
>> drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3
---<br>
>> drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 7
-------<br>
>> drivers/gpu/drm/amd/amdgpu/vce_v4_0.c | 4
----<br>
>> drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 3
---<br>
>> drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c | 9
---------<br>
>> drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 11
+----------<br>
>> 20 files changed, 10 insertions(+), 104
deletions(-)<br>
>><br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c<br>
>> index 4274ccf765de..cb3b3a0a1348 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c<br>
>> @@ -320,8 +320,6 @@ static void
cik_sdma_gfx_stop(struct <br>
>> amdgpu_device *adev)<br>
>> WREG32(mmSDMA0_GFX_RB_CNTL +
sdma_offsets[i], rb_cntl);<br>
>> WREG32(mmSDMA0_GFX_IB_CNTL +
sdma_offsets[i], 0);<br>
>> }<br>
>> - sdma0->sched.ready = false;<br>
>> - sdma1->sched.ready = false;<br>
>> }<br>
>> /**<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
>> index 7b6158320400..36ce67ce4800 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
>> @@ -2391,10 +2391,6 @@ static int
gfx_v10_0_cp_gfx_enable(struct <br>
>> amdgpu_device *adev, bool enable)<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
ME_HALT, enable ? 0 : 1);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
PFP_HALT, enable ? 0 : 1);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
CE_HALT, enable ? 0 : 1);<br>
>> - if (!enable) {<br>
>> - for (i = 0; i <
adev->gfx.num_gfx_rings; i++)<br>
>> -
adev->gfx.gfx_ring[i].sched.ready = false;<br>
>> - }<br>
>> WREG32_SOC15(GC, 0, mmCP_ME_CNTL, tmp);<br>
>> for (i = 0; i <
adev->usec_timeout; i++) {<br>
>> @@ -2869,16 +2865,12 @@ static int
gfx_v10_0_cp_gfx_resume(struct <br>
>> amdgpu_device *adev)<br>
>> static void
gfx_v10_0_cp_compute_enable(struct amdgpu_device <br>
>> *adev, bool enable)<br>
>> {<br>
>> - int i;<br>
>> -<br>
>> if (enable) {<br>
>> WREG32_SOC15(GC, 0, mmCP_MEC_CNTL,
0);<br>
>> } else {<br>
>> WREG32_SOC15(GC, 0, mmCP_MEC_CNTL,<br>
>>
(CP_MEC_CNTL__MEC_ME1_HALT_MASK |<br>
>>
CP_MEC_CNTL__MEC_ME2_HALT_MASK));<br>
>> - for (i = 0; i <
adev->gfx.num_compute_rings; i++)<br>
>> -
adev->gfx.compute_ring[i].sched.ready = false;<br>
>> adev->gfx.kiq.ring.sched.ready =
false;<br>
>> }<br>
>> udelay(50);<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c<br>
>> index 31f44d05e606..e462a099dbda 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c<br>
>> @@ -1950,7 +1950,6 @@ static int
gfx_v6_0_ring_test_ib(struct <br>
>> amdgpu_ring *ring, long timeout)<br>
>> static void gfx_v6_0_cp_gfx_enable(struct
amdgpu_device *adev, <br>
>> bool enable)<br>
>> {<br>
>> - int i;<br>
>> if (enable) {<br>
>> WREG32(mmCP_ME_CNTL, 0);<br>
>> } else {<br>
>> @@ -1958,10 +1957,6 @@ static void
gfx_v6_0_cp_gfx_enable(struct <br>
>> amdgpu_device *adev, bool enable)<br>
>>
CP_ME_CNTL__PFP_HALT_MASK |<br>
>>
CP_ME_CNTL__CE_HALT_MASK));<br>
>> WREG32(mmSCRATCH_UMSK, 0);<br>
>> - for (i = 0; i <
adev->gfx.num_gfx_rings; i++)<br>
>> -
adev->gfx.gfx_ring[i].sched.ready = false;<br>
>> - for (i = 0; i <
adev->gfx.num_compute_rings; i++)<br>
>> -
adev->gfx.compute_ring[i].sched.ready = false;<br>
>> }<br>
>> udelay(50);<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c<br>
>> index 8f20a5dd44fe..9bc8673c83ac 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c<br>
>> @@ -2431,15 +2431,12 @@ static int
gfx_v7_0_ring_test_ib(struct <br>
>> amdgpu_ring *ring, long timeout)<br>
>> */<br>
>> static void gfx_v7_0_cp_gfx_enable(struct
amdgpu_device *adev, bool <br>
>> enable)<br>
>> {<br>
>> - int i;<br>
>> -<br>
>> - if (enable) {<br>
>> + if (enable)<br>
>> WREG32(mmCP_ME_CNTL, 0);<br>
>> - } else {<br>
>> - WREG32(mmCP_ME_CNTL,
(CP_ME_CNTL__ME_HALT_MASK | <br>
>> CP_ME_CNTL__PFP_HALT_MASK |
CP_ME_CNTL__CE_HALT_MASK));<br>
>> - for (i = 0; i <
adev->gfx.num_gfx_rings; i++)<br>
>> -
adev->gfx.gfx_ring[i].sched.ready = false;<br>
>> - }<br>
>> + else<br>
>> + WREG32(mmCP_ME_CNTL,
(CP_ME_CNTL__ME_HALT_MASK |<br>
>> +
CP_ME_CNTL__PFP_HALT_MASK |<br>
>> +
CP_ME_CNTL__CE_HALT_MASK));<br>
>> udelay(50);<br>
>> }<br>
>> @@ -2700,15 +2697,11 @@ static void <br>
>> gfx_v7_0_ring_set_wptr_compute(struct
amdgpu_ring *ring)<br>
>> */<br>
>> static void gfx_v7_0_cp_compute_enable(struct
amdgpu_device *adev, <br>
>> bool enable)<br>
>> {<br>
>> - int i;<br>
>> -<br>
>> - if (enable) {<br>
>> + if (enable)<br>
>> WREG32(mmCP_MEC_CNTL, 0);<br>
>> - } else {<br>
>> - WREG32(mmCP_MEC_CNTL,
(CP_MEC_CNTL__MEC_ME1_HALT_MASK | <br>
>> CP_MEC_CNTL__MEC_ME2_HALT_MASK));<br>
>> - for (i = 0; i <
adev->gfx.num_compute_rings; i++)<br>
>> -
adev->gfx.compute_ring[i].sched.ready = false;<br>
>> - }<br>
>> + else<br>
>> + WREG32(mmCP_MEC_CNTL,
(CP_MEC_CNTL__MEC_ME1_HALT_MASK |<br>
>> +
CP_MEC_CNTL__MEC_ME2_HALT_MASK));<br>
>> udelay(50);<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c<br>
>> index fa245973de12..7b6b03c02754 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c<br>
>> @@ -4111,7 +4111,6 @@ static int
gfx_v8_0_rlc_resume(struct <br>
>> amdgpu_device *adev)<br>
>> static void gfx_v8_0_cp_gfx_enable(struct
amdgpu_device *adev, <br>
>> bool enable)<br>
>> {<br>
>> - int i;<br>
>> u32 tmp = RREG32(mmCP_ME_CNTL);<br>
>> if (enable) {<br>
>> @@ -4122,8 +4121,6 @@ static void
gfx_v8_0_cp_gfx_enable(struct <br>
>> amdgpu_device *adev, bool enable)<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
ME_HALT, 1);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
PFP_HALT, 1);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
CE_HALT, 1);<br>
>> - for (i = 0; i <
adev->gfx.num_gfx_rings; i++)<br>
>> -
adev->gfx.gfx_ring[i].sched.ready = false;<br>
>> }<br>
>> WREG32(mmCP_ME_CNTL, tmp);<br>
>> udelay(50);<br>
>> @@ -4311,14 +4308,10 @@ static int
gfx_v8_0_cp_gfx_resume(struct <br>
>> amdgpu_device *adev)<br>
>> static void
gfx_v8_0_cp_compute_enable(struct amdgpu_device <br>
>> *adev, bool enable)<br>
>> {<br>
>> - int i;<br>
>> -<br>
>> if (enable) {<br>
>> WREG32(mmCP_MEC_CNTL, 0);<br>
>> } else {<br>
>> WREG32(mmCP_MEC_CNTL,
(CP_MEC_CNTL__MEC_ME1_HALT_MASK | <br>
>> CP_MEC_CNTL__MEC_ME2_HALT_MASK));<br>
>> - for (i = 0; i <
adev->gfx.num_compute_rings; i++)<br>
>> -
adev->gfx.compute_ring[i].sched.ready = false;<br>
>> adev->gfx.kiq.ring.sched.ready =
false;<br>
>> }<br>
>> udelay(50);<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
>> index 1c7a16b91686..a2f9882bd9b4 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
>> @@ -3034,16 +3034,11 @@ static int
gfx_v9_0_rlc_resume(struct <br>
>> amdgpu_device *adev)<br>
>> static void gfx_v9_0_cp_gfx_enable(struct
amdgpu_device *adev, <br>
>> bool enable)<br>
>> {<br>
>> - int i;<br>
>> u32 tmp = RREG32_SOC15(GC, 0,
mmCP_ME_CNTL);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
ME_HALT, enable ? 0 : 1);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
PFP_HALT, enable ? 0 : 1);<br>
>> tmp = REG_SET_FIELD(tmp, CP_ME_CNTL,
CE_HALT, enable ? 0 : 1);<br>
>> - if (!enable) {<br>
>> - for (i = 0; i <
adev->gfx.num_gfx_rings; i++)<br>
>> -
adev->gfx.gfx_ring[i].sched.ready = false;<br>
>> - }<br>
>> WREG32_SOC15_RLC(GC, 0, mmCP_ME_CNTL,
tmp);<br>
>> udelay(50);<br>
>> }<br>
>> @@ -3239,15 +3234,11 @@ static int
gfx_v9_0_cp_gfx_resume(struct <br>
>> amdgpu_device *adev)<br>
>> static void
gfx_v9_0_cp_compute_enable(struct amdgpu_device <br>
>> *adev, bool enable)<br>
>> {<br>
>> - int i;<br>
>> -<br>
>> if (enable) {<br>
>> WREG32_SOC15_RLC(GC, 0,
mmCP_MEC_CNTL, 0);<br>
>> } else {<br>
>> WREG32_SOC15_RLC(GC, 0,
mmCP_MEC_CNTL,<br>
>> (CP_MEC_CNTL__MEC_ME1_HALT_MASK |
<br>
>> CP_MEC_CNTL__MEC_ME2_HALT_MASK));<br>
>> - for (i = 0; i <
adev->gfx.num_compute_rings; i++)<br>
>> -
adev->gfx.compute_ring[i].sched.ready = false;<br>
>> adev->gfx.kiq.ring.sched.ready =
false;<br>
>> }<br>
>> udelay(50);<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c<br>
>> index ff2e6e1ccde7..471710a42a0c 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_0.c<br>
>> @@ -169,14 +169,11 @@ static int
jpeg_v2_0_hw_init(void *handle)<br>
>> static int jpeg_v2_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring =
&adev->jpeg.inst->ring_dec;<br>
>> if (adev->jpeg.cur_state !=
AMD_PG_STATE_GATE &&<br>
>> RREG32_SOC15(JPEG, 0,
mmUVD_JRBC_STATUS))<br>
>> jpeg_v2_0_set_powergating_state(adev,
AMD_PG_STATE_GATE);<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c<br>
>> index fd7fa6082563..05b79aced6e8 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c<br>
>> @@ -355,8 +355,6 @@ static void
sdma_v2_4_gfx_stop(struct <br>
>> amdgpu_device *adev)<br>
>> ib_cntl = REG_SET_FIELD(ib_cntl,
SDMA0_GFX_IB_CNTL, <br>
>> IB_ENABLE, 0);<br>
>> WREG32(mmSDMA0_GFX_IB_CNTL +
sdma_offsets[i], ib_cntl);<br>
>> }<br>
>> - sdma0->sched.ready = false;<br>
>> - sdma1->sched.ready = false;<br>
>> }<br>
>> /**<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c<br>
>> index 4a8a7f0f3a9c..1448d9beb7a8 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c<br>
>> @@ -529,8 +529,6 @@ static void
sdma_v3_0_gfx_stop(struct <br>
>> amdgpu_device *adev)<br>
>> ib_cntl = REG_SET_FIELD(ib_cntl,
SDMA0_GFX_IB_CNTL, <br>
>> IB_ENABLE, 0);<br>
>> WREG32(mmSDMA0_GFX_IB_CNTL +
sdma_offsets[i], ib_cntl);<br>
>> }<br>
>> - sdma0->sched.ready = false;<br>
>> - sdma1->sched.ready = false;<br>
>> }<br>
>> /**<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c<br>
>> index 7cea4513c303..0c6eb65f96f3 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c<br>
>> @@ -923,8 +923,6 @@ static void
sdma_v4_0_gfx_stop(struct <br>
>> amdgpu_device *adev)<br>
>> ib_cntl = RREG32_SDMA(i,
mmSDMA0_GFX_IB_CNTL);<br>
>> ib_cntl = REG_SET_FIELD(ib_cntl,
SDMA0_GFX_IB_CNTL, <br>
>> IB_ENABLE, 0);<br>
>> WREG32_SDMA(i, mmSDMA0_GFX_IB_CNTL,
ib_cntl);<br>
>> -<br>
>> - sdma[i]->sched.ready = false;<br>
>> }<br>
>> }<br>
>> @@ -971,8 +969,6 @@ static void
sdma_v4_0_page_stop(struct <br>
>> amdgpu_device *adev)<br>
>> ib_cntl = REG_SET_FIELD(ib_cntl,
SDMA0_PAGE_IB_CNTL,<br>
>> IB_ENABLE, 0);<br>
>> WREG32_SDMA(i, mmSDMA0_PAGE_IB_CNTL,
ib_cntl);<br>
>> -<br>
>> - sdma[i]->sched.ready = false;<br>
>> }<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c<br>
>> index 7ee603db8c57..5af66a24b0a2 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c<br>
>> @@ -502,9 +502,6 @@ static void
sdma_v5_0_gfx_stop(struct <br>
>> amdgpu_device *adev)<br>
>> ib_cntl = REG_SET_FIELD(ib_cntl,
SDMA0_GFX_IB_CNTL, <br>
>> IB_ENABLE, 0);<br>
>> WREG32(sdma_v5_0_get_reg_offset(adev,
i, <br>
>> mmSDMA0_GFX_IB_CNTL), ib_cntl);<br>
>> }<br>
>> -<br>
>> - sdma0->sched.ready = false;<br>
>> - sdma1->sched.ready = false;<br>
>> }<br>
>> /**<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/si_dma.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/si_dma.c<br>
>> index 7f64d73043cf..a8548678c37d 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c<br>
>> @@ -124,7 +124,6 @@ static void
si_dma_stop(struct amdgpu_device *adev)<br>
>> if (adev->mman.buffer_funcs_ring
== ring)<br>
>>
amdgpu_ttm_set_buffer_funcs_status(adev, false);<br>
>> - ring->sched.ready = false;<br>
>> }<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c<br>
>> index 82abd8e728ab..957e14e2c155 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c<br>
>> @@ -210,13 +210,10 @@ static int
uvd_v4_2_hw_init(void *handle)<br>
>> static int uvd_v4_2_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring =
&adev->uvd.inst->ring;<br>
>> if (RREG32(mmUVD_STATUS) != 0)<br>
>> uvd_v4_2_stop(adev);<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c<br>
>> index 0fa8aae2d78e..2aad6689823b 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c<br>
>> @@ -208,13 +208,10 @@ static int
uvd_v5_0_hw_init(void *handle)<br>
>> static int uvd_v5_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring =
&adev->uvd.inst->ring;<br>
>> if (RREG32(mmUVD_STATUS) != 0)<br>
>> uvd_v5_0_stop(adev);<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c<br>
>> index e0aadcaf6c8b..a9d06ec5d09a 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c<br>
>> @@ -535,13 +535,10 @@ static int
uvd_v6_0_hw_init(void *handle)<br>
>> static int uvd_v6_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring =
&adev->uvd.inst->ring;<br>
>> if (RREG32(mmUVD_STATUS) != 0)<br>
>> uvd_v6_0_stop(adev);<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c<br>
>> index 0995378d8263..af3b1c9d3377 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c<br>
>> @@ -598,7 +598,6 @@ static int
uvd_v7_0_hw_init(void *handle)<br>
>> static int uvd_v7_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - int i;<br>
>> if (!amdgpu_sriov_vf(adev))<br>
>> uvd_v7_0_stop(adev);<br>
>> @@ -607,12 +606,6 @@ static int
uvd_v7_0_hw_fini(void *handle)<br>
>> DRM_DEBUG("For SRIOV client,
shouldn't do anything.\n");<br>
>> }<br>
>> - for (i = 0; i <
adev->uvd.num_uvd_inst; ++i) {<br>
>> - if (adev->uvd.harvest_config &
(1 << i))<br>
>> - continue;<br>
>> - adev->uvd.inst[i].ring.sched.ready
= false;<br>
>> - }<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c<br>
>> index 3fd102efb7af..5e986dea4645 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/vce_v4_0.c<br>
>> @@ -539,7 +539,6 @@ static int
vce_v4_0_hw_init(void *handle)<br>
>> static int vce_v4_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - int i;<br>
>> if (!amdgpu_sriov_vf(adev)) {<br>
>> /* vce_v4_0_wait_for_idle(handle); */<br>
>> @@ -549,9 +548,6 @@ static int
vce_v4_0_hw_fini(void *handle)<br>
>> DRM_DEBUG("For SRIOV client,
shouldn't do anything.\n");<br>
>> }<br>
>> - for (i = 0; i <
adev->vce.num_rings; i++)<br>
>> - adev->vce.ring[i].sched.ready =
false;<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
>> index 71f61afdc655..df92c4e1efaa 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
>> @@ -227,14 +227,11 @@ static int
vcn_v1_0_hw_init(void *handle)<br>
>> static int vcn_v1_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring =
&adev->vcn.inst->ring_dec;<br>
>> if ((adev->pg_flags &
AMD_PG_SUPPORT_VCN_DPG) ||<br>
>> RREG32_SOC15(VCN, 0, mmUVD_STATUS))<br>
>> vcn_v1_0_set_powergating_state(adev,
AMD_PG_STATE_GATE);<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c<br>
>> index c387c81f8695..37508277cbdf 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c<br>
>> @@ -232,21 +232,12 @@ static int
vcn_v2_0_hw_init(void *handle)<br>
>> static int vcn_v2_0_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring =
&adev->vcn.inst->ring_dec;<br>
>> - int i;<br>
>> if ((adev->pg_flags &
AMD_PG_SUPPORT_VCN_DPG) ||<br>
>> (adev->vcn.cur_state !=
AMD_PG_STATE_GATE &&<br>
>> RREG32_SOC15(VCN, 0,
mmUVD_STATUS)))<br>
>> vcn_v2_0_set_powergating_state(adev,
AMD_PG_STATE_GATE);<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> - for (i = 0; i <
adev->vcn.num_enc_rings; ++i) {<br>
>> - ring =
&adev->vcn.inst->ring_enc[i];<br>
>> - ring->sched.ready = false;<br>
>> - }<br>
>> -<br>
>> return 0;<br>
>> }<br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c <br>
>> b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c<br>
>> index 2d64ba1adf99..90a1994857db 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c<br>
>> @@ -307,25 +307,16 @@ static int
vcn_v2_5_hw_init(void *handle)<br>
>> static int vcn_v2_5_hw_fini(void *handle)<br>
>> {<br>
>> struct amdgpu_device *adev = (struct
amdgpu_device *)handle;<br>
>> - struct amdgpu_ring *ring;<br>
>> - int i, j;<br>
>> + int i;<br>
>> for (i = 0; i <
adev->vcn.num_vcn_inst; ++i) {<br>
>> if (adev->vcn.harvest_config &
(1 << i))<br>
>> continue;<br>
>> - ring =
&adev->vcn.inst[i].ring_dec;<br>
>> if ((adev->pg_flags &
AMD_PG_SUPPORT_VCN_DPG) ||<br>
>> (adev->vcn.cur_state !=
AMD_PG_STATE_GATE &&<br>
>> RREG32_SOC15(VCN, i,
mmUVD_STATUS)))<br>
>>
vcn_v2_5_set_powergating_state(adev, AMD_PG_STATE_GATE);<br>
>> -<br>
>> - ring->sched.ready = false;<br>
>> -<br>
>> - for (j = 0; j <
adev->vcn.num_enc_rings; ++j) {<br>
>> - ring =
&adev->vcn.inst[i].ring_enc[j];<br>
>> - ring->sched.ready = false;<br>
>> - }<br>
>> }<br>
>> return 0;<br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> <a href="mailto:amd-gfx@lists.freedesktop.org" moz-do-not-send="true">amd-gfx@lists.freedesktop.org</a><br>
> <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CDennis.Li%40amd.com%7C77c39c3849844479687908d7bb984adf%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637184135103921328&sdata=96plDq8wfssj%2Br4aKoTkDVXyTT7fGNjnr59FySOlH3k%3D&reserved=0" moz-do-not-send="true">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7Ca040605cb0574b3fc93608d7bb945b4c%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637184118188416898&sdata=hzQLxdX8COuG2nB0mn6YWO4%2Btd402tIfRiOTh%2BCK58M%3D&reserved=0</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>