Am 29.03.2017 um 11:07 schrieb Michel Dänzer: > On 29/03/17 04:14 PM, Christian König wrote: >> Am 29.03.2017 um 02:27 schrieb raof at ubuntu.com: >>> From: Christopher James Halse Rogers >>> <christopher.halse.rogers at canonical.com> >>> >>> Attempting to migrate the bo will break the sharing of the buffer. >>> >>> Signed-off-by: Christopher James Halse Rogers >>> <christopher.halse.rogers at canonical.com> >>> CC: amd-gfx at lists.freedesktop.org >> NAK on this one and the radeon version. >> >> We can't migrate the buffers to VRAM, but we shouldn't pin it either >> cause that will lock down the GTT space used for it. > Ah, good point, didn't think of that. > > >> Instead you should modify amdgpu_bo_pin() and fail if anybody tries to >> migrate a BO which has prime_shared_count != 0 to VRAM (you migth need >> to add this for radeon). > This would also need to be checked in the AMDGPU_GEM_OP_SET_PLACEMENT > case of amdgpu_gem_op_ioctl, otherwise userspace can change > prefered_domains to AMDGPU_GEM_DOMAIN_VRAM, and using the BO for GPU > operations may move it to VRAM. Good point as well, that indeed also needs to be forbidden. > Or maybe there's a central place which can catch both of these cases > (and any others). At least of hand I can't think of any. But catching those two cases should be sufficient as far as I can see. Christian.