00:45AndrewR: hm ..Lokking at https://www.phoronix.com/scan.php?page=news_item&px=ROCm-3.7-OpenCL-Image and into https://github.com/RadeonOpenCompute/ROCR-Runtime/tree/master/src/image ... does this (existence of addrlib and device-specific files) indicate OpenCL image support IS device-dependent (as far as driver is concerned?)
00:51bnieuwenhuizen: not sure how the driver handles it, but hardware-wise there are significant differences between generations
01:17AndrewR: https://gitlab.freedesktop.org/awatry/mesa/-/commits/clover-image-support/ - I found it while looking at issue-130 (in mesa) on gitlab
01:34AndrewR: (there is a lot of everything going on in mesa :} )
02:07jekstrand: AndrewR: It is device-specific in the sense that every device lays out images differently. However it should, in theory, be able to be handled by clover via the same abstractions it uses for images in GL.
02:07jekstrand: It requires a bit of work in the driver but not much.
02:07jekstrand: Part of the problem is that clover handles images unnecessarily differently from storage images in GL.
02:08jekstrand: There's some history there which others understand far better than me.
02:08jekstrand: But, generally, it's not too bad.
05:34shivam_: Hi, My name is Shivam Singh from IIEST Shibpu, India. I would like to participate in the X.org endless vacation of code. Can someone guide me on that?
06:02AndrewR: jekstrand, thanks!
07:19remexre: if an drmModeSetCrtc call I'm doing is returning EACCES, what're the first things I should check?
07:22danvet_: robclark, yeah it's about making sure no one misplaces a kmalloc in some future changes because they forgot to force some shrinker load
07:55MrCooper: karolherbst: which version of Xwayland?
07:56MrCooper: remexre: sounds like the process isn't DRM master
07:58remexre: MrCooper: oh, yep, you're right; now I'm getting an EINVAL, which is gonna be more annoying...
07:59MrCooper: /sys/module/drm/parameters/debug might be helpful for that
08:01remexre: will take a look, thanks
08:11remexre: ah, I forgot I set the mode pointer to NULL to debug a thing; working now insofar as the screen is black instead of a kernel console
08:12remexre: not working insofar as the actual drawing doesn't appear to hit the framebuffer, sigh; that's a tomorrow problem though
08:18remexre: wait, never mind, just needed a glFlush()
08:19remexre: cool, time to sleep for real; thanks again
09:09xexaxo1: robclark: indeed sorry. if anyone has tips for the future I'm all ears
11:22karolherbst: MrCooper: 1.20.8-1.fc32
11:34Venemo: Kayden, I added 2 more NIR patches to MR 6964, would appreciate a review from you or jekstrand, they also touch one line in the intel code.
11:35Venemo: Kayden: these will basically give you the compile-time-known primitive count, if you enable counting them
11:56danvet_: robclark, airlied on "[PATCH 2/3] drm/msm: add DRM_MSM_GEM_SYNC_CACHE for non-coherent cache maintenance"
11:56danvet_: I'd say lets stuff them into drm_clflush.c and done
12:02danvet_: I think that's the version we had like years ago already :-)
12:33MrCooper: karolherbst: current upstream Git server-1.20-branch might help
12:58karolherbst: MrCooper: are there any fedora builds I could just try out?
13:47danvet_: robclark, [PATCH V2 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() <- can you pls take care
13:48danvet_: robher, maybe for the arm part in drm-misc
14:07MrCooper: karolherbst: dunno
14:07MrCooper: maybe ask ofourdan or so
14:55NiksDev: Hi all, I am trying to convert the upstream tidss drm driver to new connector model.
14:56NiksDev: The connector is getting created by the tidss driver and bridges are attached with flag DRM_BRIDGE_ATTACH_NO_CONNECTOR
14:56NiksDev: Here are some questions, regarding this:
14:56NiksDev: 1) Most of the info regarding bus_format and bus flags is coming from the bridges. Is it okay to not populate connector->display_info?
14:56NiksDev: 2) The "drm_atomic_bridge_chain_select_bus_fmts" does the format negotiation. So is it okay for the encoder to simply pick the bus_format from the first bridge's state?
14:56NiksDev: 3) What is the meaning of MEDIA_BUS_FMT_FIXED? Does it mean that the bridge does not change the format from input to output?
14:56NiksDev: 4) The bus_flags are available in bridge->timings->input_bus_flags and also in bridge_state->input_bus_cfg.flags. Which one should be used?
15:45tomba: NiksDev: 1) display_info does contain all kinds of data, so I think it's still valid and we should get that somehow
17:22italove: hi everyone, I don't know if this is the right place to ask this, but can someone take a look at my proposal/MR to add some new opcodes to NIR that are used with a lowering pass for vector_cmp? https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6917
17:25anholt: italove: I'm confused how you were getting the "before the patches" case -- if you care about vectors, the vectorizer should be doing better than that.
17:25anholt: and vectoizer should help with the first after the patches case, too
17:40italove: anholt: yeah, I had vectorizer off for some reason, sorry for that, I'll remove that section of the description, but that's not the main point of the MR
17:42anholt: I'd focus on what your driver gets in to it and what it can produce out of that. while think that ball/bany would be nicer than the current ball/bany_eachcomparison, and backends would be good to recognize structures based on those, the MR seems to be complicating the situation when really one or the other driver should probably be recognizing a pattern
17:42anholt: (to me, i965 vector should be recognizing ball/bany patterns, rather than the combinatorial nir ops)
17:45italove: you said that you "think that ball/bany would be nicer than the current ...", does that mean that you think it's a good idea but not the way I implemented it, or that it isn't worth changing?
17:53anholt: I think it's a good idea, but it's hard to evaluate without understanding why your backend can't handle mattst88's suggestion of just recognizing the pattern
17:55italove: anholt: I mean, it can, it's just that I thought this solution solved the problem better and also works for other backends, but apparently it's not
17:56italove: anholt: my idea was to replace the current nir ops with these new ones, but one thing at a time
17:57jekstrand: Honestly, I'd kind-of like to see ball_*equal and bany_*nequal be replace by bany/ball. It seems a lot cleaner to me.
17:57jekstrand: Either pattern can be detected in the back-end
17:57jekstrand: The current one is probably a bit easier
17:58jekstrand:reads intel vec4 code
17:59jekstrand: The tricky bit is if you end up with a swizzle between the bany/ball and the comparison
18:13italove: jekstrand: this might be a silly question but why isn't swizzle tricky with the current implementation? aren't we just changing ball_equal(v, True) for ball(v) where v is a result of a cmp?
18:18jekstrand: italove: If you're checking for ball_equal(v, True), you can have a swizzle on v which can, in theory, be turned into a swizzle on v in the bany(v) that you emit in the back-end.
18:19jekstrand: If you have bany(equal(v.swiz, w.swiz).swiz), then you have two swizzles and you have to compose them when you try to emit a bany_equal() in the back-end. It's possible but annoying.
18:21italove: I see
20:13ajax: danvet_: at the risk of learning the answer, what do you need an s390 for?
20:14danvet_: I stumbled over an rabbit hole called follow_pfn in the kernel
20:14danvet_: s390 pci_read/write syscalls use that too
20:15danvet_: the excuse is I'm chasing this rabbit to improve my understanding of pin/get_user_pages rules and how this all works
20:16danvet_: follow_pfn essentially just reads the page frame number from a pte and hopes that's a legit thing to do
20:16danvet_: which in todays world with dynamic buffer managers and stuff, isn't
20:17danvet_: the main user is in v4l
20:17ajax: i got as far as "s390 pci" before deciding you're in a bad place
20:17danvet_: I'm aware of that
20:18danvet_: atm the smell is somewhat kept at bay by layers of refactoring blindly applied on top of the og sin
20:18danvet_: but I'll go full stupid on this
20:18ajax: hopefully you can get away with just an s390-targeting cross compiler?
20:20ajax: neither actually building on s390 nor running it under qemu-user are especially fun
20:20danvet_: yeah I'm not planning to do more than that
20:20danvet_: there's at least one great thing with the kernel
20:21danvet_: you can just compile test and assume the maintainer will test it
20:21danvet_: the maintainer just acks it and assumes you've tested it
20:21danvet_: everyone is happy
20:21krh: mutual CI
20:22HdkR: Mutually assured CI
20:22ajax: mutually assumed ci, more like
20:22krh: we have a winner
20:23imirkin: i don't see why bother compile-testing
20:23imirkin: just send it to list, you'll get an email from the kernel robot thing that tells you if it doesn't compile
20:24danvet_: the 0day bot has become slow enough that it takes it days for the real obscure corners
20:24danvet_: even once it's merged in linux-next
20:24danvet_: so you're patch gets reviewed and merged
20:25danvet_: then 1 week later 0day comes with the compile fail
20:25danvet_: and the maintainer rips you
20:25imirkin: for not compiling the intel driver on s390 big-endian
20:25danvet_: so for flying under the radar you need to test the nonsense yoursefl
20:25danvet_: usually it's i915 without acpi or backlight
20:26danvet_: but yeah it's the complete nonsense combo
20:26imirkin: the ones that are like "drm = m, backlight = y" type things are the most painful
20:26imirkin: how about you *don't* do that, and everyone is happy
21:47ajax: why is zink using drisw instead of VK_KHR_xlib_surface?
21:49ajax: i'm going to hope the answer is of the form "just a spike solution because nobody likes hacking on the winsys code"
21:52anholt:remembers asking this question and getting an answer I wasn't really convinced of
21:54jekstrand: kusma: ^^
21:54jekstrand: ajax: That's roughly my understanding. WSI is hard so punt.
21:55jekstrand: Doesn't do good things for perf, of course.
21:55jekstrand: zmike: ^^
22:02airlied: ajax: it would need it's own libGL then
22:02airlied: it doesn't use drisw really
22:02airlied: it uses dri2 as well
22:02airlied: drisw is the path for nvidia only
22:03ajax: why would it need its own libGL?
22:04airlied: like maybe it doesn't specifically need it, but if you want to avoid DRI then it makes it easier
22:04ajax: not that cloning libGLX is all that difficult, i've done it, but i did it because i was being lazy
22:05airlied: same as you can build swrast with it's own libGL
22:05airlied: so it works without DRI
22:06airlied: like maybe you can hack the whole gallium/winsys layers to avoid it but it was definitely on the tricky side
22:06airlied: currently zink is broken on radeonsi and I thionk it might be due to not using WSI
22:07ajax: yeah, i feel like getting it using wsi is going to be essential to the "just use zink and skip the native gl driver" plan's credibility
22:07ajax: which is admittedly a stretch goal
22:08airlied: yeah it's for the nvidia use case or on other OSes
22:08airlied: where you need your own libGL provider
22:08airlied: I didn't mean you had to replace glvnd
22:09ajax: well what delay does is build mesa's libGLX but with only the one "dri" provider that just happens to be radically unlike dri3. i kind of figure using wsi as your winsys would be the same kind of trick.
22:09airlied: 9fa7400564244bdd333066eb71285c3703b537f7 is where I added dri support
22:09ajax: oh nice
22:10airlied: I knew adding that Ideally I wanted to use WSI, but I went down the have something work fast route
22:11airlied: and at least on radv I don't think we allocate scanout images correctly so get some corruption
22:12airlied: but src/gallium/targets/libgl-vkwsi
22:13airlied: seems like a thing that was needed
22:16airlied: and of course a winsys/vkwsi
22:20airlied: ajax: now I have to spend today trying not to write it :-P
22:21lrusak_: I seem to be getting a bogus error when using validation layers with RADV, "Submitted command buffer expects VkImage 0x190000000019 (subresource: aspectMask 0x1 array layer 0, mip level 0) to be in layout VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL--instead, current layout is VK_IMAGE_LAYOUT_UNDEFINED."
22:22lrusak_: If I disable validation the image seems to show just fine
22:22airlied: lrusak_: radv should have no affect on validation
22:22lrusak_: I also don't seem to see this issue on the intel driver
22:22airlied: it's for showing app bugs usually
22:22ajax: airlied: i mean, i will if you won't
22:23lrusak_: airlied, yes sorry, I mean validation layer enabled in my app when running on radv
22:23ajax: probably not _today_, but
22:23airlied: lrusak_: it's a sign of a missing transition in the app
22:24airlied: lrusak_: you are doing a transfer operation to an image that hasn't been transitioned out of undefined into dst optimal
22:26airlied: not sure why intel doesn't show it, maybe you don't follow same paths
22:26lrusak_: I'm aware of what needs to happen, the thing is if I change physical device from the iGPU to the amd card I get this error
22:32lrusak_: the iGPU isn't connected to a physical output though, the AMD card is, but it seems rendering through wayland allows it to work (the tiling seems wrong though)
22:34airlied: lrusak_: yeah it's wierd, but the validation is only called by the app
22:34airlied: so the app does something different
22:35lrusak_: it's the exact same code path :P
22:35imirkin: is this the "it works on nvidia, so $other driver must be broken" argument?
22:37airlied: lrusak_: maybe how prime submits the buffers kicks validatio
22:38airlied:isn't sure if you can break easily on validation errors to backtrace
22:43lrusak_: I'll try and figure it out :)
22:50airlied: lrusak_: hmm it's possible the queue submit for secondary gpu display goes via validation
22:50airlied: not sure if it's a big problem to fix
22:51airlied:doesn't have a test setup for it at the moment
22:52lrusak_: I'm not sure what you mean exactly
22:53lrusak_: my amd gpu is my primary (it's connected to the monitor) the iGPU is just on the cpu
22:53airlied: oh so then it shouldn't be hitting that ptah
22:53airlied: maybe it's because intel is hitting that path
22:53airlied: that is hidden ffrom valdaiton
22:54airlied: but yeah look for a missing transition in the app from undefined to transfer dst then
22:57lrusak_: tl;dr I create image with undefined, transition undefined->optimal, copy buffer to image, transition optimal->shader read only optimal
23:01jekstrand: And now, time to write a clc loader.....
23:04jekstrand: jenatali: Are you planning to bake CLC into your build?
23:05jenatali: jekstrand: I'm assuming you mean libclc?
23:05karolherbst: jenatali: huh, what kind of loader?
23:06karolherbst: uhm.. jekstrand: ^^
23:07jenatali: jekstrand: We're using xxd.py to convert it to a char array to embed in our binary, if that's what you were asking
23:08jekstrand: jenatali: Yeah, that's what I was asking
23:09jekstrand: karolherbst: I for... reasons... need a libclc loader outside of clover. Was wondering if we should re-arrange stuff so it lives in src/compiler/spirv or something like that.
23:09jekstrand: It's simple enough I don't mind duplicating
23:09airlied: it's 20-30 loc happy to have it moed
23:09jekstrand: The really annoying part is sorting out the meson
23:09jekstrand: which we'll need to sort out for jenatali too
23:10jenatali: I think the only complicated part is the lowering pass, which probably should be moved out of clover
23:10jekstrand: This sounds like a problem for the superpowers of dcbaker[m]
23:10karolherbst: jekstrand: you know what I think would help?
23:10karolherbst: add a pkgconfig file to libclc
23:10airlied: it has one already
23:10karolherbst: oh really?
23:10karolherbst: and why do we play those dirty tricks with the clang resource path?
23:10airlied: we don't for libclc
23:11karolherbst: ohh. right
23:11airlied: though I'm not sure that is the right path :-P
23:11karolherbst: looks like it :p
23:11airlied:is seeing gings in /usr/share/clc
23:11airlied: which makes more sense I suppose
23:11airlied: since they aren't cpu arch specific
23:11karolherbst: I guess
23:12jekstrand:ignores meson for now and hacks. :)
23:12jenatali: jekstrand: I don't have any strong opinions here, anything you'd be rearranging/duplicating is small enough that we can just resolve it later if we want
23:12karolherbst: jekstrand: what part do you need for meson?
23:12karolherbst: just wondering
23:13jekstrand: karolherbst: We really need to break the SPIRV-LLVM-Translator and libCLC stuff out into a new needs_cl_spirv variable or something like that
23:13karolherbst: well, but that's unrelated to libclc
23:13jekstrand: That way the MSFT thing can use it and me and clover
23:14jekstrand: karolherbst: SLT and CLC seem to go together to me
23:14jekstrand: In a "compile OpenCL C to NIR" package
23:14jenatali: jekstrand: Yep, I'd agree with that
23:14jekstrand: SPIRV-LLVM-Translator. Sorry. Got tired of typing it. :)
23:14jenatali: Too many TLAs :P
23:14airlied: jekstrand: clover also calls spirv-val and a few other things
23:15karolherbst: yeah.. mhh
23:15jekstrand: airlied: Sure.
23:15karolherbst: yeah, clover depends on spirv-tools
23:15karolherbst: but I guess those can be pulled up as well
23:15jenatali: So do we, for linking
23:15jekstrand: Right... linking.
23:15karolherbst: I don't think anybody will complain about that
23:15jekstrand: I don't know if I care about linking
23:16jekstrand: But I don't have a problem with having that in the list for now
23:16karolherbst: so we need this library which links against clang, spirv-tools, and SPIRV-LLVM-Translator which turns OpenCL C + SPIR-V blobs into nir
23:16karolherbst: sounds like src/compiler/clc to me
23:17jekstrand: I mean, sure, but it's like 20 lines of C and 50 lines of meson. Hardly seems worth its own folder.
23:17karolherbst: we could also make linking the problem of the runtime
23:17jenatali: As long as it's parameterizable enough that's probably fine, but we'd like to have some control over things like using embedded headers rather than a clang installation, or control over default command line args, etc
23:17karolherbst: and the src/compiler/clc stuff really just translates clc into spir-v
23:17karolherbst: jenatali: sure, those can be options I think
23:18jekstrand: for CLC, it'd be easy enough to have a meson switch for "static" CLC rather than dynamic.
23:18karolherbst: jekstrand: well.. it's more
23:18jenatali: Yeah, it's more
23:18karolherbst: you have to configure your clang instance and shit
23:18karolherbst: a lot of the code is shared with the clc to LLVM path inside clover
23:18jekstrand: karolherbst: Hrm.... Actually, I don't think I need SLT
23:18karolherbst: which we take to convert it into spir-v
23:18jekstrand: I just need clc
23:18karolherbst: doesn't make your problem smaller
23:18karolherbst: hum.. wait
23:19airlied: yeah if you don't need online ocmpiler you don't need slt
23:19karolherbst: clc is really a bad term
23:19jenatali: Well at that point you're implying you're getting input SPIR-V, instead of input CL C
23:19karolherbst: please use either libclc or CL C if you mean the language like glsl :p
23:19jenatali: Yeah... probably better to be clear between CL C == source, libclc == a library of code
23:19karolherbst: anyway, if you only care about consuming spir-v, then yes.. the problem is quite small indeed
23:20karolherbst: but then I don't see the benefit of sharing as it doesn't seem to be worth it really. We really just translate it to nir and add some passes, no?
23:20jenatali: Sharing the CL C frontend would be more interesting, but also much more complicated
23:21karolherbst: well.. you mean the glue code :p
23:21jenatali: Yeah, setting up the clang invocation and the translator
23:21airlied: sounds like the basics to share are the find and load the libclc binary, disk cache it maybe, and spirv->nir it
23:22airlied:wonders how much the spirv options, compiler options matter there
23:22jekstrand: Pass them in
23:22airlied: but you should have access to those
23:23airlied: but yeah having clover::nir::libclc_spirv_to_nir be a wrapper and clover::spirv::load_clc
23:23airlied: seems like the basics
23:30karolherbst: mhh I should look into wiring up the conversion stuff :)
23:32airlied: karolherbst: what's stopping the constant ptr mr?
23:32karolherbst: waiting on jekstrand other MR
23:32zmike: ajax / jekstrand: no idea, probably because I've never even glanced at anything related to winsys
23:32karolherbst: airlied: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6974
23:33jekstrand: which is waiting on anholt
23:33jekstrand: But also, I dealt with anholt's comments on Friday and didn't actually push the branch. :-/
23:33karolherbst: mhh, I kind of feel like I think images are more important than conversions :D but conversions are so easy to wire up
23:33airlied: ah hadn't realised it was in a queue :-P
23:35jekstrand: karolherbst: You can land your MR without my patch. It's just less optimal.
23:35karolherbst: ohh, true
23:35karolherbst: I guess I'll do that
23:35airlied: my attempts fo fix review comments on my ci work broke my CI work
23:36karolherbst: airlied: wanna give it another test run or should I just merge it?
23:37karolherbst: although.. I kind of would like curro to take a look first as it touches some clover core dcode
23:38anholt: jekstrand: ok, fixups look good. also a reminder that you or cwabbott seem like about the only people that might review my liveness stuff so nir-to-tgsi can land. :)
23:38jekstrand: anholt: Yeah...
23:39airlied: karolherbst: worked fine when I tested it
23:39jekstrand: anholt: It's getting late now. Ping me and I can look at it again tomorrow. I gave it a very quick look and seemed to like it better at the time.
23:39karolherbst: the pipe loader is broken?
23:39jekstrand: anholt: Is that an RB for the const series once I squash?
23:40anholt: as far as I could tell, yeah :)
23:41karolherbst: I get the feeling somebody reworked the pipe loader stuff in the past :p
23:45karolherbst: but I kindof get the feeling I broke it locally :d
23:48jekstrand: Or I could just do a fake libclc.....
23:48karolherbst: it crashes inside the pipe loader
23:48jenatali: jekstrand: What good is a fake libclc?
23:48karolherbst: that was unrelated to my rumbling
23:48jekstrand: jenatali: Maybe not much good long-term. :)
23:49airlied: just write the loader as a hack would be quicker
23:49jekstrand: It's true
23:49airlied: like if it's not in C++ it should be much smaller :-P
23:49karolherbst: anholt: it doens't look good for you :p
23:50jekstrand: airlied: I've mostly written it. And mine's better because it mmaps the file. :D
23:51anholt: karolherbst: going to be done with work soon, put up some debug info an I might be able to help
23:51karolherbst: dd->create_context is NULL, but I am done with git bisect soon as well
23:52anholt: nouveau, presumably?
23:53karolherbst: anholt: 8a05d6ffc65d0fd0e0a52fe84a174d4ca63e5521
23:53karolherbst: anholt: iris :D
23:54anholt: are you using the fixed up iris pipe loader, or an old rebase?
23:54anholt: since it wasn't in master when I landed the code
23:54anholt: (the pipe loader refactors, at least)
23:55karolherbst: how would that matter for git bisect?
23:55anholt: actually, back way way up here. what code even is crashing? are you running something on master, or some downstream branch?
23:55karolherbst: I am on 8a05d6ffc65d0fd0e0a52fe84a174d4ca63e5521, it breaks clover
23:55karolherbst: just running clinfo
23:55karolherbst: nothing fancy about it really
23:55anholt: I don't see a pipe_iris.c in tree, and I thought clover was all dynamic pipe loader
23:56karolherbst: mhhhh... heh
23:56karolherbst: good idea actually
23:56karolherbst: I think the file is just left over in my local install prefix
23:56anholt: so I'm skeptical that you're using clover on 8a05d6ffc6
23:57karolherbst: yeah.. I am trying with a cleared prefix and see what that does
23:58karolherbst: okay.. now it works