Re: [U-Boot] Displaying characters on the display in u-boot

2013-05-10 Thread Bhargav A K
Hi

> Why are you using 0xA500 address here as the frame buffer base
> address?

Yeah this is a very much a valid frame buffer address. I 'used' to use this for 
splash screen also and it
worked fine.

>  Can you see changes on the display if you write data to this address by
> U-Boot "mw" command (i.e. "mw a500  100") ?

No.. but the memory will have all "f"'s contained in it until I reboot.

> Probably the frame buffer or display controller configuration is
> wrong then. Is the display backlight enabled?

Frame buffer configuration has to be right.. it worked for the splash screen
Is it any different for text displaying ?

Yeah, backlight is enabled.

> lcd_drawchars() will not help since you do not use the lcd driver.

I displayed the bmp images on the LCD, which I had been asking u in the
'u-boot.10912.n7.nabble.com' forum.
The method I used goes like this,
- I created a gzip of the bmp
- used the xxd -i to create a HEX dump of it.
- made it part of the u-boot compilation process, that was a requirement 
imposed.
- gunzip it runtime, just use a portion of lcd_display_bitmap, which does the 
conversion
  to RGB888. The portion of the code where bmp_bpix=32, in the switch case.
- its just too good, the u-boot.bin is 330 KB with more that 15 images inside 
it :D
- my u-boot just became awesome after that.

On the same lines, I tried using lcd_drawchars(). Please correct me if I'm 
wrong.

But the bigger problem here is I'm not able to figure out where the mistake is.
I'm pretty conversant with using the Lauterbach to debug. I have JTAG pins 
drawn out on my board.

Please give me Ur suggestions.

Regards
Bhargav
____
From: Anatolij Gustschin [ag...@denx.de]
Sent: Sunday, April 28, 2013 7:52 PM
To: Bhargav A K
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] Displaying characters on the display in u-boot

Hi,

On Fri, 19 Apr 2013 21:29:33 +0530
Bhargav A K  wrote:

> Hi All,
>
> I have enabled the following configurations.
> in my board's config header
>
> #define CONFIG_VGA_AS_SINGLE_DEVICE
> #define CONFIG_VIDEO
> #define CONFIG_CFB_CONSOLE
>
> video_hw_init() returns a pointer to GraphicsDevice structure.
>
> It does the following
> -
> omap4_GD.winSizeX = 480; //__raw_readl()
> omap4_GD.winSizeY = 800;
> omap4_GD.gdfBytesPP = 4;
> omap4_GD.gdfIndex = GDF_32BIT_X888RGB;
>
> __raw_writel(0xA500, DISPC_GFX_BA0);
> omap4_GD.frameAdrs = __raw_readl(DISPC_GFX_BA0);

Why are you using 0xA500 address here as the frame buffer base
address? Are you sure that this is a valid memory address? Can you
see changes on the display if you write data to this address by
U-Boot "mw" command (i.e. "mw a500  100") ?
Which frame buffer base address did you use before for working
splashscreen?

> initDisplay(); // Do all other clocks, GPIOs, OMAP4 registers specific for 
> LCD(DSI, DISPC, DSS).
> --
>
> board_video_init() is just a dummy call.
>
> I did a console_assign() to redirect stderr and stdout to vga.
> All the printf's doesn't come on the serial console or the LCD.
>
> I tried using the video_drawstring(10, 20, "hello world"),
> after resetting the stdout to serial. I see all the "printf's" on the
> serial console, but the string from video_drawstring()(hello world)
> won't come on the LCD even after syncing LCD pipelines (GO_LCD in OMAP4470).

Probably the frame buffer or display controller configuration is
wrong then. Is the display backlight enabled?

> Then I just exported the lcd_drawchars() function into my LCD code,
> tried to write characters to the LCD, nothing came onto the screen.

lcd_drawchars() will not help since you do not use the lcd driver.

Thanks,

Anatolij

SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary 
or legally privileged information. In case you are not the original intended 
Recipient of the message, you must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message and you are requested to 
delete it and inform the sender. Any views expressed in this message are those 
of the individual sender unless otherwise stated. Nothing contained in this 
message shall be construed as an offer or acceptance of any offer by Sasken 
Communication Technologies Limited ("Sasken") unless sent with that express 
intent and with due authority of Sasken. Sasken has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Displaying characters on the display in u-boot

2013-04-27 Thread Bhargav A K
Hi All

Please bring up my post. I'm still waiting for an answer.

Kind regards
Bhargav

From: Bhargav A K
Sent: Friday, April 19, 2013 9:29 PM
To: u-boot@lists.denx.de; Anatolij Gustschin
Subject: RE: [U-Boot] Displaying characters on the display in u-boot

Hi All,

I have enabled the following configurations.
in my board's config header

#define CONFIG_VGA_AS_SINGLE_DEVICE
#define CONFIG_VIDEO
#define CONFIG_CFB_CONSOLE

video_hw_init() returns a pointer to GraphicsDevice structure.

It does the following
-
omap4_GD.winSizeX = 480; //__raw_readl()
omap4_GD.winSizeY = 800;
omap4_GD.gdfBytesPP = 4;
omap4_GD.gdfIndex = GDF_32BIT_X888RGB;

__raw_writel(0xA500, DISPC_GFX_BA0);
omap4_GD.frameAdrs = __raw_readl(DISPC_GFX_BA0);

initDisplay(); // Do all other clocks, GPIOs, OMAP4 registers specific for 
LCD(DSI, DISPC, DSS).
--

board_video_init() is just a dummy call.

I did a console_assign() to redirect stderr and stdout to vga.
All the printf's doesn't come on the serial console or the LCD.

I tried using the video_drawstring(10, 20, "hello world"),
after resetting the stdout to serial. I see all the "printf's" on the
serial console, but the string from video_drawstring()(hello world)
won't come on the LCD even after syncing LCD pipelines (GO_LCD in OMAP4470).

Then I just exported the lcd_drawchars() function into my LCD code,
tried to write characters to the LCD, nothing came onto the screen.

Please point out where I am going wrong.

Kind regardsn
Bhargav
____
From: Bhargav A K
Sent: Wednesday, March 27, 2013 10:04 PM
To: Anatolij Gustschin
Cc: u-boot@lists.denx.de
Subject: RE: [U-Boot] Displaying characters on the display in u-boot

Anatolij,

Thank you very very much, I will implement this very soon.
If I face any issues, which I won't after such excellent tutoring from you,
can I revert back to you ?

Thanks again :)...

> Yes. If board specific video initialization is done elsewhere the
> board_video_init() can be a dummy function.

I shall make it a dummy, and I have to make sure it return success,
as I have done it elsewhere.

Kind regards
Bhargav

From: Anatolij Gustschin [ag...@denx.de]
Sent: Wednesday, March 27, 2013 9:57 PM
To: Bhargav A K
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] Displaying characters on the display in u-boot

Hi,

On Wed, 27 Mar 2013 21:05:55 +0530
Bhargav A K  wrote:
...
> > What U-Boot version do you use?
>
> U-Boot 1.1.4-geb3fa991 (Feb 21 2013 - 10:11:04)
> (output of version command)

Very old, ;-).

> > This video_set_lut() function is only needed if you use 8 bits per
> > pixel frame buffer.
>
> So can I comment it out, (or) just make a dummy call and dummy return from it.
> It wont affect my character(text) rendering on the display, correct ?

yes, just provide a dummy video_set_lut(). If you do not use the
GDF__8BIT_INDEX framebuffer format, the rendering will work.

> My last question, the board_video_init() function just initializes the board
> in display/video mode. For example if I have a GPIO to switch b/w command and
> video modes and a GPIO to switch on the LCD, etc., I'll have to do all such
> functions in it.
>
> But if all of those are already done, I can just return a dummy from the
> function ?

Yes. If board specific video initialisation is done elsewhere the
board_video_init() can be a dummy function. Some video drivers
expect board_video_init() to return frame buffer base address but
i.e. in omap3 driver it returns 0 for successful video init or an
error code in case the board specific video init fails, thus
preventing further initialisation in the cfb_console driver.

Thanks,

Anatolij

SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary 
or legally privileged information. In case you are not the original intended 
Recipient of the message, you must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message and you are requested to 
delete it and inform the sender. Any views expressed in this message are those 
of the individual sender unless otherwise stated. Nothing contained in this 
message shall be construed as an offer or acceptance of any offer by Sasken 
Communication Technologies Limited ("Sasken") unless sent with that express 
intent and with due authority of Sasken. Sasken has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Displaying characters on the display in u-boot

2013-04-19 Thread Bhargav A K
Hi All,

I have enabled the following configurations.
in my board's config header

#define CONFIG_VGA_AS_SINGLE_DEVICE
#define CONFIG_VIDEO
#define CONFIG_CFB_CONSOLE

video_hw_init() returns a pointer to GraphicsDevice structure.

It does the following
-
omap4_GD.winSizeX = 480; //__raw_readl()
omap4_GD.winSizeY = 800;
omap4_GD.gdfBytesPP = 4;
omap4_GD.gdfIndex = GDF_32BIT_X888RGB;

__raw_writel(0xA500, DISPC_GFX_BA0);
omap4_GD.frameAdrs = __raw_readl(DISPC_GFX_BA0);

initDisplay(); // Do all other clocks, GPIOs, OMAP4 registers specific for 
LCD(DSI, DISPC, DSS).
--

board_video_init() is just a dummy call.

I did a console_assign() to redirect stderr and stdout to vga.
All the printf's doesn't come on the serial console or the LCD.

I tried using the video_drawstring(10, 20, "hello world"),
after resetting the stdout to serial. I see all the "printf's" on the
serial console, but the string from video_drawstring()(hello world)
won't come on the LCD even after syncing LCD pipelines (GO_LCD in OMAP4470).

Then I just exported the lcd_drawchars() function into my LCD code,
tried to write characters to the LCD, nothing came onto the screen.

Please point out where I am going wrong.

Kind regards
Bhargav
____________
From: Bhargav A K
Sent: Wednesday, March 27, 2013 10:04 PM
To: Anatolij Gustschin
Cc: u-boot@lists.denx.de
Subject: RE: [U-Boot] Displaying characters on the display in u-boot

Anatolij,

Thank you very very much, I will implement this very soon.
If I face any issues, which I won't after such excellent tutoring from you,
can I revert back to you ?

Thanks again :)...

> Yes. If board specific video initialization is done elsewhere the
> board_video_init() can be a dummy function.

I shall make it a dummy, and I have to make sure it return success,
as I have done it elsewhere.

Kind regards
Bhargav

From: Anatolij Gustschin [ag...@denx.de]
Sent: Wednesday, March 27, 2013 9:57 PM
To: Bhargav A K
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] Displaying characters on the display in u-boot

Hi,

On Wed, 27 Mar 2013 21:05:55 +0530
Bhargav A K  wrote:
...
> > What U-Boot version do you use?
>
> U-Boot 1.1.4-geb3fa991 (Feb 21 2013 - 10:11:04)
> (output of version command)

Very old, ;-).

> > This video_set_lut() function is only needed if you use 8 bits per
> > pixel frame buffer.
>
> So can I comment it out, (or) just make a dummy call and dummy return from it.
> It wont affect my character(text) rendering on the display, correct ?

yes, just provide a dummy video_set_lut(). If you do not use the
GDF__8BIT_INDEX framebuffer format, the rendering will work.

> My last question, the board_video_init() function just initializes the board
> in display/video mode. For example if I have a GPIO to switch b/w command and
> video modes and a GPIO to switch on the LCD, etc., I'll have to do all such
> functions in it.
>
> But if all of those are already done, I can just return a dummy from the
> function ?

Yes. If board specific video initialisation is done elsewhere the
board_video_init() can be a dummy function. Some video drivers
expect board_video_init() to return frame buffer base address but
i.e. in omap3 driver it returns 0 for successful video init or an
error code in case the board specific video init fails, thus
preventing further initialisation in the cfb_console driver.

Thanks,

Anatolij

SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary 
or legally privileged information. In case you are not the original intended 
Recipient of the message, you must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message and you are requested to 
delete it and inform the sender. Any views expressed in this message are those 
of the individual sender unless otherwise stated. Nothing contained in this 
message shall be construed as an offer or acceptance of any offer by Sasken 
Communication Technologies Limited ("Sasken") unless sent with that express 
intent and with due authority of Sasken. Sasken has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Displaying characters on the display in u-boot

2013-03-27 Thread Bhargav A K
Anatolij,

Thank you very very much, I will implement this very soon.
If I face any issues, which I won't after such excellent tutoring from you,
can I revert back to you ?

Thanks again :)...

> Yes. If board specific video initialization is done elsewhere the
> board_video_init() can be a dummy function.

I shall make it a dummy, and I have to make sure it return success,
as I have done it elsewhere.

Kind regards
Bhargav

From: Anatolij Gustschin [ag...@denx.de]
Sent: Wednesday, March 27, 2013 9:57 PM
To: Bhargav A K
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] Displaying characters on the display in u-boot

Hi,

On Wed, 27 Mar 2013 21:05:55 +0530
Bhargav A K  wrote:
...
> > What U-Boot version do you use?
>
> U-Boot 1.1.4-geb3fa991 (Feb 21 2013 - 10:11:04)
> (output of version command)

Very old, ;-).

> > This video_set_lut() function is only needed if you use 8 bits per
> > pixel frame buffer.
>
> So can I comment it out, (or) just make a dummy call and dummy return from it.
> It wont affect my character(text) rendering on the display, correct ?

yes, just provide a dummy video_set_lut(). If you do not use the
GDF__8BIT_INDEX framebuffer format, the rendering will work.

> My last question, the board_video_init() function just initializes the board
> in display/video mode. For example if I have a GPIO to switch b/w command and
> video modes and a GPIO to switch on the LCD, etc., I'll have to do all such
> functions in it.
>
> But if all of those are already done, I can just return a dummy from the
> function ?

Yes. If board specific video initialisation is done elsewhere the
board_video_init() can be a dummy function. Some video drivers
expect board_video_init() to return frame buffer base address but
i.e. in omap3 driver it returns 0 for successful video init or an
error code in case the board specific video init fails, thus
preventing further initialisation in the cfb_console driver.

Thanks,

Anatolij

SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary 
or legally privileged information. In case you are not the original intended 
Recipient of the message, you must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message and you are requested to 
delete it and inform the sender. Any views expressed in this message are those 
of the individual sender unless otherwise stated. Nothing contained in this 
message shall be construed as an offer or acceptance of any offer by Sasken 
Communication Technologies Limited ("Sasken") unless sent with that express 
intent and with due authority of Sasken. Sasken has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] Displaying characters on the display in u-boot

2013-03-27 Thread Bhargav A K
Hi Anatolij

Thank you very much for Ur guidance

> What U-Boot version do you use?

U-Boot 1.1.4-geb3fa991 (Feb 21 2013 - 10:11:04)
(output of version command)

> This video_set_lut() function is only needed if you use 8 bits per
> pixel frame buffer.

So can I comment it out, (or) just make a dummy call and dummy return from it.
It wont affect my character(text) rendering on the display, correct ?

My last question, the board_video_init() function just initializes the board in
display/video mode. For example if I have a GPIO to switch b/w command and video
modes and a GPIO to switch on the LCD, etc., I'll have to do all such functions 
in it.

But if all of those are already done, I can just return a dummy from the 
function ?

Kind regards
Bhargav

From: Anatolij Gustschin [ag...@denx.de]
Sent: Wednesday, March 27, 2013 8:30 PM
To: Bhargav A K
Cc: u-boot@lists.denx.de
Subject: Re: [U-Boot] Displaying characters on the display in u-boot

Hi,

please keep the U-Boot list address on Cc, other users may
find the discussion helpful.

On Wed, 27 Mar 2013 19:40:33 +0530
Bhargav A K  wrote:
...
> Now I will have to define video_set_lut() also, isn't it ?

It depends. What U-Boot version do you use? If you use mainline
U-Boot recent versions like v2013.01.01, then this function
already exists as a week default empty function. You do not always
need video_set_lut() functionality unless you want to use a frame
buffer configuration with 8 bits per pixel colour depth.

> Can I please get more information on what I have to handle inside the 
> function ?

This video_set_lut() function is only needed if you use 8 bits per
pixel frame buffer. I doubt that you want to use it since the
splash screen quality will be really bad in this color depth mode.
If you want to use this depth, then this function should fill the
color palette (look up table) of the display controller using the
index argument of the function as an index into look-up table and
using other arguments as values for the look-up table entries
under that index.

> Also, Is there any place where I can of getting more information on the 
> structure members
> of "struct GraphicDevice" ?

the needed struct members are more or less self-explanatory, so
these are not documented anywhere, I think. You need to init
only:

 winSizeX  - the width of the display in pixels
 winSizeY  - the height of the display in pixels
 gdfBytesPP - frame buffer color depth in bytes per pixel
 gdfIndex   - graphics data format of the frame buffer,
  it is one of
   GDF__8BIT_INDEX
   GDF_15BIT_555RGB
   GDF_16BIT_565RGB
   GDF_32BIT_X888RGB
   GDF_24BIT_888RGB
   GDF__8BIT_332RGB

 frameAdrs - the starting frame buffer address in the video ram

You do not need to initialise other members.

Thanks,

Anatolij

SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary 
or legally privileged information. In case you are not the original intended 
Recipient of the message, you must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message and you are requested to 
delete it and inform the sender. Any views expressed in this message are those 
of the individual sender unless otherwise stated. Nothing contained in this 
message shall be construed as an offer or acceptance of any offer by Sasken 
Communication Technologies Limited ("Sasken") unless sent with that express 
intent and with due authority of Sasken. Sasken has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] Displaying characters on the display in u-boot

2013-03-27 Thread Bhargav A K
Hi All

I have been able to display a splash screen in u-boot by converting the splash 
image to a header (using GIMP)
and loading it into a GFX register (OMAP 4470).

Now I have to display text(character) on the display. I read about 
CONFIG_CFB_CONSOLE in the u-boot
documentation.
How exactly does it work, is it the right method to display characters on the 
screen ?
Please give me some direction with this issue..

Kind regards
Bhargav

SASKEN BUSINESS DISCLAIMER: This message may contain confidential, proprietary 
or legally privileged information. In case you are not the original intended 
Recipient of the message, you must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message and you are requested to 
delete it and inform the sender. Any views expressed in this message are those 
of the individual sender unless otherwise stated. Nothing contained in this 
message shall be construed as an offer or acceptance of any offer by Sasken 
Communication Technologies Limited ("Sasken") unless sent with that express 
intent and with due authority of Sasken. Sasken has taken enough precautions to 
prevent the spread of viruses. However the company accepts no liability for any 
damage caused by any virus transmitted by this email.
Read Disclaimer at http://www.sasken.com/extras/mail_disclaimer.html
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot