On 29/03/17 04:14 PM, Christian König wrote:
> Am 29.03.2017 um 02:27 schrieb [email protected]:
>> From: Christopher James Halse Rogers
>> <[email protected]>
>>
>> Attempting to migrate the bo will break the sharing of the buffer.
>>
>> Signed-off-by: Christopher James Halse Rogers
>> <[email protected]>
>> CC: [email protected]
> 
> 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

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to