<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Christian:</p>
<p><br>
</p>
<p>Yes, my patch is for this issue in the vce fence interrupt. and I am also working on an S3 issue on Polaris10. I found that system may be blocked after ring ib test for the VCE ring.
<br>
</p>
<p><br>
</p>
<p>Could you share any points about the S3 issue?</p>
<p><br>
</p>
<p>Thanks</p>
<p>JimQu<br>
</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>发件人:</b> Christian König <deathsimple@vodafone.de><br>
<b>发送时间:</b> 2016年7月12日 17:15:56<br>
<b>收件人:</b> Dave Airlie; Qu, Jim<br>
<b>抄送:</b> amd-gfx mailing list<br>
<b>主题:</b> Re: [PATCH] drm/amdgpu: replace BUG_ON() and BUG()</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Am 12.07.2016 um 05:35 schrieb Dave Airlie:<br>
> On 12 July 2016 at 10:16, jimqu <Jim.Qu@amd.com> wrote:<br>
>> Sometimes, it maybe a ring test failure during S3 resume. When that<br>
>> happens, it will be kernel panic in the fence interrupt and will<br>
>> hangs up system. it is difficult to get any information from kernel<br>
>> for debug.<br>
> Please just use WARN or WARN_ON.<br>
<br>
And I already completely changed the code to neither BUG() nor WARN() <br>
because of this.<br>
<br>
VCE just sends spurious fence values during resume and I'm still working <br>
on a way to fully sort them out.<br>
<br>
Christian.<br>
<br>
><br>
> Dave.<br>
><br>
>> Change-Id: Iafa6c3793be151b8b85cf4299b929ba333b6174e<br>
>> Signed-off-by: JimQu <Jim.Qu@amd.com><br>
>> ---<br>
>> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 15 +++++++++++++++<br>
>> drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 ++--<br>
>> 2 files changed, 17 insertions(+), 2 deletions(-)<br>
>><br>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
>> index c3bf33f..15b6c5d 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h<br>
>> @@ -2242,6 +2242,21 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)<br>
>> }<br>
>><br>
>> /*<br>
>> + * Debug helpers<br>
>> + */<br>
>> +#define AMDGPU_BUG() do { \<br>
>> + printk(KERN_ERR "BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \<br>
>> + dump_stack(); \<br>
>> + for (;;); \<br>
>> + } while (0)<br>
>> +<br>
>> +#define AMDGPU_BUG_ON(condition) do { \<br>
>> + if (unlikely((condition)!= 0)) { \<br>
>> + AMDGPU_BUG(); \<br>
>> + } \<br>
>> + } while (0)<br>
>> +<br>
>> +/*<br>
>> * ASICs macro.<br>
>> */<br>
>> #define amdgpu_asic_set_vga_state(adev, state) (adev)->asic_funcs->set_vga_state((adev), (state))<br>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c<br>
>> index d155876..b8e5fa7 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c<br>
>> @@ -213,13 +213,13 @@ void amdgpu_fence_process(struct amdgpu_ring *ring)<br>
>> fence = rcu_dereference_protected(*ptr, 1);<br>
>> RCU_INIT_POINTER(*ptr, NULL);<br>
>><br>
>> - BUG_ON(!fence);<br>
>> + AMDGPU_BUG_ON(!fence);<br>
>><br>
>> r = fence_signal(fence);<br>
>> if (!r)<br>
>> FENCE_TRACE(fence, "signaled from irq context\n");<br>
>> else<br>
>> - BUG();<br>
>> + AMDGPU_BUG();<br>
>><br>
>> fence_put(fence);<br>
>> }<br>
>> --<br>
>> 1.9.1<br>
>><br>
>> _______________________________________________<br>
>> amd-gfx mailing list<br>
>> amd-gfx@lists.freedesktop.org<br>
>> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> amd-gfx@lists.freedesktop.org<br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
<br>
</div>
</span></font>
</body>
</html>