Re: [PATCH v2 13/15] drm/ttm: Add BO and offset arguments for vm_access and vm_fault ttm handlers.

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

 




On 5/18/21 5:17 PM, Christian König wrote:


Am 18.05.21 um 17:11 schrieb Thomas Hellström:

On 5/18/21 5:07 PM, Christian König wrote:
Am 18.05.21 um 16:55 schrieb Thomas Hellström:
From: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>

This allows other drivers that may not setup the vma in the same way
to use the ttm bo helpers.

Uff can you please explain why exactly you need that?

Providing the BO is not much of a problem, but having the BO at different VMA offsets is really a no-go with TTM.

Christian.

The current i915 uapi is using different offsets for different caching :/. We're currently working around that by using ttm_bo_type_kernel (no TTM vma offset at all) and i915's offset.

Can you instead adjust the offset in the mmap callback like we do for dma-buf?
Will have to take a look.

That's really a no-go what you describe here because it will mess up reverse mapping lockup for buffer movement.

You mean the unmap_mapping_range() stuff? That's not a problem since it's a NOP for kernel ttm buffers, and the i915 move() / swap_notify() takes care of killing the ptes.

While we're in the process of killing that offset flexibility for discrete, we can't do so for older hardware unfortunately.

/Thomas



Christian.





/Thomas





[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