[PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3

Deucher, Alexander Alexander.Deucher at amd.com
Mon Jun 25 17:29:34 UTC 2018


Odd. The structure should be 0 initialized.  Does this patch help?


Alex

________________________________
From: Timothy Pearson <tpearson at raptorengineering.com>
Sent: Monday, June 25, 2018 11:53:12 AM
To: Zhu, James
Cc: amd-gfx at lists.freedesktop.org; Deucher, Alexander; Zhou, David(ChunMing); Koenig, Christian
Subject: Re: [PATCH] Increase AMDGPU_MAX_UVD_INSTANCES to 3

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180625/fce4d6ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-amdgpu-uvd-explicitly-set-ring-me-for-UVD-instan.patch
Type: text/x-patch
Size: 2111 bytes
Desc: 0001-drm-amdgpu-uvd-explicitly-set-ring-me-for-UVD-instan.patch
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180625/fce4d6ec/attachment.bin>


More information about the amd-gfx mailing list