[PATCH 14/25] drm/amdkfd: Populate DRM render device minor

Christian König christian.koenig at amd.com
Tue Feb 13 18:15:36 UTC 2018


Am 13.02.2018 um 18:18 schrieb Felix Kuehling:
> On 2018-02-13 12:06 PM, Christian König wrote:
>> [SNIP]
>> Ah, yeah that is also a point I wanted to to talk about with you.
>>
>> The approach of using the same buffer object with multiple amdgpu
>> devices doesn't work in general.
>>
>> We need separate TTM object for each BO in each device or otherwise we
>> break A+A laptops.
> I think it broke for VRAM BOs because we enabled P2P on systems that
> didn't support it properly. But at least system memory BOs can be shared
> quite well between devices and we do it all the time.

Sharing VRAM BOs is one issue, but the problem goes deeper than just that.

Starting with Carizzo we can scanout from system memory to avoid the 
extra copy on A+A laptops. For this to work we need the BO mapped to 
GART (and I mean a real VMID0 mapping, not just in the GTT domain). And 
for this to work in turn we need a TTM object per device and not a 
global one.

> I don't see how you can have separate TTM objects referring to the same memory.

Well that is trivial, we do this all the time with prime and I+A laptops.

>> That is also the reason we had to disable this feature again in the
>> hybrid branches.
> What you disabled on hybrid branches was P2P, which only affects
> large-BAR systems. Sharing of system memory BOs between devices still
> works fine.

No, it doesn't. It completely breaks any scanout on Carizzo, Stoney and 
Raven. Additional to that we found that it breaks some aspects of the 
user space interface.

So end result is that we probably need to revert it and find a different 
solution. I'm already working on this for a couple of weeks now and 
should have something ready after I'm done with the PASID handling.

Regards,
Christian.


More information about the amd-gfx mailing list