IRC log of #maemo-ssu for Monday, 2013-09-23

*** NIN101 has quit IRC00:00
*** Martix has joined #maemo-ssu00:06
*** Martix_ has joined #maemo-ssu00:08
*** Martix has quit IRC00:08
*** Vlad_on_the_road has quit IRC00:15
*** jonwil has quit IRC00:21
DocScrutinizer05freemangordon: there's a clear threshold of ALS above which indLED is dimmed down (by either current_led or brightnes [=PWM]) to near invisible brightness00:30
DocScrutinizer05doesn't exactly look like "calculated" to me - rather I think some fool decided to dim *all* LED when actually only kbd LEDs were meant to get shut down completely00:31
DocScrutinizer05but street gossip has it that some product manager chairfart gashead specified dimming of indLED above a certain brightness as a product requirement, and so devels implemented it in the least-effort way they could think of00:33
*** dafox has quit IRC00:33
DocScrutinizer05btw NB that led_current is NOT in units of mA00:34
DocScrutinizer05*sigh*, again looking up my own statements in wiki00:35
DocScrutinizer05http://wiki.maemo.org/N900_Hardware_LED00:36
DocScrutinizer05>>00:37
DocScrutinizer05Despite the line00:37
DocScrutinizer05#define LP5523_DEFAULT_CURRENT          50 /* microAmps */00:37
DocScrutinizer05suggesting different, the units in there are 0.1 mA (100 µA per step is correct). So the driver init default "50" for all LEDs is 5 mA, and mce seems to set current to 0.2 mA (value 2 in the led_current sysnode) for B and G, and either to 0.2 mA or 0.8 mA for R.00:37
DocScrutinizer05<<00:37
DocScrutinizer05the comment in ( ) is by Nokia_Employee responsible for LP552300:38
DocScrutinizer05>>Probably settings as high as 100 for 10 mA are safe for the RGB LED, higher values might destroy the LED. (yes, correct, the RGB could be damaged from heat if set to more than 10 mA on all 3 LEDs)00:39
DocScrutinizer05quite funny that by guesswork been correct to the mA even for the max current allowed :-)00:40
DocScrutinizer05s/ by/ my/00:40
infobotDocScrutinizer05 meant: quite funny that my guesswork been correct to the mA even for the max current allowed :-)00:40
*** Martix_ has quit IRC00:41
*** Martix_ has joined #maemo-ssu00:41
DocScrutinizer05freemangordon: actually mce is insane to mess with led_current at all00:42
DocScrutinizer05led_current should get (probably hard-)set to the max allowavle current for the LED, and all the rest be done by brightness sysnode00:43
DocScrutinizer05messing with led_current is strongly deprecated and not really justified by any eationale I'd know of, but meh, that's what we got, obviously00:43
*** int_ua has joined #maemo-ssu00:44
*** Martix_ has quit IRC00:45
*** Martix_ has joined #maemo-ssu00:45
DocScrutinizer05actually you should set led_current of all 3 LEDs of the 3color indLED so that a) each single LED doesn't see overcurrent  b) all three LEDs together shouldn't see exceeding the max continuous *power* consumption allowed for the thermal design, and c) in a ratio to each other so that the indLED shines white on brightness[r,g,b]==25500:46
DocScrutinizer05otherwise the lp5523 logarithmic mode for brightness will cause hue deviations for "white" < 25500:48
*** Martix_ has quit IRC00:48
*** Martix_ has joined #maemo-ssu00:49
*** Martix_ has quit IRC00:52
*** _nicolai_ has quit IRC01:52
*** BCMM has quit IRC02:37
*** nox- has quit IRC02:47
*** amizraa has joined #maemo-ssu03:13
*** drathir_ has joined #maemo-ssu03:19
*** sixwheeledbeast has quit IRC03:23
*** jon_y has quit IRC03:23
*** nedko has quit IRC03:23
*** raccoon_ has quit IRC03:23
*** merlin1991 has quit IRC03:23
*** drathir has quit IRC03:23
*** dos1 has quit IRC03:50
*** LauRoman has quit IRC04:20
*** M4rtinK has quit IRC04:40
*** sixwheeledbeast has joined #maemo-ssu05:17
*** jon_y has joined #maemo-ssu05:17
*** nedko has joined #maemo-ssu05:17
*** raccoon_ has joined #maemo-ssu05:17
*** merlin1991 has joined #maemo-ssu05:17
*** nedko has left #maemo-ssu05:23
*** amiconn has quit IRC05:51
*** amiconn_ has joined #maemo-ssu05:51
*** amiconn_ is now known as amiconn05:52
*** jonwil has joined #maemo-ssu07:25
*** DrCode has joined #maemo-ssu07:26
*** luf has joined #maemo-ssu07:30
*** dafox has joined #maemo-ssu07:35
*** dafox has quit IRC08:07
*** Vlad_on_the_road has joined #maemo-ssu08:30
*** Vlad_on_the_road has quit IRC09:21
*** LauRoman has joined #maemo-ssu09:31
*** int_ua has quit IRC09:31
*** LaoLang_cool has joined #maemo-ssu10:04
*** LaoLang_cool has quit IRC10:11
*** Martix_ has joined #maemo-ssu10:12
*** Pali has joined #maemo-ssu10:13
*** sunny_s has joined #maemo-ssu10:31
*** arcean has joined #maemo-ssu10:32
*** BCMM has joined #maemo-ssu11:01
*** BCMM has quit IRC11:01
freemangordonPali: http://www.mail-archive.com/linux-omap@vger.kernel.org/msg95403.html11:05
freemangordonI knew there is something wrong in the clock fw :)11:05
*** Martix_ has quit IRC11:13
*** arcean has quit IRC12:10
*** dos1 has joined #maemo-ssu13:48
DocScrutinizer05it's a terrible feeling to see what botch is done sometimes in kernel land14:01
*** M4rtinK has joined #maemo-ssu14:06
*** arcean has joined #maemo-ssu14:09
DocScrutinizer05anyway nice find, hope you get cam working now14:10
*** sailus_ has joined #maemo-ssu14:14
*** sailus_ has quit IRC14:16
*** sailus_ has joined #maemo-ssu14:18
*** DrCode has quit IRC14:29
*** M4rtinK has quit IRC14:33
*** DrCode has joined #maemo-ssu14:38
*** lizardo has joined #maemo-ssu14:51
DocScrutinizer05God gracious, I think I got an angie-hangover - and that might last for the next 4 years15:00
PaliDocScrutinizer05: what is max value for lp5523 "led_current" sysfs entries?15:07
DocScrutinizer05Pali: I honestly don't know, logically it's a u8 I guess15:12
DocScrutinizer05the chip supports something as high as maybe 50mA, and anyway the value range is deep into the red regarding what the LEDs on N900 can do15:13
DocScrutinizer05Pali: lp5523 datasheet: >> 9 programmable outputs with 25.5 mA full-scale current, <<15:15
DocScrutinizer05unit for led_current is 0.1mA15:16
DocScrutinizer05that's a max 255 for this sysnode15:16
DocScrutinizer05which conveniently will fry the indicator 3color LED anyway15:17
DocScrutinizer05according to Nokia guy who designed the LED stuff, the max is 3*10mA for the indLED, aka 3* 100 for sysnode15:18
DocScrutinizer05...or LED will literally fry15:18
DocScrutinizer05for the kbd LEDs I guess they can cope with 20mA each, but that's a guess of mine and nothing you should quote me on15:19
*** DrCode_ has joined #maemo-ssu15:20
*** DrCode has quit IRC15:20
*** DrCode_ is now known as DrCode15:20
DocScrutinizer05Pali: so, what exactly is your question?15:22
PaliDocScrutinizer05: in upstream kernel there is property max_current which needs to be initliazed from board data. and driver allow to change led_current only if new led_current < max_current15:24
Paliby default max_current is 0, so you can think what happen :-)15:24
DocScrutinizer05in original lp5523.ko of Nokia there are sane presets for the LED current iirc, and maybe or rather probably MCE also does some presets, but in the end nobody incl mce should mess with those values after initial setup15:24
Palimax_current current is only limit for led_current15:24
DocScrutinizer05Pali: LOL15:24
DocScrutinizer05well, sane concept15:25
PaliI set max_current to 255 (because led_current is uint8_t)15:25
Palibecause original maemo 2.6.28 kernel has u8 led_current and no upper limit15:25
DocScrutinizer05ok, I gonna takle responsibility for this and define: max_current for all 9 diodes on N900:: 100 aka 10mA15:25
DocScrutinizer05take even, as well as tackle :-D15:26
DocScrutinizer05when we already got sth as nice and useful as max_current, we shall use it to enforce sane maximum that keeps LEDs alive15:27
DocScrutinizer05so: 10mA, set max_current to 10015:27
DocScrutinizer05I gather that value comes from board data?15:27
DocScrutinizer05Pali: ^^^15:29
PaliDocScrutinizer05: yes max_current is set in rx51 board data15:30
Paliso change it to 100 (it is 10mA?)15:30
DocScrutinizer05yes15:30
DocScrutinizer05please15:31
PaliDocScrutinizer05: initial value for all (kb1..kb6,b,r,g) is 5015:32
DocScrutinizer05I know15:32
Palithis is OK?15:32
DocScrutinizer05yes15:32
Paliit is also in board data15:32
DocScrutinizer05http://wiki.maemo.org/N900_Hardware_LED15:34
*** luf has quit IRC15:37
*** drathir_ is now known as drathir15:39
DocScrutinizer05Pali: all the info in there is correct15:40
PaliDocScrutinizer05: I sent new version of patch and CCed you15:50
DocScrutinizer05thanks15:50
PaliDocScrutinizer05: maybe you can review patch too and sign it15:51
Palior comment other parts15:51
DocScrutinizer05not for fame but for later flames you might want to add in patch that the values been defined by me15:51
DocScrutinizer05sure15:51
*** DrCode has quit IRC15:51
DocScrutinizer05aah, you did15:53
DocScrutinizer05looks good, what shall I do?15:55
DocScrutinizer05consider the patch "signed by me"15:56
PaliDocScrutinizer05: if patch is ok, just write something that is correct and you can sign patch by keyword "Signed-off-by:"16:02
*** arcean has quit IRC16:03
DocScrutinizer05done16:07
*** DrCode has joined #maemo-ssu16:09
*** arcean has joined #maemo-ssu16:22
*** arcean has quit IRC16:57
*** robotanarchy has joined #maemo-ssu17:21
*** sailus_ has quit IRC17:22
*** sailus has quit IRC17:23
*** sailus has joined #maemo-ssu17:23
*** sailus_ has joined #maemo-ssu17:23
*** lrtz has quit IRC17:42
*** lrtz has joined #maemo-ssu17:48
freemangordonPali: found a bug in the led driver or it is just fix to the board data?17:57
Palifreemangordon: where?17:58
freemangordonPali: re your discussion with DocScrutinizer0517:59
freemangordon^^^17:59
freemangordonabout max current, etc17:59
Palifreemangordon: I did not pushed that new patch to gitorious yet17:59
freemangordonPali: ok, but is there a bug?17:59
DocScrutinizer05freemangordon: the latter17:59
Paliwhich changing 255 to 10017:59
freemangordonok17:59
freemangordonPali: did you see the link I posted ^^^18:00
DocScrutinizer05it could be considered "bug in board data"18:00
freemangordon:nod:18:00
freemangordoncan't we limit that to 50 instead of 100?18:00
freemangordonmce set it to 47 aiui18:00
DocScrutinizer05I gather max_current is write-once, just like FMTX max power18:01
DocScrutinizer05if it's n ot, then THAT would actually be a bug18:01
DocScrutinizer05in driver18:01
freemangordonwill check the permissions when I boot the kernel18:01
DocScrutinizer05freemangordon: nope, the limits are checked and correct18:02
PaliDocScrutinizer05: it is const compile time variable18:02
DocScrutinizer05ooh, even better18:02
freemangordonif it is anything but 0444 I guess we can fix it18:02
Palifor chaning it you need to recompile zImage18:02
freemangordonPali: what are the permissions of sysfs entry?18:02
DocScrutinizer05of which entry?18:04
DocScrutinizer05max_current? this shall be r/o18:04
freemangordonsure, buit what are the actual permissions :)18:04
Palifreemangordon: this is not about permission, but it is variable in board data file in some structure18:04
freemangordonPali: this is exposed in sysfs18:04
Palipermission is of course 044418:04
DocScrutinizer05:-)18:05
Palibut you should not change it18:05
Paliand you also cannot18:05
DocScrutinizer05444 correct18:05
freemangordonPali: it is fine then :)18:05
Paliok :-)18:05
Paligoing to push that patch into gitorious18:05
Palipushed18:06
freemangordonPali: see http://www.mail-archive.com/linux-omap@vger.kernel.org/msg95403.html18:06
Paliwhat is with that?18:07
freemangordonwrong dpll/frequency calculation18:07
freemangordonon 343018:07
freemangordonI'll try that patrch now18:07
DocScrutinizer05and try if it actually kicks in18:08
freemangordonbut it seems half of the clocks are wrong :)18:08
DocScrutinizer05I'm musing about all that insane clock generation auto-guess code18:08
freemangordonDocScrutinizer05: for sure it kicks in, remember my discussion with sailus about strange frequencies? the same strange frequency I have with ssi clocks18:09
DocScrutinizer05seems like an odd way to handle clocks18:09
freemangordonDocScrutinizer05: actually I like that "clock framework"18:09
*** arcean has joined #maemo-ssu18:09
freemangordonand maybe I will like this DT shit too, it seems after all those are not 3d objects :)18:09
DocScrutinizer05setting up clock dividers and muxes and whatnot is a *very* complex thing to do the right way, even for humans using their brain and all the datasheets. It sounds weird to try and write an algo that does all this in a generic way18:10
freemangordonDocScrutinizer05: no algo, stuff is hardcoded18:11
DocScrutinizer05mhm18:11
DocScrutinizer05ok then18:11
DocScrutinizer05that's actually what I'd do18:11
freemangordonthere is a clock tree18:11
*** NIN101 has joined #maemo-ssu18:11
DocScrutinizer05yep, it's a tree18:11
DocScrutinizer05the clock dependencies18:12
freemangordon:nod:18:12
freemangordonthe same goes for the power supplies iiuc18:12
DocScrutinizer05so when they use a static data structure to represent that tree with all the solutions for various tuples of clocks, that's OK I guess18:12
DocScrutinizer05rather a forest18:13
freemangordonso all that is up to you is to define which clocks and power supplies your device uses18:13
DocScrutinizer05:nod:18:13
freemangordonframework finds the dependencies and enables the appropriate plls/dividers, etc18:14
freemangordonand power supplies18:14
freemangordonso it looks fine18:14
DocScrutinizer05basically it's a sparse multidimensional array18:14
DocScrutinizer05ideally augmented by allowing wildcards18:14
freemangordonok, booting with ^^^ patch, lets see :)18:15
DocScrutinizer05:-)18:15
DocScrutinizer05good luck!18:15
freemangordonwell, at least it still boots :D18:16
freemangordonPali: btw I reverted your et8ek8 FW patch and the oops is gone18:16
Paliok, will look at it later18:17
Paliat least we know what caused it18:17
freemangordonPali: looking through the code, I wondered what "offset" is supposed to mean18:17
freemangordoncould it be an offset into the file? not a pointer18:17
freemangordonok18:17
Pali * The pointers in the list are actually offsets from the beginning of the blob.18:20
Palifreemangordon: so there is problem18:20
Paliyou are right18:20
freemangordon:)18:21
DocScrutinizer05hah18:23
DocScrutinizer05bbl18:23
Palithis is retarded nonsense usage of pointers18:24
Palispecifing relative offset of of current stucture to another...18:24
Palihow can I write this C code? struct A a = { .val = 1 }; struct B b = { .val = &a - &b; };18:27
DocScrutinizer05err, that's frequently used in ~80% of file formats18:27
PaliC does not allow to do (&a - &b) in initlializer18:27
Paliand structure B b needs value which will be offset between struct A a and struct B b18:28
freemangordonPali: hmm, those are different types I guess18:28
Paliit is even possible18:28
freemangordontry to cast to uintptr_t18:28
Palifreemangordon: casting to (uintptr_t) is possible18:28
Palibut problem is with operation minus18:28
PaliC does not allow that operation at compile time in initliaizer18:28
Palierror: initializer element is not constant18:29
Paligcc output ^^^^18:29
DocScrutinizer05meh18:29
freemangordonPali: declare structs as const18:29
freemangordonstatic const even18:29
Palistatic are already18:29
Paliwill try const18:29
Paliconst does not helped, same problem18:30
Palithis is first time I saw someting ugly as this18:31
freemangordonPali: try to cast the pointers to (const uintptr_t*)18:32
Palionly one solution I see to remove const, initliaze that values to 0L and then use init function for that18:32
Pali(const uintptr_t)18:32
Paliwithout *18:32
freemangordon:nod:18:32
Palistill not working18:32
freemangordonPali: the correct way to handle that is to not use offsets :)18:32
freemangordonbut to rewrite smiaregs to usee pointers18:33
Paliok, will try to change smia code18:33
Palifreemangordon: try this patch: http://pastebin.com/M6WdEcYJ18:45
FatPhilPali: you can't sensibly do "struct A a = { .val = 1 }; struct B b = { .val = &a - &b; };" - it's illegal C19:01
FatPhilYou cannot subtract pointers of things which don't point to (parts of) the same object.19:01
FatPhilso I agree with freemangordon - these aren't offsets to C, so don't try and pretend they are.19:03
PaliFatPhil: I already changed code, so that offset (-&b) is not needed and using directly pointer19:07
FatPhilpatch on pastebin looks like an improvement, certainly19:07
FatPhilThe question that it raises is why the earlier horrors existed - it just looks wrong!19:08
freemangordonPali: ok19:08
FatPhilAnything which removes casts is generally an improvement to code.19:09
PaliFatPhil: now i think why: that data structures comes from userspace via request_firmware and was created by gcc and objcopy19:09
Paliand in that userspace blob was every structure calucated against some "main"19:10
FatPhilI've not looked into the file as a whole, so take your word on that19:10
Paliand these hacks were needed for converting structures from that userspace blob which comes from request_firmware to native kernel structures19:11
Palivery ugly solution...19:11
FatPhilBut the addresses that the compiler gives you (unless you're using linker hacks) tell you nothing about the location of data in firmware.19:12
DocScrutinizer05yep19:12
FatPhilthe compiler's permitted to allocate those structures in alphabetical order, or in reverse19:12
FatPhilThe correct solution is to struct all of the structs together19:12
DocScrutinizer05unless it's one large structure19:12
Palido not look at that linker hacks...19:12
Paliit using lot of perl code19:12
FatPhilPerl to generate linker hacks?19:13
FatPhilNACK!19:13
DocScrutinizer05wtf, nmap the firmware file, set readpointer to offset of data structure and read it in from file to local variable struct19:14
FatPhilwell, request firmware is the standard way of getting the data in, there's no problem with that.19:16
FatPhilkernel shouldn't filp_open, for example19:17
FatPhilI can't really suggest anything - I don't have any et8ek8 here, I presume that's on my home machine.19:18
* FatPhil goes home19:18
FatPhil(after he's finished his pot of tea)19:19
*** arcean has quit IRC19:23
*** bsdmaniak has joined #maemo-ssu19:29
freemangordonPali: arch/arm/mach-omap2/board-rx51-peripherals.c:1272:34: warning: 'rx51_t2scripts_data' defined but not used [-Wunused-variable]19:31
freemangordonI guess this is a result from so-called "fix power off/restart problem" or whatever that patch was called19:31
Palifreemangordon: yes, ask more Skry19:32
Paliyou can ignore that warning19:32
*** dhbiker has joined #maemo-ssu20:10
freemangordonPali: hmm, but, but... this struct is the power management scripts, ain;t?20:12
*** LauRoman has quit IRC20:12
Palifreemangordon: yes, but it causing poweroff problems20:12
Palithis needs to be fixed20:13
freemangordonok20:13
DocScrutinizer05FatPhil: you had a chance to check the part number on N9 PoP?20:19
FatPhilDocScrutinizer05: didn't know I was going to do that!20:36
FatPhilIsn't that identified in the boot log (although perhaps somewhat cryptically)20:36
FatPhilCan't check - don't have n9 jig20:37
DocScrutinizer05don't worry, I'll disassemble my N9 then20:40
DocScrutinizer05thanks nevertheless20:40
DocScrutinizer05ooops, actually I mixed up things (rather persons), sorry20:44
DocScrutinizer05and actually not only persons but also channels20:46
*** Pali has quit IRC20:50
*** Vlad_on_the_road has joined #maemo-ssu20:57
*** arcean has joined #maemo-ssu21:08
*** Pali has joined #maemo-ssu21:12
*** arcean has quit IRC21:16
*** _nicolai_ has joined #maemo-ssu21:27
*** nox- has joined #maemo-ssu21:29
DocScrutinizer05I just noticed a bug in cameraui2: starting it via "Kamera" icon from applauncher opened the gui but didn't show the "Open Lens Door!" display. Opening lens door switched the display to something without any widgets, only viewfinder (and maybe one or two widgets remaining, like focus frame and close button).21:52
DocScrutinizer05can't reproduce that effect, possibly only "works" after reboot21:52
DocScrutinizer05comparing to a stock (non-CSSU) system didn't show same effect there21:53
*** M4rtinK has joined #maemo-ssu22:19
*** luf has joined #maemo-ssu22:30
*** bsdmaniak has quit IRC22:52
*** sailus_ has quit IRC23:01
*** sailus_ has joined #maemo-ssu23:03
*** NIN101 has quit IRC23:06
*** arcean has joined #maemo-ssu23:13
*** arcean has quit IRC23:20
*** sailus_ has quit IRC23:21
*** sailus has quit IRC23:22
*** sailus has joined #maemo-ssu23:22
*** sailus_ has joined #maemo-ssu23:22
*** Pali has quit IRC23:28
*** DrCode has quit IRC23:33
*** DrCode has joined #maemo-ssu23:33
*** xes has joined #maemo-ssu23:39
*** BCMM has joined #maemo-ssu23:50
*** Vlad_on_the_road has quit IRC23:50
*** lizardo has quit IRC23:51

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!