#qi-hardware IRC log for Sunday, 2012-05-27

wpwrakhehe, non sequitur is good today: http://www.gocomics.com/nonsequitur/05:56
qi-botThe build was successful: http://fidelio.qi-hardware.com/~xiangfu/build-nanonote/openwrt-xburst.full_system-20120526-0339 09:28
virichm I'm trying to get a serial port to the gp2x and I fail...13:25
viricok got it13:56
viricanyone good on yaffs?14:14
virichow can I dump a yaffs into a file so I can mount it with a loop device?14:14
GNUtoo-desktopviric, hmmm you need a fake MTD on RAM14:18
GNUtoo-desktopto be able to mount a yaffs14:19
GNUtoo-desktopelse you can just exrtact from it14:19
GNUtoo-desktopwith some tools14:19
GNUtoo-desktopbut usually you dump the flash partition with mtd-utils14:19
viricah ok14:20
viricthank you14:24
viricI've lots of <7>**>>ecc error unfixed on chunk 3844:014:33
mthis the OOM area configuration correct?14:35
mthyou have to tell Linux where the ECC bytes are14:35
virichm no idea14:35
mthand some devices use different layout than others14:35
viricit's the stock firmware in the gp2x14:35
viricI expect them to have it right14:35
mthand you're running their kernel as well?14:36
viricyes14:36
mthok, then this should not be the issue14:36
viricmth: do you use as a serial port terminal emulator?14:39
mthminicom14:40
virichm quite horrible.14:40
mthif there is something better, please let me know :)14:40
viricI'm used to 'cu'14:40
viricfrom uucp14:40
viric"cu -l /dev/ttyS1"14:41
viricit's very simple, and does not any terminal emulation14:41
viricbut with this serial port, it gives me: cu: write: Input/output error14:41
viricand minicom looks like not able to write now. I don't know what I touched.14:41
viricwhy would a PC UART return 'input/output error' on write?14:45
viricha. it was the hw flow control enabled.14:47
viricmth: about 'flashing a nand'... usually the image contents are the 'mtdblock' contents, isn't it?14:48
viricwhich is somewhat less bits than raw a mtd access would give.14:49
mthyou can have images with and without OOB data14:49
virichm ok14:49
mth(I wrote OOM before, but that's something different)14:49
viricyes, that confused me.14:49
viric:)14:49
viricyou meant OOB area?14:50
viricfor me OOM means out of memory14:50
viricmth: writing to a mtdblock... it says: Writing data without ECC to NAND-FLASH is not recommended14:56
viricwa, got rid of the boot sound of gp2x! mtdblock2 was a RIFF14:56
mthreplacing the data and not the ECC would be a bad idea14:57
mthbut I'd expect it to recompute the ECC as part of the write operaton14:57
mthnot sure if it actually does though14:57
mthAwAyla has more experience with this14:57
viricok14:58
viricfor what I tried with other mtd devices, the write operation did all.14:59
jeremybrown82i have a question about cpu design15:14
LunaVoraxHey everyone15:16
mthjeremybrown82: go ahead and ask the question15:16
jeremybrown82can Alternating current of its own form be applied to registers in cpu ad direct currnet voltage by desin there by expanding the capicities of the hardware platform15:16
jeremybrown82like multiplexing at the cpu level15:17
viricanyone ever programmed an arm920t with arm940t coprocessor?15:18
jeremybrown82im thinking about buying an arm laptop and using it for testing software on15:18
viricI wonder how to use the coprocessor15:19
mthI've never heard of CPUs running on alternating current15:19
jeremybrown82not exactly ac persay just a algorythim15:20
mthviric: afaik it's mostly used for blitting15:20
viricmth: as if it were a clever dma controller?15:21
viricknowing how to blit.15:21
jeremybrown82viric dont swear..lol15:22
viricI know the gp2x software have the coprocessor used mostly in its libSDL for that15:22
mththere is also this, but apparently it's not related to the copro: http://wiki.gp2x.org/wiki/Using_the_upper_32MB_of_memory15:22
viricnice15:23
mthI might be mistaken about blitting, it might be the hw blitter that wiki talks of, not the copro15:23
mthusually weird coprocessors and up being unused15:24
mthit seems hw people like them more than sw people ;)15:24
jeremybrown82somthing like this i guess15:25
jeremybrown82http://pubs.acs.org/doi/abs/10.1021/ac00246a02715:25
viricit has a '2d graphics processor', a 'video processor', and the arm940t15:25
viricthe usual yuv=>rgb and scaling.15:26
viricsome idct...15:26
viricquite a lot.15:26
viricmth: http://mudiweb.com/gp2x/MP2520F_Manual_Eng_V1.0.pdf15:26
viricmth: can the ingenic do some idct, to accelerate jpeg decoding?15:27
mththere is an IPU component that can do some image operations, like YUV decoding15:29
viricand scaling, iirc15:29
viricwell, I've always been interested in displaying huge jpegs15:30
viricusing low memory15:30
virica low amount of memory I mean15:30
mthin the 4740 it only does YUV conversion and scaling15:31
viricok15:31
mthin later procs it can do more15:31
mthI guess the trick is to make a decoder that doesn't decode the entire image, but only the sections that actually end up on the screen15:32
viricit's a pity all this does not have a unified user-kernel interface15:32
mthhw accel won't solve the memory issue15:32
viricmth: yes, I did that partly. But libjpeg does not allow enough constraints15:32
mththen you'll have to write your own lib or modify libjpeg, I think15:33
viric:)15:33
viricor do nothing15:33
mth...that's always an option15:33
viricattractive.15:33
mthI guess a specialize decoder that scales down is useful for generating thumbnails15:34
viricmth: isn't there any user-kernel interface about those things? like dri or so15:34
mthbut that would work very different from a decoder that decodes 1:1 but only part of the image15:34
viricmth: libjpeg allows decoding only the baseline (1/64 of resolution, 1/8 for each coordiante)15:34
viriccoordinate15:34
mthI think v4l2 would be the best match for the IPU15:34
mthbut there is no driver yet15:35
virichm recently I wrote some v4l2 code...15:35
mthdvdk accelerated mplayer using the IPU but via /dev/mem poking iirc15:35
viricyes I know15:35
mthwhich is fine for a prototype, but not the right way to do it15:35
viricright.15:35
viricI only used v4l2 for capturing from a webcam15:36
mthwhat I'd like to have is an SDL driver that rotates buffers through v4l215:36
viricI'm not sure it can handle rescaling15:36
mthto allow triple buffering15:36
viricrotates 90°?15:36
viricahb15:36
mthso you acquire a buffer from the kernel, fill it with a video frame, push it back into the kernel15:36
jeremybrown82then fold 15:36
viricok15:36
mthand the kernel displays it at the next vsync15:36
jeremybrown82like an overlay15:36
viricv4l2 works with enqueuing and dequeuing15:37
mththat way, user space doesn't have to mess with vsync at all anymore15:37
virichm treating the screen as a v4l2 output device...15:37
mthSDL api allows it15:37
mthjust call SDL_Flip() when you're done with a frame15:37
mthSDL doesn't require there to be just 2 pages for double buffering15:37
viricwhy would triple buffering be better than double buffering?15:38
viricmth: v4l2 looks quite good for an IPU. But how to manage when the screen shows /dev/fb0 contents or v4l2 contents? :)15:39
mthstop displaying /dev/fb0 when the v4l2 surface is active?15:41
viric'active'.. could be.15:41
viricI see mplayer supports v4l2 as output device too15:42
mthI don't know the video part of v4l2 well enough to know how 'active' should be defined15:42
viricok 15:42
mthin theory you could even display multiple surfaces at the same time, vertically aligned15:42
mthwe want to have an overlay of 20 lines for the power slider daemon at some point15:42
viric:)15:43
mthto provide visual feedback when changing volume for example15:43
mthit can be implemented using chained DMA descriptors15:43
mthwe're already doing that to add black lines at the top and bottom for TV-out15:43
viricbrave15:43
mthotherwise the last pixel of the screen determines border color15:43
mthit's not that hard if you have a static chain15:44
viricborder color... reminds of old tv-connected computers15:44
viricI don't understand that about dma and the overlay15:44
mthmight be more tricky if you manage the chain dynamically15:44
viric'chained dma descriptors' is linux terminology?15:44
mthit's just one DMA descriptor pointing to the next15:45
mthit's a feature of Ingenic's DMA controller, but I think many DMA controllers have it15:45
mththe daemon can't write in fb0, because an application is already writing there and would overwrite the daemon's gfx15:46
viricthen it goes on a next dma transfer without the cpu having to schedule a new one?15:46
mthso it needs a separate buffer that can still be visible on the screen15:46
mthcorrect15:46
mthactually the descriptors are set up in a loop, so the CPU never has the intervene15:46
viricbut does the cpu get notified of the end of the 1st transfer?15:46
viricah15:47
mthyou can set a start or end interrupt flag in the descriptor if you have to know where DMA is15:47
viricand how do you synchronize this?15:47
mthyou don't have to synchronize it, you only have to ensure the number of lines DMA-ed matches the number of lines per frame15:47
viricbut the cpu should not write to the memory the ipu or lcd is reading15:48
virichm maybe I miss details15:48
mthah yes15:48
mththe CPU can write there, but the changes will not be picked up until the cache is flushed15:49
mthso either you can make the framebuffer uncached, or you flush the cache regularly15:49
mthfor example on the start of frame interrupt15:49
mthand with double buffering, you flush the cache on the flip15:49
mththis is also easier with the v4l2 interface, there you would flush the cache when the kernel takes the buffer back from user space15:50
mthwhich immediately frees up the cache for more useful data15:50
viricyes15:50
mthit's superior in every way15:50
mthbut it's not written yet15:50
viric:)15:50
mthcurrently double buffering uses vertical panning, which is a good match for ancient hardware, but a poor match for today's hardware15:51
viric'panning'?15:51
mthscrolling of the view window15:51
mththe fb is 320x480 and the view is either at (0, 0) or (0, 240)15:52
viricah I didn't know15:52
viricwhat's bad in that?15:52
mthbecause the entire fb is memmapped by user space15:52
mthso the kernel driver anticipates on the typical usage pattern from SDL15:52
mthbut still has to support random access too15:53
mthit's a bit of a mess15:53
viricaha15:53
viricok15:53
mthfor example, on the Dingoo there is a separate LCD controller and the JZ is in SLCD mode15:53
mthwe can upload a frame whenever we want, there is no fixed refresh rate15:53
viricI don't know SLCD15:54
mthso ideally we upload immediately after a flip and not at any other time15:54
viricthe 'upload' is fast?15:54
mthit's "smart LCD", meaning the panel is not an actual bare LCD panel, but something with its own controller and RAM15:54
mthno, it takes a significant amount of time, since the memory bandwidth of the Dingoo is quite poor15:54
mthAwAyla did some experiments with this and the maximum theoretical frame rate you could get15:55
viricand what piece does the upload?15:55
mthbut I don't remember the result15:55
mththe SLCD framebuffer driver15:55
viricit's in the ram bus?15:55
mthit's done via DMA15:56
mththe SLCD FIFO is a special DMA target15:56
viricok15:56
mthsimilar to how audio is streamed, for example15:56
virichm so much fun15:56
mthin any case, we now have double buffering detection in the fb driver15:57
mththat determines whether the calls it gets match the pattern from double buffering15:57
mthif they do, we upload only on flips, otherwise we upload at a fixed timing (60 Hz)15:57
viricahhh15:57
viricnice.15:57
mthso if an emulator is running at 40 fps, we refresh only 40 times per second, saving some memory bandwidth15:58
viricquite a lot, 60Hz15:58
viricwhy so much?15:58
mthhistorical reasons :)15:58
viricyou could do 25Hz fixed.15:58
viriceven faster than this flip trick15:58
mthmany games are written for 60 Hz15:58
mthbecause of TVs15:58
viricwell, the games will think it's refreshed at 60Hz15:59
viricthey do their own counting15:59
mthanimations look best if you stick to their native freq15:59
viricor some multiple...15:59
viricok, 30hz15:59
viric:)15:59
mthold games use flickering sprites to simulate transparency15:59
viricoh good one15:59
viricyou win.16:00
mthso if you drop half the frames consistently, you either see the sprite full or not at all16:00
mthI've worked on openMSX for many years, you get nasty surprised like that :)16:00
mths/surprised/surprises16:00
viricbut... aren't there enough games that could run just fine uploading to screen at 30fps?16:01
viric'run' in the sense of pleasant playing16:01
mthprobably16:01
viricIsn't it an option of emulators?16:01
viricsome emulators have so much options...16:01
mthyou could change the game code to run at a fixed 30 fps double buffered and we'd refresh at 30 fps then16:02
viricok nice16:02
mthfixed frame skip is a typical feature for emulators16:02
mthin openMSX we have a min and max frameskip setting16:02
jeremybrown82mth have you heard of open pandora?16:03
jeremybrown82or the handheld pandora16:03
mthjeremybrown82: I even ordered one, but I'm still waiting for it16:03
mthso I got a Dingoo A320 to play around with in the mean time16:04
jeremybrown82teheh nice i want one but there so pricy for the specs16:04
jeremybrown82dingo is cool but gpwiz is top notch these days no?16:05
mthhw wise wiz is better, but Dingoo has an active scene16:05
mthand it's cheaper16:05
jeremybrown82mth dingoo is open?16:05
jeremybrown82for some reason i thought otherwise16:06
mthnot as you get it from the manufacturer, but we've replaced all the software with open stuff16:06
jeremybrown82haha nice does it require any modding16:06
mthno, everything can be replaced via USB16:06
jeremybrown82sweet soo like... whats good websites to key in on16:07
mthalthough using the internal memory is still very tricky, so the easiest way is to do it via a mini SD card16:07
mthdingoonity.org is the main scene site16:07
jeremybrown82nice thanks man16:07
mthand we've got the #dingoonity channel here on freenode as well16:07
jeremybrown82so you recommend the d380?16:08
mthnot really, the manufacturer doesn't release sources and few developers are interested in it16:09
jeremybrown82ohh ok16:09
mthand the screen res is not very useful, being larger than 320x240 but not large enough to allow 1.5x or 2x scaling16:09
jeremybrown82right16:09
mththe A320 is still the best device imo16:09
mththe GCW Zero might replace it, but that's still very much in a prototype stage16:10
jeremybrown82a320e is any different?16:10
jeremybrown82gcw zero hmm..16:10
mthA320e is an entirely different machine iirc16:10
jeremybrown82oh16:10
mthah no, I'm confused with the models now16:12
mthA320e is like the A38016:12
mththe Gemei A330 is an entirely different machine (ARM based)16:12
jeremybrown82oh16:12
jeremybrown82so you recommend which on again?16:13
viricmth: understanding those 60Hz requirements for emulators... no wonder some of these machines run duke3d just fine, and can't emulate snes :)16:13
mthsnes is quite hard to emulate accurately16:16
mthan emulator author wrote a nice piece about that for Ars Technica a while back16:16
viricwhat is ars technica?16:17
viricin this context16:17
mthtitles something like "why it takes a 3 GHz CPU to emulate SNES"16:17
mtha tech news site16:17
viricah thank you, I'll read it16:17
mthhttp://arstechnica.com/gaming/2011/08/accuracy-takes-power-one-mans-3ghz-quest-to-build-a-perfect-snes-emulator/16:18
viricyes I found it16:19
viric(I just also tried pocketsnes, and runs amazingly well in the gp2x compared to the other emulators I saw16:20
viric)16:20
mthyou don't need high accuracy for most games16:20
viricahga16:21
viricaha16:21
mthand in some cases you'll only notice accuracy problems if you're very familiar with the game on real hw16:21
mthI fixed a bug in overscan emulation in openMSX a few weeks ago which fixed exactly 1 game16:22
mthsince most games don't use overscan on MSX16:22
viricok16:22
viricmth: thank you for that ars technica article, very nice!17:13
viricmth: did you try uucp 'cu' for serial?    (Reminder: Type ~. to close 'cu'.)18:23
mthno, I don't have a serial port on my Dingoo18:27
viricah ok :)18:27
mthI've used minicom in the past to connect to the Wii, I think, but I don't really want to set that all up just to test18:27
viricsure sure.18:27
mthah, and the very first Dingux kernel, which used serial over USB instead of ethernet over USB18:28
kristianpauljow_laptop: hi18:32
kristianpauldo you know some device tinier than the tplink 703n than runs owrt of course and have usb host port?18:33
viricmth: I don't think there are many gaming devices with a v4l2 interface for their image processing units :)21:34
mthprobably not, but I don't think there are many gaming devices running Linux 3.4 yet either21:37
viricah :) yes21:38
jow_laptopkristianpaul: sorry nope, the 703n is currently the smallest one I know personally22:47
jow_laptophm actually, there is one slightly smaller board I recall22:48
jow_laptophttp://www.8devices.com/product/3/carambola22:48
--- Mon May 28 201200:00

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