<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">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Odd. The structure should be 0 initialized. Does this patch help?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Alex<br>
</p>
</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> Timothy Pearson <tpearson@raptorengineering.com><br>
<b>Sent:</b> Monday, June 25, 2018 11:53:12 AM<br>
<b>To:</b> Zhu, James<br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org; Deucher, Alexander; Zhou, David(ChunMing); Koenig, Christian<br>
<b>Subject:</b> Re: [PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">n 06/25/2018 09:46 AM, James Zhu wrote:<br>
> <br>
> <br>
> On 2018-06-23 08:02 PM, Timothy Pearson wrote:<br>
>> amdgpu_fence_driver_start_ring() attempts to access<br>
>> UVD instance 2 during setup, while the existing UVD<br>
>> instance count only allows instances 0 and 1.<br>
>><br>
>> Increase AMDGPU_MAX_UVD_INSTANCES by one to avoid the<br>
>> invalid array access.<br>
>><br>
>> Caught by UBSAN.<br>
> Hi Timothy,<br>
> <br>
> From design of view, it is not right to just change<br>
> AMDGPU_MAX_UVD_INSTANCES to 3.<br>
> <br>
> Could you tell me some detail of UBSAN test and attach the dmesg also?<br>
<br>
Definitely, was looking for some feedback from anyone knowing more about<br>
the internals of the UVD system.<br>
<br>
What's happening is that "ring->me" in amdgpu_fence_driver_start_ring()<br>
(drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:379) is set to a value of<br>
"2". The overall dmesg is otherwise uninteresting, but I can try to<br>
grab the UBSAN output if needed.<br>
<br>
-- <br>
Timothy Pearson<br>
Raptor Engineering<br>
+1 (415) 727-8645 (direct line)<br>
+1 (512) 690-0200 (switchboard)<br>
<a href="https://www.raptorengineering.com">https://www.raptorengineering.com</a><br>
</div>
</span></font></div>
</body>
</html>