n 06/25/2018 09:46 AM, James Zhu wrote: > > > On 2018-06-23 08:02 PM, Timothy Pearson wrote: >> amdgpu_fence_driver_start_ring() attempts to access >> UVD instance 2 during setup, while the existing UVD >> instance count only allows instances 0 and 1. >> >> Increase AMDGPU_MAX_UVD_INSTANCES by one to avoid the >> invalid array access. >> >> Caught by UBSAN. > Hi Timothy, > > From design of view, it is not right to just change > AMDGPU_MAX_UVD_INSTANCES to 3. > > Could you tell me some detail of UBSAN test and attach the dmesg also? Definitely, was looking for some feedback from anyone knowing more about the internals of the UVD system. What's happening is that "ring->me" in amdgpu_fence_driver_start_ring() (drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c:379) is set to a value of "2". The overall dmesg is otherwise uninteresting, but I can try to grab the UBSAN output if needed. -- Timothy Pearson Raptor Engineering +1 (415) 727-8645 (direct line) +1 (512) 690-0200 (switchboard) https://www.raptorengineering.com