mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rick L. Vinyard, Jr." <rvinyard@cs.nmsu.edu>
To: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
Cc: "Greg KH" <greg@kroah.com>,
	"Linux USB" <linux-usb@vger.kernel.org>,
	"LKML" <linux-kernel@vger.kernel.org>
Subject: Re: Dynamically attaching fbcon to a framebuffer
Date: Wed, 2 Dec 2009 10:06:41 -0700	[thread overview]
Message-ID: <37885b84bd22291f359459562a674222.squirrel@intranet.cs.nmsu.edu> (raw)
In-Reply-To: <20091125200910.0377bc0c@lxorguk.ukuu.org.uk>

Alan Cox wrote:
>> I have the display as a framebuffer device now (based on fbdefio with
>> the
>> hid device as the parent).
>>
>> Do I really need a separate console device or can I just use fbcon?
>
> fbcon should do what you want.
>

I've been playing with fbcon, but can't get a fbcon console started.

I wrote a little app that uses the framebuffer ioctls to change fbcon's
map. Specifically, the G13 shows up as fb1, and the app basically does
this:

  int fd = open("/dev/fb1", O_RDWR);
  struct fb_con2fbmap con2fb;
  int ret;

  if ( fd < 0 ) { printf("Error opening %s\n", DEVICE); return -1; }

  con2fb.console = 5;

  ioctl(fd, FBIOGET_CON2FBMAP, &con2fb);
  printf("Console: %d  Framebuffer: %d\n", con2fb.console,
con2fb.framebuffer);

  con2fb.framebuffer = 1;
  ret = ioctl(fd, FBIOPUT_CON2FBMAP, &con2fb);
  printf("Succeeded: %d\n", ret);

  ioctl(fd, FBIOGET_CON2FBMAP, &con2fb);
  printf("Console: %d  Framebuffer: %d\n", con2fb.console,
con2fb.framebuffer);

This succeeds and I get:
Console: 5  Framebuffer: 0
Succeeded: 0
Console: 5  Framebuffer: 1

But, when I change to console 5 that's when things die. I never hit any of
my fb_ops callbacks.

The driver can be found here:
http://g13.svn.sourceforge.net/viewvc/g13/driver/trunk/hid-g13.h
http://g13.svn.sourceforge.net/viewvc/g13/driver/trunk/hid-g13.c

This doesn't actually do anything but do a printk (in hex) of the
framebuffer memory.

When I modify the framebuffer through a mmap I don't have any problems,
but when I switch to the console the kernel hangs.

I'm currently recompiling the kernel with FBCONDEBUG defined and I'll test
from there.

Any other suggestions on how to approach this?

Thanks,

---

Rick



  reply	other threads:[~2009-12-02 17:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 14:55 Purpose of parameter in sysfs binary read Rick L. Vinyard, Jr.
2009-08-18 15:14 ` Greg KH
2009-08-18 15:41   ` Rick L. Vinyard, Jr.
2009-08-18 16:02     ` Greg KH
2009-08-18 17:46       ` Rick L. Vinyard, Jr.
2009-08-19 16:05     ` Alan Cox
2009-08-19 17:41       ` Rick L. Vinyard, Jr.
2009-08-19 18:11         ` Greg KH
2009-08-19 18:26           ` Rick L. Vinyard, Jr.
2009-08-19 18:19         ` Alan Cox
2009-08-19 18:25           ` Rick L. Vinyard, Jr.
2009-08-19 18:34             ` Alan Cox
2009-11-25 19:19               ` Rick L. Vinyard, Jr.
2009-11-25 20:09                 ` Alan Cox
2009-12-02 17:06                   ` Rick L. Vinyard, Jr. [this message]
2009-08-25 11:36         ` Pavel Machek
2009-08-18 15:16 ` Alan Stern
2009-08-18 15:43   ` Rick L. Vinyard, Jr.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37885b84bd22291f359459562a674222.squirrel@intranet.cs.nmsu.edu \
    --to=rvinyard@cs.nmsu.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®