Re: [PATCH 4/6] drm/amd/amdgpu: Pin bos from imported dma-bufs to GTT.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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.

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.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux