IRC log for #htc-linux on 20130131

00:43.00*** join/#htc-linux Rajko (rajkosto@cable-94-189-224-176.dynamic.sbb.rs)
02:21.39*** join/#htc-linux surge (surge@pool-98-118-154-23.bflony.fios.verizon.net)
02:35.23*** part/#htc-linux Cotulla (~myfakemai@109.205.253.11)
03:06.55*** join/#htc-linux rajkosto (~rajkosto@wan.rajkonet.info)
03:17.49*** join/#htc-linux d3tul3 (~detule@unaffiliated/d3tul3)
05:35.58*** join/#htc-linux ccxCZ (~ccxCZ@156.200.broadband11.iol.cz)
06:41.24*** join/#htc-linux Ondalf (~ondalf@cable-roi-50ddf8-39.dhcp.inet.fi)
06:51.44*** join/#htc-linux eR^zeRa` (~zzeratul@ip-84-42-202-42.net.upcbroadband.cz)
07:06.42*** join/#htc-linux kiozen (~kiozen@p578a42db.dip0.t-ipconnect.de)
07:40.58*** join/#htc-linux stroughtonsmith (~steven@86-42-135-220-dynamic.b-ras1.bbh.dublin.eircom.net)
08:15.24*** join/#htc-linux DuperMan (Duper@46-116-177-82.bb.netvision.net.il)
08:31.26*** join/#htc-linux arif-ali (~arif-ali@81.144.163.60)
08:49.01*** join/#htc-linux noobhands (d03032a2@gateway/web/freenode/ip.208.48.50.162)
08:49.14noobhandshttps://i.chzbgr.com/maxW500/6769628928/hFB022C10/
09:10.11*** join/#htc-linux nrirclog (~nrirclog@jongkorendijk.nl)
10:24.15*** join/#htc-linux arif-ali (~arif-ali@81.144.163.60)
11:16.13*** join/#htc-linux helicopter88 (~helicopte@host66-118-dynamic.55-79-r.retail.telecomitalia.it)
11:25.49*** join/#htc-linux stroughtonsmith (~steven@86-42-153-83-dynamic.b-ras1.bbh.dublin.eircom.net)
13:14.31*** join/#htc-linux paulk-desktop (~paulk@lib33-1-82-233-88-171.fbx.proxad.net)
13:20.09*** join/#htc-linux stroughtonsmith (~steven@ip182.67-202-78.static.steadfastdns.net)
13:26.21*** join/#htc-linux stroughtonsmith_ (~steven@86-42-153-83-dynamic.b-ras1.bbh.dublin.eircom.net)
13:56.31*** join/#htc-linux Cotulla (~myfakemai@109.205.253.11)
13:57.47*** join/#htc-linux DuperMan (Duper@46-116-177-82.bb.netvision.net.il)
14:23.16detuledoes anyone know how gemini and mercury function on msm
14:24.45detuleare they just exposed devices that are ioctl-ed with buffers when jpeg encoding/decoding is needed
14:25.29detuleor do they do some magic also with the VFE without necessarily being called by userland directly
14:25.46arrrghhh<PROTECTED>
14:26.29detuleneed to find me some docs
14:27.42Cotullawhich exactly MSM?
14:29.01detule8960
14:31.54Cotullathere is also some video processor
14:31.57Cotullaafaik
14:33.53detulefrom what i can tell there's a front end (vfe) there's a pre-processor (vpe) and perhaps a jpeg engine (gemini/mercury) on top of that
14:34.18detuletrying to figure out if that jpeg engine is part of whatever the hell the other two three-letter abbreviations are
14:34.26detuleor something separate
14:51.48*** join/#htc-linux bartman (~bart@2607:f2c0:f00e:700::dd)
14:53.20Cotullalooks like separate
14:54.05Cotullawhat kind of purpose u are looking?
15:00.16detuletrying to get the camera working ....
15:01.10detuleit's powering up the sensor -> starts queuing/dequeuing buffers from userland....preview works for about one second and then i start getting error interrupts from VFE and everything locks up
15:02.04detuleduring that one (fraction of a second) if I quickly press the shutter button it even snaps/saves a photo properly
15:03.03Cotullawhich error?
15:03.06detuletrying to figure out which components are being used during which operation (preview/snapshot/video record)
15:03.13CotullaI think JPEG module is not problem here
15:03.22Cotullait's not used during preview I think
15:03.29Cotullait should be raw YUV stream
15:03.46Cotullawhich error do u get?
15:03.56Cotullamaybe it's kinda overflow or wrong timings
15:03.58detulevfe32_irq: axi error
15:04.41detulefrom media/video/vfe32
15:04.54*** join/#htc-linux ElFinLazz (~elfinlazz@182.215.84.22)
15:06.37detuleyeah the overflow/timing could very well be the case
15:09.00Cotullahm
15:09.09Cotullais this error come from kernel mode driver?
15:10.56detulesorry don't understand....it's in the media layer.....when camera starts up, vfe is enabled and there's an interrupt listener that waits for signals "done processing frame" from VFE....it works fine for a few frames and then VFE starts sending errors
15:12.14CotullaI mean "vfe32_irq: axi error" is it kernel mode error?
15:14.28detulehttp://pastebin.com/8hLvapn2 <--- it has all sorts of debugging enabled a bit hard to read
15:17.08Cotullavb2: Incorrect planes array length, expected 2, got 0
15:17.11Cotullais it important?
15:17.18detuleno, it happens on stock as well
15:20.40noobhandswednesday is band practice
15:21.32detulehttps://github.com/detule/linux-msm-d2/blob/jb_2.5-camera-wip/drivers/media/video/msm_zsl/msm_vfe32.c#L3548 <- the interrupt listener
15:21.37noobhandswhat day is it Cotulla
15:27.05Cotullabut I think
15:27.10Cotullaaxi error is memory access error
15:27.13Cotullau should check bufers
15:27.13*** join/#htc-linux bartman (~bart@2607:f2c0:f00e:700::dd)
15:36.47*** join/#htc-linux arif-ali (~arif-ali@94-192-24-56.zone6.bethere.co.uk)
15:43.38*** join/#htc-linux stroughtonsmith (~steven@86-42-129-30-dynamic.b-ras1.bbh.dublin.eircom.net)
16:05.45*** join/#htc-linux DuperMan (Duper@85-250-109-40.bb.netvision.net.il)
16:43.39jonprydetule, i ordered the nexus4
16:45.13detulejonpry, nice, can't find a better deal for an unlocked phone than that
16:46.27jonpryno sure can't
16:46.54jonpryand now it's a federal crime to unlock
16:50.03detuleso you get that, we rip out mach-msm from CAF, and get working on a 3.8 kernel for s3 and n4
16:51.09jonprysounds good to me :)
16:53.49jonpryyour 3.4 is all CAF or just mach-msm?
16:58.09detuleall caf
16:58.31detulethough at this point i have a pretty good idea of the caf additions outside of mach-msm
16:58.41jonprynot even mach-msm from stock?
16:59.06detulea few of my board files are from stock
16:59.13jonprythats bold
16:59.38jonpryqdsp?
16:59.53detuleall caf
17:03.02jonpryyou know about all those include related problems with camera?
17:03.43detulei know of some - that wip branch is a few commits behind my local branch
17:04.05detulein particular i stopped trying to be all surgical and shit, and now i am running with the camera headers from stock
17:04.13jonprylike the blobs are compiled using structs in the kernel source
17:04.28jonpryyeah like that
17:04.29detuleright so i have this logic in there that translates from old structs to new structs
17:04.51detulesome of the headers I couldn't change (the generic v4l2 structs that are not in msm headers)
17:07.21detulelike v4l2_event because the v4l layer references members from this new struct
17:08.25jonpryi don't think userland should be sensitive to v4l2 changes
17:08.49jonpryseems like that would be breaking the ABI
17:08.56jonpryand linus would blow off the top
17:10.06detulethe ioctl numbers are sensative to v4l2 changes (sizeof v4l2_event is part of the ioc_nr)
17:11.05jonprythis is msm ioctl?
17:14.04detulehttps://github.com/detule/linux-msm-d2/blob/msm-jb_2.5/drivers/media/video/v4l2-ioctl.c#L2206
17:15.08detuleand others
17:18.53jonprybrb
17:48.48jonpryand sizeof v4l2_event actually changes?
17:50.48jonpryi'm looking at like 3.0 vs 3.7
17:51.01jonpryand they are the same size
17:51.12jonprybig difference is that reserved[0] became id
17:52.56detulethe fact that the union is different doesn't matter?
17:53.18jonpryit's doesn't change the size
17:53.30jonpryand like they only added stuff to the union
17:54.06jonprypresumably the blob won't be queuing up union types it doesn't know about
17:54.24detuleho-hum....i thought the fact that the union is larger would change the size
17:54.45jonpryno that is the thing with union
17:55.00jonpryit's like, this data region of the struct is your choice of:
17:55.45detulecool, that should make my life easier, i can get rid of all this translations between events and new events, i still need to init the id for each event passed from userspace to 0 but that's easy
17:58.07detuleno the blob only cares about the data field in the union from what I can tell
17:58.50CotullaI like how they did that again and again
17:59.01Cotullachaning structures without backward compatiblle
17:59.56jonpryi think v4l2_event is backward compatible if it was memset(0)
18:01.06Cotullaso where is problem in that case?
18:01.25Cotullareserved[0] -> id should be good idea
18:01.27jonprysomewhere else
18:01.53Cotullalinux way :)
18:02.07detulein 3.4 they've added an id field to both the event and the subscription and they are matching each event->id against subscription->id
18:02.39jonpryis the blob making garbage in reserved[0] ?
18:03.05detulei don't actually know, but it wasn't matching the events and subscriptions properly before i manually set the id's to 0 for both
18:03.15jonprysounds like garbage
18:03.20*** join/#htc-linux bartman (~bart@2607:f2c0:f00e:700::dd)
18:06.42detuleso jonpry when the blob gets the event back
18:06.56detuleand tries to access ev.u.data it won't have a problem?
18:07.05detulei don't get this size of union doesn't matter
18:07.21jonprythe size of the union is 64 bytes
18:07.34jonpryit's like the size of the largest member
18:08.03jonpryunion is like messed up way of casting
18:08.16detuleoh "In a union, at most one of the data members can be active at any time, that is, the value of at most one of the data members can be stored in a union at any time. "
18:08.35detulethat IS messed up
18:08.48jonprytells the compiler to automatically cast that data member or whatever to *(type*)union
18:08.53Cotullayea
18:09.03Cotullafunny thing in C++
18:09.07Cotulla*C/C++
18:09.34Cotullawindows way - u specify API version and it just ignores additional fields :)
18:09.53MarcCotulla: stop talking about crappy C++ and fix Leo's NAND in 3.0.16 :P
18:10.00*** join/#htc-linux kiozen (~kiozen@ppp-93-104-87-192.dynamic.mnet-online.de)
18:10.11MarcI'm busy with yet another stupid test ...
18:11.29Cotullawhere u stopped?
18:12.08Marcdmov returning an error code
18:12.44MarcI looked at it a little bit yesterday but I can't figure out what's wrong O.o
18:16.24Cotullaheh
18:16.27Cotullashould be again
18:16.33Cotullacrazy linux developers
18:25.16jonprydetule, it's possible that v4l creates some events and sends them to the blob which it doesn't understand
18:27.43detulefrom what I can see events are created by the msm part within the  media layer so we should be ok with that....buffers are transferred via the general v4l layer and those structs haven't changed at all
18:29.10jonpryhow long does it work exactly?
18:29.38detulefor a fraction of asecond, you can see how many buffers get exchanged in that log maybe a dozen
18:30.09jonprymaybe it can't free them
18:30.14jonprydequeue or whatever
18:30.44Cotullais it using v4l nowdays?
18:30.47detule[  126.051396] msm_ioctl_server: trouble recognizing ioctl, break
18:30.47detule[  126.051426] msm_ioctl_server: cmd 89
18:30.47detule[  126.051426] msm_ioctl_server: trouble recognizing ioctl, break
18:30.47detule[  126.051457] msm_ioctl_server: cmd 89
18:30.47detule[  126.051457] msm_ioctl_server: trouble recognizing ioctl, break
18:30.48detule[  126.051487] msm_ioctl_server: cmd 89
18:30.50detule[  126.051487] msm_ioctl_server: trouble recognizing ioctl, break
18:30.57detule<--- after i change back to v4l2_event
18:31.02detuleit definitely can't recognize the size
18:31.22jonpryrun sizeof
18:32.51detuleCotulla, this msm media layer is a complete bastardization of v4l....
18:34.29detulejonpry, sizeof what v4l2_event? here's the ioctl that fails btw https://github.com/detule/linux-msm-d2/blob/msm-jb_2.5/drivers/media/video/msm_zsl/msm.c#L1785
18:34.47detule89 is dqevent
18:36.05Cotullabut why they started to use v4l? before it was totally different
18:36.37jonprysome code like void *foo = sizeof(v4l2_eventold) - sizeof(v4l2-eventnew)
18:36.47jonpryshould refuse to compile if they are different
18:37.07detulelooks like they tried to upstream it http://www.mail-archive.com/linux-media@vger.kernel.org/msg26091.html <---and got completely shut down
18:38.08jonpryapq8060 had both v4l and msm_cam
18:38.46Cotullawhat is used?
18:39.05jonprywebos used v4l
18:39.20jonpryi sort of got it to work with msm_cam on android but it was buggy
18:39.23Cotullaoh
18:39.33jonpryso i used v4l
18:39.38detulethey have a v4l device /dev/videox but that's just for queuing and dequeuing buffers...all the business is in /dev/msm_camera/* which also uses SOME of v4l APIs
18:40.07detulethe business = configuring the vfe, vpe, postprocessing etc
18:40.11Cotullabut is it mantadory to support all apis?
18:41.35detulejonpry, that void *foo = sizeof(v4l2_event) - sizeof(msm_v4l2_event) only gave me a warning: initialization makes pointer from integer without cast
18:42.09Cotullalol
18:42.11Cotullado it as
18:42.21jonprywell thats not good
18:42.29jonpryif it were 0 there would be no warning
18:42.30Cotullaprintk("size 1 %d 2 %d\n", sizeof(v4l2_event), sizeof(msm_v4l2_event));
18:42.38jonprybut then you have to run it :p
18:42.45detuleyeah trying to avoid that :)
18:43.06jonpryisn't there some gcc macro for printing constants to the log?
18:45.11Cotullaso just compile
18:45.11ali1234#pragma warning <whatever>
18:45.15Cotullaand disassemble
18:45.28Cotullaand see numbers near with prink
18:45.30Cotullaprintk
18:45.48jonpryobjdump foo.o ?
18:46.01detulescrew it compile and kexec
18:46.20jonpryin that case
18:46.26jonpryi think there is more info required
18:46.46jonpryimho the trouble has to be that one of the structs in the union is larger than 64 bytes
18:49.57jonpryso maybe sizeof v42l2_event.u as well
18:50.35*** join/#htc-linux arif-ali (~arif-ali@94-192-24-56.zone6.bethere.co.uk)
18:50.57Cotullayeah funny story in maillist
18:52.04detulejonpry, so on the touchpad you only used /dev/videoX?
18:52.10detulewhich userland HAL did you use for that
18:52.43detulei have a generic v4l2 driver for my camera sensor from elsewhere that i've been thinking about trying to use, but not sure which HAL I would use for that.....it would all be raw jpeg but i guess better than nothing
18:54.03detule08-12 21:19:14.456 INFO : STUPIDITY: sizeof(v4l2_event)=80, sizeof(msm_v4l2_event)=78
18:54.04detule08-12 21:19:14.457 INFO : STUPIDITY: sizeof(v4l2_event.u)=40, sizeof(msm_v4l2_event.u)=40
18:54.13detulethat's %x
18:55.05jonprymaybe i need to see your msm_v4l2_event
18:55.37detulehttps://github.com/detule/linux-msm-d2/blob/jb_2.5-camera-wip/include/linux/videodev2.h#L2401
18:56.21Cotullalol STUPIDITY
18:56.27Cotulladebug comment of the week
18:56.27Cotulla:D
18:56.37detuleneeded something easy to grep :)
18:58.46detulebtw now that I am looking at the structs that printout makes no sense
18:59.42jonpryyeah for real
19:00.18jonpryit must be a packing problem
19:00.25jonprylike timespec is all 64bit
19:01.09detuleas is this vsync
19:01.22detulei mean __attribute(packed)
19:01.47detuleoh but that's in both nvm
19:02.20Cotullause offsetof() to check
19:03.05jonpryi count 0x80 for both
19:03.16jonpryso how can the one be 0x78?
19:03.54jonpry4+64+4+4+16+9*4
19:04.19jonpryer
19:04.29jonprylong is 32bit?
19:06.39jonpryin which case it is 0x78
19:08.20detuleso wtf, try a different toolchain?
19:09.02jonpryi think cotulla was right with offsetof
19:09.06jonpryto see what it has done
19:09.20jonprythere might be like a #pragma pack going on
19:09.42jonpryor maybe one of the new unions starts with a 64bit member
19:10.31jonpry<PROTECTED>
19:13.07Cotullaanother way
19:13.12Cotullagenerate DWARF information
19:13.15Cotullaand dump it to look offsets
19:13.42jonprywell check this out
19:13.45jonprystruct v4l2_event_ctrl
19:13.53jonpryis one of the unions
19:14.22jonprybleh never mind 36 bytes
19:23.38Cotullawhy not just use offsetoff() to check critical offsets?
19:23.46Cotullaas well good way to play "gold rule" game
19:23.49Cotulla:D
19:27.32detule[oliver@localhost linux-msm]$ adb shell dmesg | grep STUPID
19:27.32detule08-12 21:52:55.423 INFO : STUPIDITY: sizeof(v4l2_event)=80, sizeof(msm_v4l2_event)=78
19:27.32detule08-12 21:52:55.430 INFO : STUPIDITY: sizeof(v4l2_event.u)=40, sizeof(msm_v4l2_event.u)=40
19:27.32detule08-12 21:52:55.437 INFO : STUPIDITY: sizeof(v4l2_event.type)=4, sizeof(msm_v4l2_event.type)=4
19:27.32detule08-12 21:52:55.444 INFO : STUPIDITY: sizeof(v4l2_event.timespec)=8, sizeof(msm_v4l2_event.timespec)=8
19:27.33detule08-12 21:52:55.452 INFO : STUPIDITY: sizeof(v4l2_event.sequence)=4, sizeof(msm_v4l2_event.sequence)=4
19:27.34detule08-12 21:52:55.460 INFO : STUPIDITY: sizeof(v4l2_event.pending)=4, sizeof(msm_v4l2_event.pending)=4
19:27.36detule08-12 21:52:55.468 INFO : STUPIDITY: sizeof(v4l2_event.reserved)=20, sizeof(msm_v4l2_event.reserved)=24
19:27.38detule08-12 21:52:55.476 INFO : STUPIDITY: msm: offsets: type=0; u=4; pending=44; sequence=48; timestamp=4c; reserved=54
19:27.41detule08-12 21:52:55.485 INFO : STUPIDITY: non-msm: offsets: type=0; u=8; pending=48; sequence=4c; timestamp=50; id=58; reserved=5c
19:29.43jonpryyeah it's like aligning the union on 8 bytes
19:34.28jonprydetule, your always breaking the compiler
19:35.03detuleerr this is with the one that we always used in xdandroid 2010.09
19:35.22jonprymaybe need something older
19:35.40detulecan i force that alignment on 4 bytes somehow
19:35.54jonpryyou can try __attribute__ ((packed))
19:37.51jonpryhmm
19:37.58jonpryi think i understand why it is doing this
19:38.33jonpryit's v4l2_ctrl.value64
19:38.58jonprythats awesome this is like a real kernel bug :p
19:39.19jonpryand a one liner at that
19:41.35detulepacking v4l2_event did the trick
19:42.52jonprygonna submit a patch?
19:43.17detulei am not even sure this is in korg kernels
19:43.24detulebut no, you got this
19:43.50jonpryit totally is
19:43.54jonpryit's in 3.7
19:43.59detulegreat now i am back to square one - camera still fails after a fraction of a second
20:00.14detulei know you are syncing linux stable right now
20:02.46*** join/#htc-linux arif-ali (~arif-ali@94-192-24-56.zone6.bethere.co.uk)
20:03.46jonpryi wish
20:03.55jonprynobody is going to like this patch
20:04.28jonpryi found it http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=commit;h=6e239399e5807132f86f64af6c659411c6a3d1a5
20:04.45*** join/#htc-linux Ondalf (~ondalf@cable-roi-50ddf8-39.dhcp.inet.fi)
20:05.13jonpryso old that restoring the ABI is going to sound a lot like breaking it again
20:05.38detulehow did that now break a lot of blobs when it was introduced
20:05.56jonprywho uses v4l?
20:06.42jonpryand even if they could be convinced to restore the ABI
20:06.57jonprythis attribute pack thing causes unaligned load/store on 64bit
20:12.56jonpryiirc there was some build option in cyanogenmod that turned on v4l
20:13.06jonpryomap used it or something
20:16.14jonpryi don't even know what a HAL is
20:16.38fakkeri do
20:16.38fakker:O
20:17.06detulei mean which libcamera on the android side
20:17.37fakkerdolan duck says hi
20:17.41fakkerhgh guyz
20:48.20*** join/#htc-linux jonpry (~jon@2602:306:c417:8aa0:15e5:46e7:9465:ac40)
21:03.48*** join/#htc-linux arif-ali (~arif-ali@94-192-24-56.zone6.bethere.co.uk)
21:33.36jonprydetule, so i have been told that the new ABI is the ABI
21:36.11*** join/#htc-linux Cotulla (~myfakemai@109.205.253.11)
22:04.03*** join/#htc-linux BabelO (~fcr@unaffiliated/babelo)
22:09.02*** join/#htc-linux Echo31 (~olivier@lan31-9-88-177-158-48.fbx.proxad.net)
22:55.53*** join/#htc-linux bartman (~bart@2607:f2c0:f00e:700::dd)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.