-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Firmware interface changes - where are they detailed please? #22
Comments
Currently you just have the github commit comments, and the diffs in the linux kernel tree (any interface changes will impact on the kernel). |
1 similar comment
Currently you just have the github commit comments, and the diffs in the linux kernel tree (any interface changes will impact on the kernel). |
Hi, and thanks for this. What is particularly puzzling me is that firmware for early march gave me a framebuffer which I could then (before mmu came on) poke and see the result on screen. The FB I get with the current (5 day old) firmware, requested in the same way, syncs up the screen, but does not show these pokes .. Also the ATAG stuff appears missing .. do I now need a specific command in a specific file (command.txt?) to enable this behaviour. |
This sounds like a caching issue. Try adding |
I'll try that shortly. Can we set up l2 caching from the arm11 side, or must it be in config.txt? |
config.txt. It is the GPU that launches the ARM, and the arm code must be loaded through the right alias. |
Yes .. L2 caching was the answer.. Is ther a list of config.txt tags.. Or shall I fire back those I've located? |
Ok .. I guess I can deduce what I need from the top bits of the fb address that is returned .. Many many thanks for the help .. |
Do ATAGs get loaded now? If so at what address in the image please? |
Ok Am I being stupid, or am I missing something critical? |
http://elinux.org/RPi_config.txt for config.txt options. If L2 enabled, and framebuffer is reported at bus address 0x4D385000 you need to access through the VC/ARM MMU with ARM physical address. I think you will use 0x0D385000 to get there. |
Thanks for the syntax.. That is good. 1: with the l2 turned off in config.txt, I can actively write the FB at 0d385000 and at cd385000 . This is very early, before any arm mmu is turned on. Writing to screen means writing a 10101010 bit pattern. I stall the arm straight after the bit pattern write, so nothing else ought to be happening.. Diagnostic output from the arm side is identical.. there is only one line in config.txt, setting the l2 thing to 1 or 0 Can you shed any light? |
I'd expect that to work. |
Yes.. I fill the whole buffer .. Works ok cache off, fails cache on. Be happy to send you he image in use if that helps.. |
What address are you poking down the mailbox describing your frambuffer info? |
That caught it.. I was poking the 0xc address till I found what address was returned, then using that. I did get an 0x4 address returned.. But starting on 0x4 seems to bring it to life - thanks I presume I have to see an ATAG to determine in the kernel whether to use L2 addressing or not? I still cannot find where the ATAGs stuff is loaded to prior to arm start .. I was expecting to find it at 0x00000100. Overwriting some of the kernel image. Has it moved beyond the end? |
The cache alias isn't passed to ARM through ATAGs. Basically only L2 enabled is expected. If it is working, then there is no reason to disable L2 cache. Performance is significantly improved with it enabled. See here for info on kernel loading: Do you currently use the ATAGS? |
Where it was useful was in discovering the amount of RAM available. If I've read the issue 16 bit OK, this info is available in a device tree. What isn't clear to me is how I should get at this .. (killing the first 32k is not a problem for us.. ) One thing RISCOS needs that is (almost) a show stopper for us to change is 'inverse transparency'. Where you use the alpha channel to define 0xff as fully opaque, we use it to be fully transparent . Hopefully a mod to provide this as an option is going through. Also quite a lot of our code assumes megabyte alignment in the frame buffer start. Is that also possible?. Many Many thanks for you help on all this John |
Megabyte alignment should be straightforward. I'll add a new alignment entry into the fbinfo_s struct (annoyingly changing that forces kernel/start.elf to be updated together). If you have any other requests for fbinfo_s ask now. Inverse transparency is a problem. The hardware doesn't support that directly. We can ignore the alpha byte. |
Do I read it right that I provide a template device tree file (dtb) and in the config.txt. provide the tree file name and hex address to load it at? |
Yes. Currently the dtb file will just be loaded untouched. There is a plan for entries the GPU knows about (e.g. framebuffer width) to be overwritten, but that is not implemented yet. |
Hm. so how is your alpha channel implemented .. a straight forward hard coded linear convertor, a DSP style multiplication, or a LUT? .. the following describes how we- ideally - work Bit fields in the following descriptions are little-endian. 32bpp mode: bits 24-31: 0 or transparency 16bpp mode: bit 15: 0 or transparency In 16 and 32bpp modes, the red/green/blue fields would ideally be fed At a pinch, we can make 16bpp 565 work appear to operate as 5551, by 1, 2, 4, 8bpp modes: All bits are used as an index into a colour LUT (palette). Where pixels Bit of a mouthfull.. What could you manage do you think? |
dtb file .. ok.. how, at present, can I determine the amount of ram available, if ATAG not in use? |
For now I guess sticking with a specific start.elf and assuming memory split is easiest. |
Hi I'll have to assume memory until I can find a way to determine it .. Currently I accommodate the fact that some of the first 32k might be overwritten. Device tree I suppose could be useful, but we've never used it before, so it is something not essential.. If the mailbox used a get/set property interface then it would be possible for any OS to discover what lay underneath, and feed back any control info that might be relevant. There are several bits of information we do need to discover, such as serial numbers, MAC addresses, amount of available RAM, etc. I had found these in ATAGs but given that others found the 'pollution' of the first part of the image troublesome, wouldn't it really be easier for all if , having started one's code in the arm, the arm could then query what lay underneath via (I guess) the mailbox structure .. even if what it then did equated to giving you a buffer containing the atag info. hopefully this is helpful. |
I've got a quick answer to whether it is L2 enabled or not - request a FB with L2 addressing (top bits &4). It'll currently return no FB address if it isn't L2 enabled .. So retry with no cache addressing (top bits &c). This works with the start.elf of 17 may. and hopefully moving forward John |
From display guy: The VC4 model is:
<= 8bpp pixels can use a palette, so any A,R,G,B mapping is possible.
In RGB5551, the alpha bit is an "opaque" bit. |
we do any gamma correction & color-space tweaks :: how do these get applied? .. is that where the top 8 bits - transparence/opacity - is applied, or is it applied to the original composit? thanks Oh.. and any more thoughts on mailbox requeste etc? |
Hi Many thanks John |
I've done the easy ones. Latest firmware on github supports: Not hugely tested, so let me know if any problems. Handling multiple planes and alpha is a bit tricky (mostly due to inverted alpha value), but it is possible. |
Hi -- Many thanks ... but .. linux kernel with same switches in CONFIG.TXT still shows the same 0x40 buffer alignemnt. Have I missed something please? |
"(e.g. you have GPU accelerated video working)" what info is available to do this please .. is it 'public' or is it ATM just using a binary blob within linux? Thanks |
Hi.. for what it is worth, just confirmed things are still misbehaving here for your version " rebuild with ipv6 enabled" john |
Does it work without the new entries in config.txt? On Thursday, May 31, 2012, rosery wrote:
|
no.. it seems not to .. can you suggest anything else to try? - the sync light on the screen, which is out when screen drive is valid, flashes 3 flashes at about 8 secs in.. probably 1/4 sec on and 1/4 sec off, this it repeats approx every 10 flash intervals .. (5 secs ish) .. not sure if this is any help thanks |
Going back through the start.elf commits, the last version that would start my monitor was about 14 days ago "popcornmix 14 days ago |
Going back through the start.elf commits, the last version that would start my monitor was about 8 days ago "wjt 8 days ago Remove unnecessary executable bits. "" .. Also ATAGS .. Do I have to have 'your' bottom 32k to get ATAGS inserted at 0x100? They used to just appear at 0x100 overwriting my image, now, since around when the disable_commandline_tags thing appeared I do not seem to get them .. Again, Am I missing something? .. I have tried with that set =0 or =1 Thanks |
(should I put any of this in another 'issue'? what is preferred?) |
@rosery it probably makes sense to make a new issue for the monitor regression, because if other people are suffering a similar regression they're more likely to come across it. Could you dump your EDID and relevant information from /opt/vc/bin/tvservice? |
will do later. what is the 'best' linux image to start from? .. as you may have realised, I'm not actually running with linux here |
At the moment, you're probably best off grabbing the 'squeeze' image at http://www.raspberrypi.org/downloads and updating the firmware. |
I've found a regression in hdmi out code. start.elf is updated. Does that fix problem? |
Hi.. that certainly fixed the ability to display on my monitor .. thanks I have confirmed that framebuffer_ignore_alpha=1 does ignore the alpha channel.. at least in 32bit mode as tried. i.e. it rounds/alignd, but limited to modulo 64k .. i.e. I would hope to get at align=0x100000 0x09400000 As best I can tell at this stage the hvs_swap_red_blue seems permanently on (as seen from riscos .. ) =0 and =1 appear to make no difference. I'll try booting this in linux shortly to confirm Thanks |
Hi.. Any thoughts about the alignment thing? (if you have any eta it would be great to know..). Many thanks. John |
You are correct. I did step through the allocation code and an alignment of 1M isn't supported (it stores alignment in a limited size bitfield). I'll sort something out soon. |
Can you try this version: Hopefully the alignment will be as requested. |
Hi, many thanks, alignment now does as expected. We definitely have colour swap in 32 bit mode, though not convinced about 16bit mode. the hvs_swap_red_blue seems to make no difference. Is this 'intelligence' intended please? Is there anywhere reliably where the hard info the used to be passed in ATAGs is located.. I have found the ram size word at 0x80 above the base of the vcram space. Occasionally I see the ATAG set at 0x100 above there, but it doesnt appear relaibly?? Many thanks |
atags issue fixed with kernel_old=1.. thanks for that. megabyte frame buffer alignment fixed in start.elf from 10-6-2012 .. thanks |
Can you check #47 for a alternative way of getting ATAGs etc. |
first look says.. Fantastic.. thanks.. will try to get on top of it this eve.. I'd suggest a couple more properties.. e.g set rb swap, set ignore alpha, etc.. then config.txt becomes more or less redundant in distinguishing between riscos booting and linux booting. Agani.. Fantastic.. Many thanks |
I've made a start on the wiki pages to describe mailboxes that you said you wanted to create at the top of this thread. If you (or others) want to fill in the blanks it should be a bit easier for you now. |
Hi. I hope this is an appropriate place to ask - I'm working on the HAL for RISCOS. I had a frame buffer that worked more or less OK with firmware from early March. Having finally located this repository, I have tried using the mid may firmware. Many things have moved. e.g. a frame buffer is returned aligned to 0x1000 - That is an improvement, though ideally we require megabyte alignment. What I'm leading to, is, where can I find the changes to the firmware interface as they happen please? It is not much fun chasing a moving target almost blind... Thanks in advance ..
The text was updated successfully, but these errors were encountered: