Support and General Use > Hardware
X5: Itching to create a patch that shuts the LCD off when backlight is off.
Llorean:
Sounds like a good idea. I would personally suggest talking to Amiconn in IRC (when he's around) about the improved bit depths. He's either likely to be able to answer your questions, or point you in the right direction for who to discuss it with.
Bagder:
The X5 LCD can't display 18bit colors, only 16bit.
RaeNye:
--- Quote ---The MFC5249 User's manual is quite daunting at 450 pages and the HD667733R at 133 pages too. I just need a little help!
--- End quote ---
Actually X5 uses the SCF5250. Not that I could find any difference except for IRAM size / clock speed.
The important part of the LCD specs is the set of commands.
--- Quote ---The LCD command register and data register are listed in the twiki as 0x20008000 and 0x20008002 repectively but the driver writes to 0xF0008000 and 0xF0008002. Why this descrepancy?
--- End quote ---
The default value of CS2 (a "segment" register) is 0x20000000, also used by the OF. RB uses 0xF0000000, hence all memory addresses in this area (LCD, IDE, USBOTG) are rebased.
--- Quote ---How is the mapping of the LCD chip to CPU memory addresses accomplished? Is it hardwired on the board or done in the software somewhere? Which lines? Knowing this would help my understanding of the CPU greatly.
--- End quote ---
RB sets CS2 in crt0.S. The offset 0x8000 is probably hardwired. You care not.
--- Quote ---Which interface does the LCD driver use? I know it's 18-bit but serial or parallel?
--- End quote ---
The interface used, probably hardwired, is two memory mapped registers (LCD_CMD and LCD_DATA), addressed using "stupid 16-bit to 18-bit mode". This means you have to read/write the high 8 bits as 9 bits and then separately the low 8 bits as 9 bits, rendering IO twice as slow.
RB uses a look-up table to ease this a bit.
LCD commands tend to look like "write XXX to LCD_CMD, then read/write YYY from/to LCD_DATA". Note that when copying framebuffer to the LCD you only need to issue the write command once and afterwards you just keep writing the data.
Also, you should check out the HWM (sp?) mode that allows 4 aligned LCD writes to be done in parallel. It probably requires changing the direction the framebuffer is stored, but maybe it's faster.
--- Quote ---As far as full color support goes, I seriously wouldn't mind *gasp* wasting the memory and just using 32 bits per pixel for simplicity and speed. The memory requirement would only be doubled. It can also be dithered easily enough if someone wants super high quality.
--- End quote ---
Currently the framebuffer takes 0xF000 bytes out of the available 0x20000 bytes in IRAM. You would have to either get it out of IRAM (-33% performance IIRC) or get everything else out.
--- Quote ---I've read a request on another thread about shutting down the LCD panel when the backlight is off. ... Is it even worth it?
--- End quote ---
I think this should come with a more global device standby scheme, e.g.,
* backlight is off after 5 seconds w/o keypresses (actually I want a fade-out :))
* HDD is spun down after 10 seconds of no IO activity
* LCD is off after 1 minute of no button activity
* TLV320 is off after 20 seconds of no playback/record activity
* etc.Even if not such implemented, I want LCD to be shut down gracefully on player shutdown. It's The Right ThingTM to do and might extend its life.
Feel free to ask more, I might be nice enough to answer ;),
R.
jhMikeS:
You're right. Things are making more sense now. I'm looking at the data sheet now and it says the 18 bit color is hardware dithered to 16-bit 565 if the DIT bit is set to "1".
I knew it! The 262,144 colors is a scam!
Is the chip interface hardwired for 18-bit or can 16-bit be used instead without modding? That probably would have been done already.
Image viewing/video could still be improved a little using the hard dithering anyway.
jhMikeS:
RaeNye, thanks. You ansered some important things while I was replying to Badger.
--- Quote ---The default value of CS2 (a "segment" register) is 0x20000000, also used by the OF. RB uses 0xF0000000, hence all memory addresses in this area (LCD, IDE, USBOTG) are rebased.
--- End quote ---
Can you tell what pins are involved in the addressing? That would help me understand the CPU better in general as far as hooking up external devices. I do care so! ;D
--- Quote ---backlight is off after 5 seconds w/o keypresses (actually I want a fade-out )
--- End quote ---
Why is there no backlight dimming? That thing eats power and it doesn't need to be fullbright when looking at the WPS or browsing.
--- Quote ---Also, you should check out the HWM (sp?) mode that allows 4 aligned LCD writes to be done in parallel. It probably requires changing the direction the framebuffer is stored, but maybe it's faster.
--- End quote ---
The lcd_x5.c is easy to understand in general. I'm curious about that burst RAM write stuff. It says you have to write four words (goes into registers) and writes that to GRAM while you write the next four words.
--- Quote ---I want LCD to be shut down gracefully on player shutdown.
--- End quote ---
Yeah, I don't see the recommended power down sequence being observed anywhere in the driver.
I'm off to sleep now. Hopefully I can get on IRC and ask lots of questions later. I just don't want to frustrate the gurus too much. ;D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version