Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] LLC configurating, mmap and bo cache management questions
@ 2023-12-05 14:19 Tvrtko Ursulin
  2023-12-06  8:26 ` Hellstrom, Thomas
  0 siblings, 1 reply; 13+ messages in thread
From: Tvrtko Ursulin @ 2023-12-05 14:19 UTC (permalink / raw)
  To: intel-xe; +Cc: Thomas Hellstrom, Matthew Auld, Carlos Santa, Rodrigo Vivi


Hi,

We are working on adding xe support to ChromeOS minigbm and have a 
couple questions.

If I follow things correctly with xe mmap caching mode is fixed to 
object caching modes set at bo create. For framebuffers it will be WC 
and for the rest userspace can choose WB or WC via 
drm_xe_gem_create->cpu_caching. (Unless discrete, when WB cannot be used 
at all.)

AFAICT minigbm basically cares about two transition points. Lets call 
them CPU access begin and end.

1)
When a bo is mmapped it wants to invalidate the cache, which looks to be 
about making sure all GPU writes have landed to the backing store. In 
the i915 world that translates to the set_domain ioctl.

What is the uapi for this with xe, or it is somehow guaranteed to not be 
needed?

2)
When a bo is unmapped, or CPU access finished, it wants to flush the CPU 
caches. That is /almost/ completely a CPU operation, where it just needs 
to either clflush or invalidate the WC buffer respectively, if not the 
fact that clflush can be skipped on platforms with LLC.

I did not see an equivalent of an I915_PARAM_HAS_LLC in xe? Did I miss 
it or what it is the plan for querying this detail?

Regards,

Tvrtko

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

end of thread, other threads:[~2023-12-14 12:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 14:19 [Intel-xe] LLC configurating, mmap and bo cache management questions Tvrtko Ursulin
2023-12-06  8:26 ` Hellstrom, Thomas
2023-12-06 10:58   ` Tvrtko Ursulin
2023-12-06 11:46     ` Hellstrom, Thomas
2023-12-07 11:11       ` Tvrtko Ursulin
2023-12-07 12:01         ` Thomas Hellström
2023-12-13 11:55           ` Tvrtko Ursulin
2023-12-13 17:27             ` Thomas Hellström
2023-12-13 17:50               ` Tvrtko Ursulin
2023-12-13 20:11                 ` Thomas Hellström
2023-12-14  8:10                   ` Tvrtko Ursulin
2023-12-14 10:52                     ` Thomas Hellström
2023-12-14 12:34                       ` Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox