00:04mlankhorst: aw, tegra has no wifi :(
00:11bitwise_uk: Soo ... set acceleration to SNA and everything is good, so an intel thing after all (much hate for optimus for making gfx overly complicated)
00:11bitwise_uk: cheers for showing me it can work :D
00:13imirkin: mlankhorst: it has SD. and mini-pcie
01:16mlankhorst: I wonder if iwldvm would work on arm
01:18mlankhorst: hm seems so
02:10flavi0: hi people. if i have the core version G98M of my card (Quadro NVS 160M), how can i map this to the family/code name to compare against the feature matrix?
02:11flavi0: is it NV98 (G98) -> Tesla?
02:11flavi0: i am on that page, yes
02:11prg: so yes, it's nv50
02:11flavi0: cool, thanks
02:12flavi0: hmm OpenCL support stalled. damnit! ;)
02:43joi: imirkin: nope, kernel started to return channel numbers (they were always 0 previously) - there are some bugs in demmt which need to be fixed to properly deal with it, but the biggest problem is that demmt relies on gem_new->channel_hint being equal to the channel number but nouveau userspace sets it to 0
02:45joi: one ugly solution would be to pretend that channel number is still 0
06:49karolherbst: ohh right, I could also include the overheating parts in my clock code :O
07:01karolherbst: pmoreau: do you have some time now?
08:08yoshimo: so if i get crashes with a pstate of 0f , is there anything i can do to help fix it?
08:10karolherbst: yoshimo: depending on the card
08:10yoshimo: it still is the gtx275
08:11yoshimo: 03 and 07 seem to be fine, AC fails and 0f freezes the machine
08:11karolherbst: usually the model number isn't a unique key to the card you have there ;) chipset is more important
08:11karolherbst: but your card seems to be a gt200
08:11karolherbst: gddr3 mhh
08:12yoshimo: gt200b according to lspci
08:12karolherbst: RSpliet: hasn't pmoreau had the same problems (also gddr3 tesla card?)
08:14karolherbst: yoshimo: I think this is just because of gddr3 not handled perfectly well in nouveau
08:14karolherbst: can you read the dmesg errors?
08:15yoshimo: i have all kinds of colored noise on the screen if try to set 0f so not directly no
08:16karolherbst: ohh mhh
08:16karolherbst: I am pretty sure it is memory related then
08:24yoshimo: does https://pastee.org/7ujvd from kern.log have anything usefull?
08:25karolherbst: yoshimo: do you know how to create mmiotraces ?
08:26yoshimo: i usually need a couple of attempts but i can do it
08:27karolherbst: yoshimo: then please make one with the blob and one with nouveau
08:28yoshimo: doing anything special?
08:29karolherbst: with nvidia-settings you be able to just tell the driver to use max perf
09:48karolherbst1: setting up an openwrt router is very fun as you may already noticed
09:49 < Bird|otherbox> so, I have a GF9800GTX+ in a dual-monitor setup on a 3.16 kernel (LMDE 2 Betsy), and when I try to start MDM/X11 with the Nouveau driver, the bootsplash comes up on both monitors, but then both monitors fall asleep and will not wake up -- the system still responds to the magic sysrq though and to Num Lock/... so it isn't completely hung, just unable to output video
09:50 < Bird|otherbox> is this a sign that I have power management problems, or?
09:50karolherbst: Bird|otherbox: not especially, this sounds more like a mode change
09:51karolherbst: do you have something like "nomodeset" in the kernel boot params?
09:51 < Bird|otherbox> aaah. not that I know of -- let me double check though
09:51karolherbst: usually display go into sleep mode, when they don't get any video signal at all
09:51karolherbst: maybe the driver tries to do something the displays won't do
09:52karolherbst: you could try if it works with only one of them (try both to be sure)
09:53 < Bird|otherbox> karolherbst: yeah. no sign of nomodeset
09:54 < Bird|otherbox> how do I tell what nouveau was trying to set the monitors to?
09:54karolherbst: Bird|otherbox: mhh try to get logs :D
09:54karolherbst: Bird|otherbox: you could check if one monitor works though
09:54 < Bird|otherbox> (they are a LG 23" and a ViewSonic 22", both 1920x1080 native 16:9 and both driven via DVI-D)
09:57 < Bird|otherbox> karolherbst: looking at the Xorg logs, they say that the 1920x1080 mode is being read from the EDID chips and the monitors are both being set to 1920x1080 -- perhaps the DVI-driver stuff in the card is what is getting grumpy?
10:03 < Bird|otherbox> karolherbst1: I get the same symptoms when I sit there and let MDM try to start on its own, even with only 1 monitor connected -- HOWEVER, I can start MDM manually from a VTY just fine
10:04karolherbst1: with vty you mean tty or ssh?
10:04 < Bird|otherbox> local tty
10:04karolherbst1: on the monitor?
10:04 < Bird|otherbox> yes
10:04 < Bird|otherbox> I start up in recovery mode and it comes up to a TTY just fine
10:04karolherbst1: so it only does not work on the X vtcon?
10:04karolherbst1: I mean, on the X screen what so ever
10:05karolherbst1: could be a X problem then
10:05 < Bird|otherbox> well, once the video output goes away, the only way to get it back is to reboot -- VTY switching no longer functions at that point
10:05 < Bird|otherbox> and this is MDM's X11 instance that is failing to come up
10:05karolherbst1: which distribution?
10:05 < Bird|otherbox> (i.e. the user-selector, and LMDE 2 Betsy)
10:05karolherbst1: you could disable the mdm service and see what happens when you manually start it
10:06karolherbst1: I already had such problem with kscreen a while back
10:06karolherbst1: it just applied an invalid xrandr mode and my display got all black
10:06karolherbst1: maybe it is the same here just with different software
10:07yoshimo: where in an mmiotrace can i check if any reclocking happened?
10:07karolherbst: yoshimo: mhhh this is a bit really messy :D
10:08karolherbst: usually there are some regs especially needed for that, but usually scripts are used for memory reclocking
10:08karolherbst: you should search for hwsq scripts
10:08karolherbst: they should be pretty similiar (the blob and nouveau ones)
10:08karolherbst: but there may be a difference
10:08karolherbst: I know that RSpliet and pmoreau took care about some tesla reclocking options
10:09karolherbst: so maybe you should wait until somebody of them answer
10:14 < Bird|otherbox> karolherbst: whoa -- I'm getting backtraces from hung kworkers that are pointing into the suspend/resume code
10:14 < Bird|otherbox> (that's when I try to let MDM autostart with only a single monitor plugged in)
10:14karolherbst: do you have a laptop or desktop?
10:15karolherbst: wait, either way that would be strange
10:15 < Bird|otherbox> karolherbst: this is on a desktop
10:15karolherbst: do you have only one gpu?
10:16 < Bird|otherbox> karolherbst: indeed, single GPU
10:16karolherbst: could you look into the X logs?
10:18 < Bird|otherbox> karolherbst: no sign of trouble over there
10:23karolherbst: Bird|otherbox: strange
10:24karolherbst: are you able to ssh into the desktop?
10:24 < Bird|otherbox> karolherbst: sshd isn't configured on it -- do you want me to set it up?
10:24karolherbst: may make sense
10:24karolherbst: at least you can copy the traces that way :)
10:26 < Bird|otherbox> karolherbst: :)
10:26 < Bird|otherbox> alright, got ssh up
10:31 < Bird|otherbox> karolherbst: https://bpaste.net/show/e81dd0aea7f2 <the:traces
10:32karolherbst: anything before that?
10:32 < Bird|otherbox> karolherbst: nope, no signs of trouble before that
10:34karolherbst: can you give me the entire dmesg output?
10:40 < Bird|otherbox> karolherbst: http://paste.pound-python.org/show/nXSIzWc9AbG6GqzURYCD/
10:42karolherbst: looks fine :/
10:51Yoshimo: having a pstate called AC for a gt200b seems wrong, the nvidia settings only show 3 different states
10:51 < Bird|otherbox> karolherbst: yep, and so do all the archived ones AFAICT
10:53 < Bird|otherbox> should I just give up and install ze blob at this point?
10:53karolherbst: Yoshimo: there is no AC pstate
10:54karolherbst: Yoshimo: AC just means which pstate is enabled when on AC power
10:54karolherbst: there is a DC one when on battery
10:54karolherbst: the last line just tells you what is currently active
10:54Yoshimo: ah ok
10:55karolherbst: you can do also nasty stuff like echo "DC:0f" > pstate
10:55karolherbst: then only for DC power you get 0f pstate
10:55karolherbst: Bird|otherbox: you could help fixing this problem :/
10:55imirkin: joi: yeah, i tracked it down to channel_hint being wrong too.
10:56karolherbst: Yoshimo: try nouveau.runpm=0
10:56 < Bird|otherbox> karolherbst: true, verily true
10:56karolherbst: Bird|otherbox: this was for you
10:56 < Bird|otherbox> aah
10:56karolherbst: to the kernel command line
10:56Yoshimo: karolherbst: it gets nasty enough already with a simple 0f, no need for any further experiments ;)
10:56karolherbst: you may have to rebuilt grub and stuff, maybe you know it all already ;)
10:56karolherbst: Yoshimo: yeah but with 0f you also get 0f on battery :O
10:57Yoshimo: rather difficult on a desktop big tower
10:58 < Bird|otherbox> karolherbst: trying nouveau.runpm=0
10:59karolherbst: Bird|otherbox: if that works then well, there is some runpm issue :p
10:59 < Bird|otherbox> karolherbst: nope.ko, man
10:59 < Bird|otherbox> same symptoms
11:00karolherbst: sure you booted with that the right way? :D
11:00 < Bird|otherbox> I did an e in Grub and tacked it at the end of the kernel line, then hit f10
11:00karolherbst: I see
11:00karolherbst: this looks somehow wrong anyway
11:01karolherbst: ohhh wait
11:02 < Bird|otherbox> yeah, and neither MDM nor X11 are up far enough to spit out a log -- I'm SSHed into the box right now while it's in that video-coma
11:02imirkin: Yoshimo: you should provide your GPU's info to RSpliet -- I'm sure he'd be interested. probably a vbios would be good.
11:03karolherbst: Bird|otherbox: okay, nouveau seems to do the right think though
11:03karolherbst: Bird|otherbox: you could boot with runpm=0
11:03karolherbst: ohh wait
11:04karolherbst: have to lookup the parameter
11:04 < Bird|otherbox> karolherbst: let me try starting MDM manually while the box is in the video-coma
11:05karolherbst: Bird|otherbox: try acpi=off apm=off
11:05 < Bird|otherbox> ok...xD
11:07 < Bird|otherbox> so, starting MDM manually did nothing to the video-coma. booting with acpi=off apm=off now
11:08 < Bird|otherbox> ...*thatbrought:me back to the "moving boxes" bootsplash followed by the two orange/one white box error screen
11:10 < Bird|otherbox> no video coma, but MDM still isn't autostarting
11:10karolherbst: at least something
11:10 < Bird|otherbox> yeah
11:10karolherbst: what kind of error?
11:11 < Bird|otherbox> karolherbst: I can't find any associated error message in the logs -- I just get the "I give up!" version of the lo-fi bootsplash (aka "orange box" "orange box" "white box" in the center of the screen)
11:13karolherbst: try to start mdm manually then
11:14imirkin: wtf is mdm?
11:14 < Bird|otherbox> imirkin: MDM = MATE Display Manager
11:14 < Bird|otherbox> (so, MATE's equivalent to gdm, kdm,...)
11:14 < Bird|otherbox> karolherbst: strangely enough, I'm finding nothing in the dmesg related to nouveau at all
11:15 < Bird|otherbox> nope, nouveau didn't load this boot.
11:16imirkin: iirc there were some runpm-related issues in 3.16 that were fixed in 3.17
11:16imirkin: in any case, i'd definitely recommend trying a fresh kernel instead of debugging long-ago fixed issues
11:16imirkin: if it still happens with a fresh kernel, it makes more sense to dig deeper
11:17imirkin: karolherbst: acpi=off won't boot most modern machines
11:18pmoreau: karolherbst: I do have some time now, but only have access to my laptop cards.
11:18pmoreau: karolherbst: And with the latest version of Roy's patches, I didn't have any issues reclocking the G96. :-)
11:18imirkin: joi: why are gem objects attached to channels? why not have a global space for them?
11:18 < Bird|otherbox> imirkin: 3.16.7 is the newest kernel available for Debian and derivatives
11:19karolherbst: imirkin: ohh right
11:19 < Bird|otherbox> (3.17 hasn't made experimental yet)
11:19imirkin: Bird|otherbox: not sure what that has to do with anything. latest kernel is 4.3-rc3
11:19karolherbst: Bird|otherbox: okay then only apm=off
11:19imirkin: karolherbst: only ancient laptops have apm
11:20 < Bird|otherbox> imirkin: it'd mean I'd have to shoehorn a newer kernel into the box by hand :)
11:20karolherbst: what is the right boot parameter to disable pm ?
11:20 < Bird|otherbox> will try with that
11:20karolherbst: pmoreau: I know that radeon and nouveau have that, but is there also a global one?
11:20imirkin: karolherbst: nouveau.runpm=0 will disable nouveau's attempts to auto-suspend. of course none of that should be triggering in his case in the first place.
11:20pmoreau: No idea
11:21karolherbst: imirkin: that's not the issue
11:21karolherbst: it disables it, but while doing so it fails
11:21karolherbst: nouveau calls pm_runtime_forbid
11:21karolherbst: in an attempt to disable pm
11:21karolherbst: but somehwere there the kernel get messed up
11:21karolherbst: actually the kworker blocks
11:22karolherbst: ohh wait, it tries to talk to the pci device there
11:22karolherbst: makes sense
11:22karolherbst: Bird|otherbox: yeah you should try a newer kernel
11:23karolherbst: pmoreau: mhh I need a gt215 card though with clocking support
11:23karolherbst: Yoshimo: ask pmoreau about some patches :p
11:23 < Bird|otherbox> trying a runpm=0 boot now
11:25pmoreau: karolherbst: Meh... I have a GT200, GF100 in the car, but have nothing to plug them in my laptop, and they are under a pile of other things.
11:25karolherbst: ohhhhhhh embedded dev is a lot of fun, especially if you only have 640k disc space :D
11:25karolherbst: tried installing "basic" software like dnscrypt
11:26karolherbst: guess what
11:26pmoreau: ran out of space?
11:26karolherbst: openwrt is very fun :)
11:26pmoreau: Yoshimo: You should test the patches from this remote: https://github.com/RSpliet/kernel-nouveau-nv50-pm.git
11:28karolherbst: pmoreau: sad, I finally managed to get nice ram usage counters, I have only one game which doesn't work with my algo completly
11:28karolherbst: with all the other stuff it works pretty good
11:28karolherbst: only some stupid stuff left
11:29 < Bird|otherbox> karolherbst: pmrun=0 boot provokes the same backtraces I was seeing with a single monitor
11:29karolherbst: like load drops mid game
11:29karolherbst: Bird|otherbox: you really want to test newer kernels ;)
11:29pmoreau: Well, port your work to g8x, g9x and I'll test it! :-)
11:29karolherbst: pmoreau: I have no clue how to do that there yet .D
11:30pmoreau: karolherbst: Then, you can also buy me some cards. :D
11:31pmoreau: I should probably buy at least one Kepler.
11:31karolherbst: why? kepler works pretty good already :p
11:31karolherbst: buying working stuff is no fun
11:32pmoreau: Once I get to run some kernels on Tesla (in some distant times), I could have a quick look at other families as well
11:32 < Bird|otherbox> karolherbst: turns out backports has a 4.1 kernel, will that do?
11:33pmoreau:needs to fix returning the SPIR-V binary inside clover
11:34imirkin: Bird|otherbox: should be a good start
11:34karolherbst: Bird|otherbox: yeah
11:35pmoreau: karolherbst: Do you know of any reg(s) which specify if the card is PCIe?
11:35karolherbst: pmoreau: the kernel knows
11:35Yoshimo: pmoreau: does it really require to built the complete kernel?
11:35karolherbst: you know it already :p
11:35karolherbst: Yoshimo: you can download the patches and use -p4 ?
11:35karolherbst: maybe p5 or p3
11:36pmoreau: Yoshimo: You should be able to easily port the patches to Ben's tree
11:36karolherbst: pmoreau: pci_is_pcie(struct dev)
11:36pmoreau: karolherbst: Oh right, there was this function
11:39 < Bird|otherbox> karolherbst: installing the 4.1 kernel from backports now
11:40karolherbst: pmoreau: I only have 4MiB in total :/ this is somwhow not much
11:41pmoreau: karolherbst: Why are you doing embedded dev?
11:42karolherbst: 've installed openwrt on my router
11:42karolherbst: I thought I could do all my dns stuff there instead of doing it on every client
11:42 < Bird|otherbox> karolherbst: booting 4.1 now
11:42 < Bird|otherbox> we'll see what happens...
11:44 < Bird|otherbox> karolherbst: 4.1 still doesn't fix it. *sigh*
11:44 < Bird|otherbox> no backtrace, but otherwise the same symptoms
12:04karolherbst: pmoreau: lol, rebooted device, got +300kB space
12:10karolherbst: I bet it was the opkg package cache
12:10pmoreau: Reboot 3 more times and that will sum up to +1MB! :D
12:10karolherbst: but now my web gui doesn't work
12:11pmoreau: Who cares about GUI (web or not)? The future is in consoles!
12:11karolherbst: yeah well
12:11karolherbst: right, doesn't matter know anyway
12:12Incnis_Mrsi: does the word “post” in «NvForcePost» and function names «nvkm_devinit_post», «nv04_devinit_post» stands for Power-On Self-Test, or ?
12:13karolherbst: ohh no, I have to learn vi :O
12:15pmoreau: Incnis_Mrsi: It will cause Nouveau to run the init scripts stored in the VBIOS, even if the card was *detected* as properly initialised.
12:31qq[IrcCity]: I don’t understand what exactly to do. the bus reset (/sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/reset or the same from inside), then, say, nvkm_device_init(), but after that I must tell all the software that the card is cleared.
12:31qq[IrcCity]: which piece of damn software actually executes Xorg ⇔ TUI transition?
12:35qq[IrcCity]: someone must do all the job related to establishing a video mode. I can mask it as a VC switching, but the software must be told to actually make a video mode setup, that is done in Xorg ⇔ TUI but not during TUI ⇔ TUI.
12:37pmoreau: skeggsb_: I just sent the v5. Hopefully I remembered correctly what you told me. :/
12:48qq[IrcCity]: suppose my tty7 is active with Xorg running. I make nvkm_device_init(), then set_console(0) that should schedule switching the Linux console to tty1. could anybody theorize what will ensue?
12:53 < Bird|otherbox> hrm, should I keep the backports 4.1 kernel around, or just purge it off the box considering it did nothing for my plight?
12:54karolherbst: Bird|otherbox: are you sure you booted into 4.1?
12:54 < Bird|otherbox> karolherbst: yep
12:54 < Bird|otherbox> positive.
14:24qq[IrcCity]: trying to understand drm/nouveau/nouveau_sysfs.c and drm/nouveau/nouveau_hwmon.c, namely how to create a sysfs frontend for driver’s routine, but can’t find where and how are all these «dev_attr_» defined.
18:27mrnuke: imirkin: hey, about those logs
18:28mrnuke: imirkin: I just realised there's a serial port on the system with the GPU. you thinkin' what I'm thinkin' ?
18:31mrnuke: then you've got a dirty mind, because that's the onle thing I'm not thinking of
18:32mrnuke: [ 305.107996] nouveau 0000:01:00.0: Xorg: nv50cal_space: -16
18:32mrnuke: full of those
18:33imirkin: yeah, that's just "your gpu locked up but you're still sending it commands"
18:33mrnuke: Here you go master: https://paste.fedoraproject.org/274509/14439223/
18:34mrnuke: The Source
18:35imirkin: mrnuke: btw, are you using the very latest mesa? (git head)
18:35mrnuke: umh, not git head, no
18:35imirkin: mrnuke: i made some fixes to resource tracking which haven't made it to a point release yet
18:36mrnuke: alright. Seems like I have homework
18:36imirkin: my hope is that they fix random "this is weird" type issues
18:36imirkin: but they were definitely not carefully debugged, just visual inspection of the code
18:37mrnuke: ooh, and messages stopped : https://paste.fedoraproject.org/274510/43922636/
18:38mrnuke: and the whole machine locked up
18:38mrnuke: (AKA serial console is dead)
18:40imirkin: didn't i tell you to get a kepler? :p
18:41mrnuke: but they didn't make one with enough DP outputs in my price range
18:46mrnuke: from what I could tell, this sexy beast is Kepler : http://www.bhphotovideo.com/bnh/controller/home?O=&sku=1180241&gclid=CKrkzvDYp8gCFQZafgodYbEJ3w&is=REG&m=Y&A=details&Q=
18:46mrnuke: but the price... a little above my paygrade
18:47mrnuke: believe me, I would have loved the full size DP outputs as opposed to those tiny mini-DP crap
18:49imirkin: how much was the one you got?
18:50imirkin: still pretty pricey
18:50mrnuke: price is not an issue (if I can afford it)
18:51imirkin: it's not an issue until it is ;)
18:51mrnuke: you don't get that many display port outputs on gamer-class cards
18:51mrnuke: I know I could have gotten a beast gaming card for that price, but I really needed the 3 DP outs
18:52imirkin: that's 4+... if you want 3, there are a ton more
18:52mrnuke: have you seen their kernel driver? It's terrible
18:52mrnuke: I wanted to avoid radeon
18:52imirkin: have you seen the nouveau one?
18:53mrnuke: you said it's not that bad
18:53mrnuke: on the radeon case, I'm talking about code copypasted from AMD
18:53mrnuke: and AMD writes the worst code ever
18:53mrnuke: pointer punning with undefined behavior everywhere
18:53mrnuke: no range checking
18:54mrnuke: their atombios interpreter is copypaste from fglrx
18:54imirkin: odd, i don't see any keplers with more than 2 DP outs
18:55imirkin: plenty of maxwell's though, esp GM206's for way less
18:55imirkin: e.g. http://www.newegg.com/Product/Product.aspx?Item=N82E16814127905
18:55imirkin: but that wouldn't work with nouveau at all
18:55imirkin: (at least not beyond modesetting)
18:56imirkin: btw you could disable accel and your problems would go away
18:57mrnuke: imirkin: do you want that card?
19:00imirkin: that card won't work at all with nouveau
19:01imirkin: and i'm not the one to resolve that
19:09mrnuke: oh noooes, mesa git uses autohell
19:11mrnuke: you know. autotools is the only reason I'm patient and disciplined
19:11mrnuke: I would have killed myself otherwise
19:12imirkin: i hate it when projects use anything other than autotools
19:15mrnuke: let's agree to disagree, and go grab beer
19:16mrnuke: so, who's supposed to provide glproto ?
19:17imirkin: glproto is supposed to provide glproto
19:18mrnuke: ok, that's wierd, because I'm not seeing a glproto/glproto-devel package
19:19imirkin: stop using developer-hostile distros
19:19mrnuke: fedora ain't developer hostile
19:19mrnuke: I use fedora at work and I kick ass
19:25mrnuke: yeah, that's definitely fedora's fault
19:25imirkin: if pkg-config doesn't know how to find it, might as well not be there
19:26imirkin: tbh i'm not a big fan of the whole pkg-config thing
19:26mrnuke: I blame it on autotools
19:26imirkin: i very much prefer the old way, just do --with-foo-dir and move on
19:26mrnuke: and I'm usually right
19:26imirkin: but... now it's all about autodetection and that bs
19:26imirkin: which never works and causes lots of hair pulling
19:27imirkin: has nothing to do with autotools vs other-thing
19:27imirkin: it's a question of using pkg-config to find things
19:27mrnuke: and that's on top of the hair-pulling caused by autohell
19:27imirkin: which... i hate too
19:28mrnuke: there's no winning, is there?
19:29mrnuke: funny story
19:29mrnuke: compiling gcc and its deps on a 4-core 2008 machine takes about 20 minutes
19:29mrnuke: compiling gcc and its deps on a 24-core 2015 machine takes 20 minutes
19:31mrnuke: compiling linux kernel on same 24-core machine takes about 10 seconds :)
19:44airlied: mrnuke: the atom interpreter isn't from fglrx
19:46airlied: imirkin: by developer hostile you seem to mean, a distro where I don't know the tools
19:46airlied: dnf repoquery --whatprovides 'pkgconfig(glproto)'
19:47airlied: you can actually do dnf install 'pkgconfig(glproto)'
19:47mrnuke: airlied: I was reading somewhere that it was source code released from AMD
19:47airlied: mrnuke: it was code written by AMD, but not for fglrx
19:47mrnuke: heeeeey, nice trick. Thanks airlied!
19:48mrnuke: airlied: anything written by AMD is horrifying
19:48airlied: the atom interpeter in the kernel was a lot nicer than the atom code in fglrx
19:49airlied:isn't sure I've ever seen any nice code released by a company
19:49airlied: that wasn't written in the open
19:49mrnuke: #ifdef BIG_ENDIAN some_bitfield #else same_bitfield_slightly_modified #endif
19:49airlied: mrnuke: guess what, the only wait to use bitfields on endian is that
19:49imirkin: mrnuke: on the bright side, nouveau barely works on be :)
19:50imirkin: but hey, at least the code is clean!
19:50airlied: the answer is generally don't use bitfields, but most people don't decide to deal with endianess until after they've done something
19:50airlied: so they have to retrofiyt
19:50mrnuke: airlied: guess what, don't use bitfields to map to hardware registers
19:50mrnuke: or data in a bytestream for that matter
19:50mrnuke: the C standard doesn't guarantee the ordering
19:50airlied: yes, and until the first time you hit endianness it never matters
19:50airlied: and if you come from Windows where there is no endianness you never notice
19:51airlied: so all the tools internally geneate stuff from databases, and nobody notices until too late
19:51mrnuke: I've done plenty of portable host-endianess independent code
19:51mrnuke: it is possible
19:51airlied: not with bitfields
19:51mrnuke: of course not with bitfields
19:52airlied: yes so if you write the code then later have to makeit endian independent
19:52airlied: you generally can't remove the bitfields
19:52airlied: because nobody will sign off on it
19:52mrnuke: i only use bitfields when I write to those bitfields. never when the data comes in externally (via stream, network or hardware register, etc.)
19:53airlied: hey I can either add these ifdefs which won't break the current codepaths, or I can rewrite it all
19:53airlied: managers usually go with technical debt addition over cleanliness :-P
19:53airlied: it's why open source is much better :)
19:53airlied: because reviewers say you need to rewrite this, and managers get not buy in!
19:53mrnuke: hey, I'm rewriting a lot of code at work
19:54mrnuke: and everyone's fine because I'm the only guy on the entire campus with rights to merge code to coreboot.org
19:54mrnuke: so when I say "I don't think that's upstreamable", they just leave me alone :p
19:55airlied: yes so now go work somewhere where you don't have that power :)
19:55airlied: and then get someone else to open the code a year later :-P
19:55airlied: and we can say "insert comapny name here" makes hit code
19:55airlied: shit code
19:56mrnuke: does redhat make shit code?
19:56imirkin: companies don't make code
19:56imirkin: people do
19:56airlied: we've certainly open sourced a lot of shit code
19:56airlied: but mostly from other places
19:56airlied: and people don't always have the freedom to make code better
19:57airlied: esp in proprietary development scenarios
19:57airlied: so they deserve pity rather than scorn :-P
19:57mrnuke: you just need to have the balls to say "That's not gonna fly upstream"
19:58mrnuke: sure, it can get one fired
19:58airlied: no you have to have an upstream first
19:58mrnuke: I see your point
20:00mrnuke: but that's not to say that having an upstream will make things better
20:00mrnuke: just look at the disaster GNU as is
20:00mrnuke: especially on x86
20:00mrnuke: or autotools
20:01mrnuke: add GNU coding style to the list (probably to blame for most headaches, but that's besides the point)
20:02mrnuke: of course EFI style (read: windows) is just as messed up
20:02airlied: well hungarian notation and CamelCase just make me feel ill
20:03mrnuke: you know, hungarian notation, the Simony way actually makes sense
20:03airlied: you know what works better, reading the definition
20:03airlied: instead of trying to encode things in the variable names
20:04mrnuke: but the difference is, the prefix is the sort of thing the variable xolds (xc for x coordinate, yc for y coordinate)
20:04airlied: and splitting up functions so the definitions are in a reasonable distance from the code
20:04airlied: and using smart things to find defintiions like tags etc
20:05mrnuke: wel, Simony hungarion notation actually uses tags as prefix, not thype of variable
20:05mrnuke: but it's still hungarian
20:05mrnuke: I'm transylvanian, so I hate everything hungarian anyway
20:06airlied: but I think we off topic now by a long way :-P
20:06mrnuke: unless you want a maxwell card to hack on, being off-topic is fine with me
20:09imirkin: i'm sure airlied can just reach over across the office to steal one of ben's in an emergency
20:12mrnuke: imirkin: yeah, but he'd probably get in trouble with HR