dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* TTM tt size larger than buffer object?
@ 2021-08-27 13:55 Thomas Hellström
  2021-08-27 14:24 ` Christian König
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Hellström @ 2021-08-27 13:55 UTC (permalink / raw)
  To: Christian König
  Cc: DRI Development, Intel Graphics Development, Daniel Vetter,
	Ayaz A Siddiqui

Hi, Christian.

We have a use-case with i915 where the data representation of a buffer 
object is larger in system memory than in LMEM/VRAM. Hence we'd like to 
create a ttm_tt that is larger than the buffer object itself. Quickly 
auditing the TTM code it looks like that should be pretty safe, as 
ttm->num_pages is not really much accessed outside the tt code and the 
pool code where we're doing the right thing.

The additional data will really only be accessed by the blitter so when 
cpu-mapping, mapping just the original buffer object size is correct. 
However with swapping the additional data needs to be swapped out and 
the code is doing that correctly as well.

Do you think this is an acceptable solution?

/Thomas



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: TTM tt size larger than buffer object?
  2021-08-27 13:55 TTM tt size larger than buffer object? Thomas Hellström
@ 2021-08-27 14:24 ` Christian König
  0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2021-08-27 14:24 UTC (permalink / raw)
  To: Thomas Hellström
  Cc: DRI Development, Intel Graphics Development, Daniel Vetter,
	Ayaz A Siddiqui

Am 27.08.21 um 15:55 schrieb Thomas Hellström:
> Hi, Christian.
>
> We have a use-case with i915 where the data representation of a buffer 
> object is larger in system memory than in LMEM/VRAM. Hence we'd like 
> to create a ttm_tt that is larger than the buffer object itself. 
> Quickly auditing the TTM code it looks like that should be pretty 
> safe, as ttm->num_pages is not really much accessed outside the tt 
> code and the pool code where we're doing the right thing.
>
> The additional data will really only be accessed by the blitter so 
> when cpu-mapping, mapping just the original buffer object size is 
> correct. However with swapping the additional data needs to be swapped 
> out and the code is doing that correctly as well.
>
> Do you think this is an acceptable solution?

Yes, I think that should work. Just haven't tested it yet.

I've been working on getting the core TTM code to use byte or rather an 
arbitrary size while the tt code should use the num_pages from it's own 
object.

The background is that we have a very similar use case on amdgpu which 
we might need to support.

Christian.

>
> /Thomas
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-27 14:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 13:55 TTM tt size larger than buffer object? Thomas Hellström
2021-08-27 14:24 ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).