[okl4-developer] some questions about addressing / lcd-driver of the S3C2410 gta01
Dennis Gessner
d.gessner at sirrix.com
Fri Sep 5 20:27:21 EST 2008
Hello everyone,
can anybody tell me how (exactly) the fb of the gta01 (S3C2410 chipset)
needs to be addressed?
I've read the user-manual of the chipset
http://www.samsung.com/global/business/semiconductor/productRightMenuDown.do?doc_file=26537
and already did a lot of tests - but the results were not as good as
they should be. I can print out the ground-colors red, blue, and green,
but if I use "more" colors, it's getting confusing.
Inside the lcd-driver of the s3c2410 (okl4 2.1.1 patch 9) there are the
five values for the lcdcon-registers of the display:
/drivers/s3c2410_lcd/src/s3c2410_lcd.c
lcdcon1_write(0x00000178);
lcdcon2_write(0x019fc3c1);
lcdcon3_write(0x0039df67);
lcdcon4_write(0x00000007);
lcdcon5_write(0x0001cf09);
Looking a bit deeper you can see that lcdcon1 defines a 16bpp-mode
(BPPMODE [4:1] = 1100). Now begins the confusing part:
Inside the manual in section 15-17 it is said (on the upper part of the
page), that every pixel is written in 2 bytes (what would be logical in
a 5-6-5 16bpp coding). The LOWER part of the page says, ONE Pixel is
coded into a 24bit-field with a lot of don't-care-values (also a 5-6-5
coding). I tried both versions of coding and never got the result I
would like to have. For example it looks like I only have 4 different
values of blue, what should not be with a 5 bit blue-value.
Also I tried to enable 24bpp-mode
// We want to have 24BPP, so we need to chance the lcdcon1-Register
lcdcon1_write(0x0000017A);
// Change HWSWP to 0 (was 1)
lcdcon5_write(0x0001cf08);
with the following result:
If I print a single pixel height line at the top of the screen, it is
correctly printed out at the top of the screen - BUT - it also appears
at the middle of the page. Analyzing this, I put a picture in the upper
half of the page - and it also was "copied" in the lower part of the
page. It looks like (I don't know why) the complete upper half of the
screen is copied into the lower half.
I used a single line to be sure that I have the current size of the
pixel (in the 16bpp-coding-situation it was really 16 bit per pixel
without any leading alpha or dummy value at any place).
I've also increased the fb-size of the okl4-memsection but this did not
solve the problem.
Maybe this is something with synchronization or a timing problem? How
can I solve this? Change values for VSPW or VSTATUS?
How can I continue? What color-mode do you use and what exactly coding
did you use (for example, in 24bpp mode I have to put an 8 bit alpha
value behind the other 3 bytes of color-data)?
What color is at what exactly bit-position in 16bpp or even 24bpp?
Another confusing thing is, inside the manual of the S3C2410 it is
written the lcd-controller supports 24bpp. BUT - the display itself of
the gta01 "TD028TTEC1" only supports 262k colors (what again would mean,
I only can use 65k colors).
If you need any further information about what I did - please let me know.
Any help is very welcome.
Best regards,
Dennis
More information about the Developer
mailing list