[PATCH] drm/amdgpu: refuse to reserve io mem for split VRAM buffers
nhaehnle at gmail.com
Fri Feb 17 10:42:06 UTC 2017
On 17.02.2017 11:08, Christian König wrote:
> Am 17.02.2017 um 00:21 schrieb Nicolai Hähnle:
>> On 17.02.2017 00:02, Alex Deucher wrote:
>>> On Thu, Feb 16, 2017 at 5:55 PM, Nicolai Hähnle <nhaehnle at gmail.com>
>>>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>>> When the fast blit path fails while attempting to move a buffer from
>>>> to VRAM, we fall back to a CPU-based memcpy that cannot handle split
>>>> buffers. Instead of crashing, simply fail the buffer move.
>>>> Ideally, we would teach TTM about split buffers so that the fallback
>>>> works in this case, but that is quite involved. So for now, apply the
>>>> simplest possible fix.
>>>> Fixes: 40361bb1704b ("drm/amdgpu: add VRAM manager v2")
>>>> Signed-off-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>> Possibly fixes this bug report?
>> It's related, but I think that report is a false positive. It does
>> point at code that is not too pretty, though. I've commented on that
>> bug report as well.
>> In any case, that overflow should indeed happen whenever the bug
>> addressed by this patch happens, but (a) this patch doesn't change
>> that, and (b) I'm pretty sure that the overflow reported by PaX is
> Yes, agree. The bug report is indeed a false positive.
> Nicolai what do you think about removing the offset from the BO
> structure and only calculate it on demand?
I think it's a good idea. There are lots of uses in other drivers,
though, so a first step would be adding a helper analogous to
amdgpu_bo_gpu_offset in ttm_bo_api.h.
>> We may still have other bugs with split BOs, though.
> Yeah, agree as well. I was also considering disabling that feature by
> default for the moment if it helps with your corruption bug.
Good point, I'll give that a try as well.
More information about the amd-gfx