02:10imirkin: gnarface: no, h264 on G92's never worked
02:11gnarface: no? oh, i thought it did
02:21imirkin: not accelerated, at least with nouveau
02:21imirkin: i could never track down what i did wrong with engine init
02:22imirkin: the xtensa chip is running fine, but the underlying decoding engine isn't =/
04:16HdkR: imirkin: What is using an xtensa chip?
04:16imirkin: they used xtensa
04:16imirkin: to drive the VP2-era decoding engines
04:21imirkin: same general idea as the falcon chips, just ... xtensa.
04:21imirkin: i guess they didn't want to pay the licensing fees, or ... who knows
04:22HdkR: TFW Im working on an xtensa llvm backend that is unrelated
04:22imirkin: mwk decoded a good chunk of the vp2 firmware
04:23imirkin: iirc i did a bit of it too
10:27Lyude: btw mupuf, alyssa is outside the auditorium if you would like to meet then
10:27mupuf: coming in 5
13:58karolherbst: imirkin: so I gave fixing our multi context issues a shot and came up with basically moving the channel into the context and just have one channel per context, but the patch size got kind of out of hand and there are still some issues about the screen having to know something about future contexts we might create
13:58karolherbst: anyway, here is the patch: https://github.com/karolherbst/mesa/commit/0d44298e6624430576a086ccc622763aa44b8a8d
13:58karolherbst: I am sure I broke nv50 and video acceleration
13:59karolherbst: but I kind of prefer to have smaller patches, but I don't see a reasonable way to split it up without having intermediate states being more broken
14:01karolherbst: at least I got passed the crashes inside dolphin and it still renders, so I think this approach would work in general
14:02karolherbst: and I think we could even remove all the screen->cur_ctx stuff, because it doesn't make sense to track the current context if each contexts has its own channel anyway
14:02karolherbst: and the saving state stuff
14:02karolherbst: "nvc0_graph_state" and so on
14:12imirkin: karolherbst: that's not workable... can't have multiple hw contexts
14:12karolherbst: imirkin: why not?
14:13imirkin: switching is slllloooooooowwwwwwwwwww
14:13karolherbst: I know
14:13karolherbst: but... well
14:13Sarayan: so no memory protections between gl-using applications and the gl-compositing windows manager?
14:13imirkin: Sarayan: if they're running in the same process, then no.
14:13karolherbst: multiple gl applications use multiple contexts anyway
14:14karolherbst: I doubt it is a big issue though
14:14karolherbst: as you have couple of applications with multiple contexts
14:14karolherbst: and most applications only have one
14:14karolherbst: there is just a handful of applications really doing it
14:14imirkin: karolherbst: applications use multiple threads for speed
14:14Sarayan: ok, it's multiple contexts sharing textures/framebuffers/targets?
14:14karolherbst: and for example dolphin only uses 1 effecitvly
14:14imirkin: (multiple contexts, etc)
14:14karolherbst: imirkin: depends on how
14:14karolherbst: dolphin only compiles shader in multiple threads etc...
14:15karolherbst: and I doubt that you can actually use multiple contexts for speed
14:15karolherbst: how should that even work?
14:15karolherbst: you still have just one GPU
14:15karolherbst: you can reduce API overhead, but you have 0 automatic state sharing through APIs
14:15karolherbst: so you end up copying from one context to the other anyway
14:15imirkin: the solution is to stop using libdrm_nouveau
14:16imirkin: the way that kick is implemented is what makes all this unworkable
14:16karolherbst: why do we even want to share the pushbuffer?
14:16imirkin: basically any action might trigger a kick
14:16imirkin: we don't, it's just a side effect
14:16imirkin: but with a single hw context, you effectively only have 1
14:17imirkin: you could make multiple ones, but they still have to account for what was submitted previously
14:17imirkin: and in effect you're back to having one
14:17karolherbst: well, we would have to resubmit all state basically everytime then
14:17karolherbst: I don't see how to get around that problem
14:17karolherbst: each context has its own state
14:17imirkin: which is still way faster than an hw context switch
14:17imirkin: we do this now anyways
14:17karolherbst: uhm, no
14:18karolherbst: we don't
14:18imirkin: we do.
14:18karolherbst: no, we just overwrite the old state
14:18karolherbst: there is some "state saving"
14:18karolherbst: but it doesn't really work
14:18Sarayan: isn't MT GL mostly a way to reduce the single-core driver overhead actually?
14:19karolherbst: applications wanting to actually draw on multiple contexts will be slow one way or the other
14:19imirkin: basically you want to serialize everything. but given the libdrm_nouveau architecture with kicks coming in at random times, it's impossible to get the locking right
14:19karolherbst: it makes 0 sense to use that to get more performance
14:19imirkin: i know coz i tried.
14:19Sarayan: to allow building what's essentially commands list while waiting for the previous draw to finish?
14:19imirkin: i ended up with situations that were unsolvable without api changes.
14:19karolherbst: imirkin: yeah, I saw that issue and thought it wouldn't really be manageable
14:19imirkin: so the solution is ... stop using libdrm_nouveau
14:20imirkin: and make an architecture where it *is* possible to get the locking right
14:20karolherbst: I don't see how that will help as you basically have the same issues
14:20imirkin: part of the problem is that we end up doing cpu-based sleeps
14:20imirkin: which is why i wanted the syncfd/whatever logic to become available
14:20karolherbst: okay sure
14:20Sarayan: imirkin: events?
14:21imirkin: Sarayan: waiting for the gpu to complete stuff.
14:21karolherbst: but in the end, if we share one channel, we basically have to resubmit all state on each flush and whenever we actually detect that we switch the API context
14:21imirkin: karolherbst: not on each flush, any time that a different thread "takes over"
14:21karolherbst: or add bunch of code to actually detect where the states diverge
14:21imirkin: which is what we do now anyways.
14:21imirkin: the problem isn't the multiple threads -- that all works fine
14:21imirkin: the problem is the concurrent access.
14:22karolherbst: most of my patch isnt really about just using one channel, that's just an easy solution to use
14:22karolherbst: but the focus on moving alls tate from screen to the context
14:23imirkin: but that state is attached to the hw context
14:23imirkin: of which there should be 1
14:23imirkin: hence screen makes sense.
14:24imirkin: (so your patch is mostly about using separate hw contexts)
14:28karolherbst: well, it might also be a good idea to have buffers for each contexts so that we don't have to synchronize on those as well
14:28karolherbst: which is actually what dolphin also triggered
14:29karolherbst: anyway, we track state on screen level
14:29karolherbst: but we have to do it fully on a context level
14:29karolherbst: I see now way how to get around that
14:33karolherbst: imirkin: but, big questions, how do you know a context "took over" the GPU? (It isn't about threads here really)
14:34karolherbst: sure, we could set screen->cur_ctx on literally every function which may submit something to the GPU and resubmit everything whenever we have that (+ waiting on everything being done on the GPU)
14:35karolherbst: but... how can this be even faster if you end up stalling and waiting on other contexts being done with their work
14:35Sarayan: urgh, sounds nasty
14:35karolherbst: or maybe it is always slow
14:35karolherbst: and we just can make it less slow but using one hw context
14:48karolherbst: imirkin: but... why do you think context switching is _that_ slow? I am sure it is quite fast on at least the newer GPUs
14:48karolherbst: maybe it was slow on tesla or something
14:49karolherbst: RSpliet: I think you have some data on that, don't you?
19:21gst568923: Hi guys
19:22gst568923: Does anyone know the implementation status of open source firmware in order to use Nvidia PureVideo technology with the VP5 engine?
20:17gst568923: For extract the Nvidia Firmware for PureVideo VP5, I have to use mmiotrace with Proprietary Driver and run Vdpau?
20:19gnarface: the firmware cutter tool won't just let you extract it from their installer?
20:19gnarface: if not, yea probably something with mmiotrace...
20:21gst568923: hi gnarface, I am looking on the internet, if there is someone who has managed to extract it
20:22gst568923: I read this https://nouveau.freedesktop.org/wiki/NVC0_Firmware/
20:23gst568923: It's a bit difficult
20:24gnarface: if you have a working install somewhere you can just copy the files from the firmware directory too
20:25gnarface: i forget where it puts them but i thought it was something like /usr/lib/nvidia/firmware/
20:25gnarface: as just loose files in a directory
20:25gnarface: but maybe they've changed that
20:30gst568923: Can I extract Nvidia blob firmware from the VirtualBox machine? because in the current linux distro I installed nouveau and I would like to avoid uninstalling it and then install the proprietary drivers
20:34gnarface: i don't know for sure but i assume so
20:34gnarface: i'm having trouble finding the exact path for you
20:35gnarface: hmmm, maybe it's been moved to the initrd.img
20:37gst568923: gnarface Are you a maintainer of the nouveau project?
20:54gnarface: gst568923: sorry, no.
20:55gnarface: just trying to help you find that firmware and now i can't find mine here anymore either
20:55gnarface: but it has to be somewhere...
20:57gst568923: I ask you, because you are the only one who is giving me support, all the others and the mantainers where they are? I'm posting at a wrong time (here in Italy it's 11pm)?
21:03gst568923: gnarface in xorg.log I have found this string:
21:03gst568923: [ 15.103] (--) NOUVEAU(0): Chipset: "NVIDIA NVD9"
21:03gnarface: gst568923: i'm not sure where they are but i assume somewhere in europe
21:04gnarface: gst568923: the nvidia official installer just dumps all the same giant ball of firmware files for all the supported chips
21:04gst568923: that it is a confirm that my video card is:?
21:04gst568923: NVD9 (GF119) GeForce 410M, 510 (?), GT (520, 520M, 520MX, 610), 610MQuadro NVS 4200M
21:04gnarface: uh, i would assume so
21:06gst568923: because https://en.wikipedia.org/wiki/List_of_Nvidia_graphics_processing_units#GeForce_7_(7xxx)_series
21:06gst568923: The GeForce GT 705 (OEM) is a rebranded GeForce GT 610, which itself is a rebranded GeForce GT 520.
21:06gst568923: so I can confirm NVD9 (GF119)
21:07gnarface: yea, i think that's a safe assumption
21:07gnarface: but now that you bring it up, it could mean that you need firmware from the *legacy* nvidia drivers
21:07gnarface: since it's not clear to me if that card counts as a 600 or 500 for support
21:07gst568923: why legacy?
21:08gnarface: the 500 series was recently deprecated by nvidia for their main driver
21:08gnarface: 600's are barely hanging on
21:08gnarface: so even if you find the *current* firmware from them, it could already be missing support for that card
21:09gnarface: but i don't know how likely that is one way or another
21:09gnarface: it could be like a 1% risk or a 50% risk
21:09gnarface: someone else would know
21:09gnarface: someone who has hacked on this firmware before
21:09gnarface: but i suspect they're all still asleep or at work right now
21:11gst568923: There are 2 sets of firmware for video decoding, one for kernel and one for userspace. Only nvc0 series need the userspace firmware. Kepler, and also nvd9 do NOT have userspace firmware
21:14gnarface: i think that would mean the firmware IS in initrd.img if indeed it's kernelspace only
21:15gnarface: at least on a typical distro package setup
21:15gnarface: ymmv there i suppose
21:15gnarface: it won't be identical for every distro, i don't think
21:20gst568923: gnarface I found this https://ubuntu.pkgs.org/18.04/ubuntu-multiverse-amd64/nouveau-firmware_20091212-0ubuntu1_all.deb.html
21:20gst568923: but there is not NVD9
21:39gnarface: gst568923: yea, i see. honestly i would just try dropping them all in that directory at once anyway to see if any get picked up at boot up/
21:39gnarface: it's grasping at straws though, i know
21:42gst568923: gnarface I have download this https://github.com/imirkin/re-vp2
21:43gst568923: and I have download NVIDIA-Linux-x86_64-340.32.run
21:43gst568923: then I have run: sh *.run --extract-only
21:43gst568923: then I have run python2 ./extract_firmware.py
21:44gst568923: this is the output:
21:45gst568923: Uploaded file: https://uploads.kiwiirc.com/files/9921b3e06b112f95bd37f98df8d0590e/microcode.png
22:03gst568923: good night