linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [directfb-dev] printk on framebuffer console
       [not found] <447C03C6.3000805@singnet.com.sg>
@ 2006-05-30 12:17 ` Antonino A. Daplas
  2006-05-31  0:45   ` Terence Soh
  0 siblings, 1 reply; 10+ messages in thread
From: Antonino A. Daplas @ 2006-05-30 12:17 UTC (permalink / raw)
  To: Terence Soh; +Cc: directfb-dev, Linux Fbdev development list

Terence Soh wrote:
> Hi,
> 
> I'm seeking advise on getting printk displayed on the framebuffer console.

You're better off sending this to linux-fbdev-devel, so I'm adding
this to the CC list.

> 
> My display is RGB555 VGA resolution and I using the mainline kernel 
> font_8x8 for fonts and I've disabled the serial console and tile 
> blitting support. At the moment, the printk are printing black lines on 
> the screen instead of the printk statements.
> 
> In bitblit.c bit_putcs(),the image.depth = 1. Is this correct for my 
> application?
> 
> Also is font_8x8 suitable for 16 bit screens? It seems  like it's meant 
> for monochrome display.

Yes, the monochrome bitmap are expanded to the current foreground and
background colors of the console.

First, make sure that writing directly to the framebuffer memory displays
something properly on your monitor.

Then make sure that your driver has a working xxxfb_setcolreg function()
and that info->pseudo_palette is properly filled up.

Make sure also that info->var and info->fix are correctly set.

Tony


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* printk on framebuffer console
  2006-05-30 12:17 ` [directfb-dev] printk on framebuffer console Antonino A. Daplas
@ 2006-05-31  0:45   ` Terence Soh
  2006-05-31  0:54     ` Antonino A. Daplas
  0 siblings, 1 reply; 10+ messages in thread
From: Terence Soh @ 2006-05-31  0:45 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Linux Fbdev development list

> You're better off sending this to linux-fbdev-devel, so I'm adding
> this to the CC list.
Thanks for the tip!

> 
> Yes, the monochrome bitmap are expanded to the current foreground and
> background colors of the console.
Would I be better off using vgacon?

> 
> First, make sure that writing directly to the framebuffer memory displays
> something properly on your monitor.
> 
Yes, I've got the fbcon_logo working and the fb0 working with 
QT-embedded. The problem is that printk doesn't work in fb console only 
in serial console.

> Then make sure that your driver has a working xxxfb_setcolreg function()
> and that info->pseudo_palette is properly filled up.
> 
Are xxxfb_setcolreg function() and info->pseudo_palette necessary for 
FB_VISUAL_TRUECOLOR? I thought it's required for FB_VISUAL_PSEUDOCOLOR.

Terence.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: printk on framebuffer console
  2006-05-31  0:45   ` Terence Soh
@ 2006-05-31  0:54     ` Antonino A. Daplas
  2006-05-31  1:47       ` Terence Soh
  0 siblings, 1 reply; 10+ messages in thread
From: Antonino A. Daplas @ 2006-05-31  0:54 UTC (permalink / raw)
  To: Terence Soh; +Cc: Linux Fbdev development list

Terence Soh wrote:
>> You're better off sending this to linux-fbdev-devel, so I'm adding
>> this to the CC list.
> Thanks for the tip!
> 
>>
>> Yes, the monochrome bitmap are expanded to the current foreground and
>> background colors of the console.
> Would I be better off using vgacon?

Well, depends on what you want.  If you just want pure text, then
vgacon should suit your needs just fine.

> 
>>
>> First, make sure that writing directly to the framebuffer memory displays
>> something properly on your monitor.
>>
> Yes, I've got the fbcon_logo working and the fb0 working with
> QT-embedded. The problem is that printk doesn't work in fb console only
> in serial console.

If you can display the logo, then you're very nearly done.

> 
>> Then make sure that your driver has a working xxxfb_setcolreg function()
>> and that info->pseudo_palette is properly filled up.
>>
> Are xxxfb_setcolreg function() and info->pseudo_palette necessary for
> FB_VISUAL_TRUECOLOR? I thought it's required for FB_VISUAL_PSEUDOCOLOR.
> 

Other way around, the info->pseudo_palette is needed for truecolor and
directcolor.  So fill this array properly, and you should be good to go.
Look at any driver (ie vesafb.c) on how it's done.

Tony 


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: printk on framebuffer console
  2006-05-31  0:54     ` Antonino A. Daplas
@ 2006-05-31  1:47       ` Terence Soh
  2006-05-31  4:16         ` Antonino A. Daplas
  0 siblings, 1 reply; 10+ messages in thread
From: Terence Soh @ 2006-05-31  1:47 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Linux Fbdev development list

>>Are xxxfb_setcolreg function() and info->pseudo_palette necessary for
>>FB_VISUAL_TRUECOLOR? I thought it's required for FB_VISUAL_PSEUDOCOLOR.
>>
> 
> 
> Other way around, the info->pseudo_palette is needed for truecolor and
> directcolor.  So fill this array properly, and you should be good to go.
> Look at any driver (ie vesafb.c) on how it's done.
> 
Thanks Tony,

Turned out that I was missing the xxxfb_setcolreg function() and 
info->pseudo_palette. Once that's done, the console is appearing on the 
framebuffer.

Another question. The console only prints starting from the scripts in 
/etc/init.d/rcS , the printk messages from the various drivers are 
missing. My kernel command line is "console=ttyS0 root=/dev/mtdblock3 
rootfstype=jffs2". Is there any reason why?

Terence.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: printk on framebuffer console
  2006-05-31  1:47       ` Terence Soh
@ 2006-05-31  4:16         ` Antonino A. Daplas
  2006-05-31  8:17           ` Terence Soh
  2006-05-31  9:05           ` Geert Uytterhoeven
  0 siblings, 2 replies; 10+ messages in thread
From: Antonino A. Daplas @ 2006-05-31  4:16 UTC (permalink / raw)
  To: Terence Soh; +Cc: Linux Fbdev development list

Terence Soh wrote:
>>> Are xxxfb_setcolreg function() and info->pseudo_palette necessary for
>>> FB_VISUAL_TRUECOLOR? I thought it's required for FB_VISUAL_PSEUDOCOLOR.
>>>
>>
>>
>> Other way around, the info->pseudo_palette is needed for truecolor and
>> directcolor.  So fill this array properly, and you should be good to go.
>> Look at any driver (ie vesafb.c) on how it's done.
>>
> Thanks Tony,
> 
> Turned out that I was missing the xxxfb_setcolreg function() and
> info->pseudo_palette. Once that's done, the console is appearing on the
> framebuffer.
> 
> Another question. The console only prints starting from the scripts in
> /etc/init.d/rcS , the printk messages from the various drivers are
> missing. My kernel command line is "console=ttyS0 root=/dev/mtdblock3
> rootfstype=jffs2". Is there any reason why?

Remove the console=ttyS0 from your boot parameter (or change it to tty0)
and the system messages should go to the framebuffer console.

Tony


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: printk on framebuffer console
  2006-05-31  4:16         ` Antonino A. Daplas
@ 2006-05-31  8:17           ` Terence Soh
  2006-05-31 11:11             ` Antonino A. Daplas
  2006-05-31 14:45             ` Marcin Juszkiewicz
  2006-05-31  9:05           ` Geert Uytterhoeven
  1 sibling, 2 replies; 10+ messages in thread
From: Terence Soh @ 2006-05-31  8:17 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Linux Fbdev development list

> Remove the console=ttyS0 from your boot parameter (or change it to tty0)
> and the system messages should go to the framebuffer console.
You're right, that worked.

Is there any way I can disable the printf/printk once my QT-Embedded 
application starts?

Terence.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: printk on framebuffer console
  2006-05-31  4:16         ` Antonino A. Daplas
  2006-05-31  8:17           ` Terence Soh
@ 2006-05-31  9:05           ` Geert Uytterhoeven
  1 sibling, 0 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2006-05-31  9:05 UTC (permalink / raw)
  To: Linux Fbdev development list; +Cc: Terence Soh

On Wed, 31 May 2006, Antonino A. Daplas wrote:
> Terence Soh wrote:
> >>> Are xxxfb_setcolreg function() and info->pseudo_palette necessary for
> >>> FB_VISUAL_TRUECOLOR? I thought it's required for FB_VISUAL_PSEUDOCOLOR.
> >>>
> >>
> >>
> >> Other way around, the info->pseudo_palette is needed for truecolor and
> >> directcolor.  So fill this array properly, and you should be good to go.
> >> Look at any driver (ie vesafb.c) on how it's done.
> >>
> > Thanks Tony,
> > 
> > Turned out that I was missing the xxxfb_setcolreg function() and
> > info->pseudo_palette. Once that's done, the console is appearing on the
> > framebuffer.
> > 
> > Another question. The console only prints starting from the scripts in
> > /etc/init.d/rcS , the printk messages from the various drivers are
> > missing. My kernel command line is "console=ttyS0 root=/dev/mtdblock3
> > rootfstype=jffs2". Is there any reason why?
> 
> Remove the console=ttyS0 from your boot parameter (or change it to tty0)
> and the system messages should go to the framebuffer console.

Or use `console=ttyS0 console=tty0' to get kernel messages on both.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: printk on framebuffer console
  2006-05-31  8:17           ` Terence Soh
@ 2006-05-31 11:11             ` Antonino A. Daplas
  2006-05-31 11:32               ` Terence Soh
  2006-05-31 14:45             ` Marcin Juszkiewicz
  1 sibling, 1 reply; 10+ messages in thread
From: Antonino A. Daplas @ 2006-05-31 11:11 UTC (permalink / raw)
  To: Terence Soh; +Cc: Linux Fbdev development list

Terence Soh wrote:
>> Remove the console=ttyS0 from your boot parameter (or change it to tty0)
>> and the system messages should go to the framebuffer console.
> You're right, that worked.
> 
> Is there any way I can disable the printf/printk once my QT-Embedded
> application starts?

The simplest solution is to write a utility that opens /dev/tty0
for example, then do an ioctl,

ioctl(fd, KDSETMODE, KD_GRAPHICS);

where fd is the file descriptor of /dev/tty0 for instance.

To get back your console, do this:

ioctl(fd, KDSETMODE, KD_TEXT);

Tony




-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: printk on framebuffer console
  2006-05-31 11:11             ` Antonino A. Daplas
@ 2006-05-31 11:32               ` Terence Soh
  0 siblings, 0 replies; 10+ messages in thread
From: Terence Soh @ 2006-05-31 11:32 UTC (permalink / raw)
  To: Antonino A. Daplas; +Cc: Linux Fbdev development list

> The simplest solution is to write a utility that opens /dev/tty0
> for example, then do an ioctl,
> 
> ioctl(fd, KDSETMODE, KD_GRAPHICS);
> 
> where fd is the file descriptor of /dev/tty0 for instance.
> 
> To get back your console, do this:
> 
> ioctl(fd, KDSETMODE, KD_TEXT);
Tony,

Thanks for your help!

Terence


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Re: printk on framebuffer console
  2006-05-31  8:17           ` Terence Soh
  2006-05-31 11:11             ` Antonino A. Daplas
@ 2006-05-31 14:45             ` Marcin Juszkiewicz
  1 sibling, 0 replies; 10+ messages in thread
From: Marcin Juszkiewicz @ 2006-05-31 14:45 UTC (permalink / raw)
  To: linux-fbdev-devel

Dnia ¶roda, 31 maja 2006 10:17, Terence Soh napisa³:

> Is there any way I can disable the printf/printk once my QT-Embedded
> application starts?

You can try to use vt-switch.patch [1] from OpenEmbedded. This add option
"-terminal" which we use to move OPIE to VT2.

1. http://www.openembedded.org/repo/org.openembedded.dev/packages/qte/qte-2.3.10/vt-switch.patch

-- 
JID: hrw-jabber.org
Sharp Zaurus C-760 (OZ 3.5.x)
OpenEmbedded/OpenZaurus/OPIE developer

          It's better to keep your mouth shut and appear stupid,
          than to open it and remove all doubt.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x107521&bid$8729&dat\x121642

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-05-31 14:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <447C03C6.3000805@singnet.com.sg>
2006-05-30 12:17 ` [directfb-dev] printk on framebuffer console Antonino A. Daplas
2006-05-31  0:45   ` Terence Soh
2006-05-31  0:54     ` Antonino A. Daplas
2006-05-31  1:47       ` Terence Soh
2006-05-31  4:16         ` Antonino A. Daplas
2006-05-31  8:17           ` Terence Soh
2006-05-31 11:11             ` Antonino A. Daplas
2006-05-31 11:32               ` Terence Soh
2006-05-31 14:45             ` Marcin Juszkiewicz
2006-05-31  9:05           ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).