On 29/03/17 04:14 PM, Christian König wrote: > Am 29.03.2017 um 02:27 schrieb raof@xxxxxxxxxx: >> From: Christopher James Halse Rogers >> <christopher.halse.rogers@xxxxxxxxxxxxx> >> >> Attempting to migrate the bo will break the sharing of the buffer. >> >> Signed-off-by: Christopher James Halse Rogers >> <christopher.halse.rogers@xxxxxxxxxxxxx> >> CC: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > > 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. Or maybe there's a central place which can catch both of these cases (and any others). -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel