05:49DemiMarie: Do graphics APIs expose CPU pointers to not-fully-cacheable memory?
05:49DemiMarie: I don’t care about KMS or dumb buffers here.
05:49DemiMarie: Just OpenGL and Vulkan.
05:52airlied: not-full-cacheable isn't really a defined memory type
05:52airlied: but yes you can map vram into cpu address space with vulkan
05:59DemiMarie: So hypervisors normally force all guest memory to write back.
05:59DemiMarie: The settings set by the guest are ignored.
06:00DemiMarie: Will that break things?
06:00DemiMarie: If so, there is a problem.
06:00DemiMarie: The secure way to do this is to trap and emulate every single access, which would be hilariously slow.
06:07airlied: making pci bars write back will probably not end well
06:07DemiMarie: Why does userspace need access to those?
06:10DemiMarie: airlied: Are those BARs VRAM only, or do they also include MMIO?
06:11airlied: userspace accesses VRAM because it wants to write stuff into VRAM
06:11airlied: I think we also expose WC mappings of RAM regions
06:12airlied: not sure what you mean by MMIO there, you mean device registers or something?
06:12airlied: those normally aren't exposed to userspace, but they are just another PCI BAR, and they generally are uncached
06:18DemiMarie: MMIO = anything that doesn’t act like RAM, like device registers.
06:23airlied: yeah we don't tend to map MMIO into guests
06:24DemiMarie: Because it causes problems?
06:25airlied: just don't need to usually
06:25airlied: unless you are doing full device passthrough
06:25airlied: actually maybe SRIOV does some of that
06:25DemiMarie: I see
06:26DemiMarie: Anyway, good night!
06:48zzoon[m]: airlied: just out of curiosity, th av1 branch for anv works with p frames on DG2?
06:48zzoon[m]: I mean it passes only i frame cts test. want to be sure if there's something wrong on my side.
06:49zzoon[m]: Mine is alderlake.
06:51airlied: zzoon[m]: nope, it only decodes one I frame
06:52airlied: couldn't get P frames properly, I suspected something cdf related
06:52zzoon[m]: yup. that's what im working on. thanks.
08:23MrCooper: airlied DemiMarie: indeed, GPU drivers also use write-combined mappings of system RAM for performance; if the hypervisor forces those to be cacheable, but the GPU doesn't snoop the CPU cache, that probably won't end well either
08:54pq: grillo_0, jfalempe, tzimmermann, I wonder if it would be possible to combine VKMS and DRM core pixel conversion machinery into a single thing? Core does conversions, VKMS does conversions and blending. Does core need direct format-to-format functions, or could it use format-to-common + common-to-format pair acting line by line?
08:55tzimmermann: pq, maybe
08:56tzimmermann: but the panic-handler discussion shows that it's not so easy.
08:56tzimmermann: we're basically discussing a full drawing API
08:56tzimmermann: there's also older code in fbdev, which does similar tasks
08:57pq: I'd think a drawing API would be built on top.
08:57emersion: core needs format conversion for XRGB8888 → format supported by hw, in some cases
08:58pq: essentially, pixman architecture, but without the hand-written arch/extension specific asm.
08:58tzimmermann: what else would be there? with the conversion and blending in place, the rest of the drawing api feels like bells-and-whistles to me
08:59pq: I don't know if a drawing API is needed, I just assumed it was.
09:00tzimmermann: maybe not a full one, but the basics
09:00tzimmermann: the panic handler draws fonts (via blit code) and has a fill operation for rectangles
09:00pq: ok
09:01tzimmermann: the fbdv code also has a copy operation
09:01tzimmermann: i guess those are the necessary primitives
09:01pq: that doesn't sound bad, what else was suggested?
09:01tzimmermann: we don't have blending so far
09:02pq: VKMS needs blending
09:02tzimmermann: i guess that complicates matters
09:02pq: well, it already has it
09:03pq: VKMS also has format-to/from-common pixel conversion routines, that make feel they should be used elsewhere too.
09:03tzimmermann: for some time, i've wondered if we should attempt to build something subsystem neutral. so that we don't reinvent the wheel each time (as we do now)
09:03pq: but, because VKMS needs to do blending, the pixel format conversion routines need to convert to/from a high depth common format
09:04tzimmermann: pq, can it handle pixels with less than 8 bits?
09:04pq: yes, people are writing that right now
09:04tzimmermann: i see
09:05tzimmermann: in the format helpers, we use per-line conversion routines. so it doesn't read the same bytes multiple times
09:06pq: VKMS is going back to line-by-line to gain the performance it had a year ago with line-by-line
09:06pq: it was "simplified" to work pixel-by-pixel in the mean time
09:07pq: the work is being done by Louis Chauvet and Arthur Grillo, along with IGT performance benchmarks
09:08tzimmermann: ok, sounds interesting
09:08pq: patches are on dri-devel and igt lists
09:08jfalempe: yes, I've seen the YUV support, which I might be interested in for drm_panic.
09:10jfalempe: But it's hard to find a good compromise between performance, complexity and sharing the code between different usage.
09:10tzimmermann: in the format helpers, it's line-by-line. the overall clip-and-copy loop is format agnostic. in some cases, the per-line helpers could be created via from_foramt() and to_format() helpers. but there's little benefit to do so ATM
09:11pq: using the VKMS pixel coversion architecture does not exclude the possibility of having direct format-to-format functions either, if performance demands, maybe per-pixel inlined helper functions could still be shared
09:12pq: all I can say is, please have a look, maybe there could be something to share
09:13tzimmermann: sure. as i said, i think we should eventually try to build something subsystem agnostic (drivers/video/) to that we don't have to reinvent the wheel each time
16:44zmike: DavidHeidelberg: did you see my ping on the piglit uprev
18:26demarchi: is it possible to use the container igt is using to reproduce build failures?
18:26demarchi: I can't reproduce this locally: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1119462
19:31demarchi: nvm, found it
19:47DavidHeidelberg: zmike: no, but the pain invoked on your side regarding to not having latest piglit reached me telepathically :D the piglit is upreved