* unregister_framebuffer() and cursor
@ 2007-05-04 8:50 Geert Uytterhoeven
2007-05-04 9:42 ` Antonino A. Daplas
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2007-05-04 8:50 UTC (permalink / raw)
To: Linux Frame Buffer Device Development; +Cc: Geoff Levand
Hi,
It looks like unregister_framebuffer() doesn't cause fbcon_del_cursor_timer()
to be called.
Hence if cursor_timer_handler() runs, it will try to schedule work on
fb_info.queue, which is no longer valid, and queue_work() will BUG_ON().
Or am I missing something?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: unregister_framebuffer() and cursor
2007-05-04 8:50 unregister_framebuffer() and cursor Geert Uytterhoeven
@ 2007-05-04 9:42 ` Antonino A. Daplas
2007-05-25 10:13 ` Geert Uytterhoeven
0 siblings, 1 reply; 4+ messages in thread
From: Antonino A. Daplas @ 2007-05-04 9:42 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Geert.Uytterhoeven, Geoff Levand
On Fri, 2007-05-04 at 10:50 +0200, Geert Uytterhoeven wrote:
> Hi,
>
> It looks like unregister_framebuffer() doesn't cause fbcon_del_cursor_timer()
> to be called.
>
> Hence if cursor_timer_handler() runs, it will try to schedule work on
> fb_info.queue, which is no longer valid, and queue_work() will BUG_ON().
>
> Or am I missing something?
The console cursor is not part of fbdev. fbcon_del_cursor_timer() is
done in fbcon_exit() in fbcon.c. You cannot (or, rather, should not)
call unregister_framebuffer() unless fbcon unbinds the underlying
driver.
Tony
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: unregister_framebuffer() and cursor
2007-05-04 9:42 ` Antonino A. Daplas
@ 2007-05-25 10:13 ` Geert Uytterhoeven
2007-05-25 21:25 ` Antonino A. Daplas
0 siblings, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2007-05-25 10:13 UTC (permalink / raw)
To: Antonino A. Daplas; +Cc: linux-fbdev-devel, Geoff Levand
On Fri, 4 May 2007, Antonino A. Daplas wrote:
> On Fri, 2007-05-04 at 10:50 +0200, Geert Uytterhoeven wrote:
> > It looks like unregister_framebuffer() doesn't cause fbcon_del_cursor_timer()
> > to be called.
> >
> > Hence if cursor_timer_handler() runs, it will try to schedule work on
> > fb_info.queue, which is no longer valid, and queue_work() will BUG_ON().
> >
> > Or am I missing something?
>
> The console cursor is not part of fbdev. fbcon_del_cursor_timer() is
> done in fbcon_exit() in fbcon.c. You cannot (or, rather, should not)
> call unregister_framebuffer() unless fbcon unbinds the underlying
> driver.
Indeed, when unbinding the console first using
echo 0 > /sys/class/vtconsole/vtcon1/bind
the problem no longer happens on halt (Geoff: and ps3-hack-fbcon-shutdown.diff
is no longer needed).
However there are still a few remaining issues:
- unbinding requires CONFIG_VT_HW_CONSOLE_BINDING=y,
- unbinding can be done using sysfs only (for now),
- worse, unbinding may fail, e.g. if the console is in graphics mode due to
running X.
Our problem is that we have to shutdown ps3fb on reboot/kexec, to release the
hypervisor resources used by ps3fb. If unbinding fails, we cannot do that.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: unregister_framebuffer() and cursor
2007-05-25 10:13 ` Geert Uytterhoeven
@ 2007-05-25 21:25 ` Antonino A. Daplas
0 siblings, 0 replies; 4+ messages in thread
From: Antonino A. Daplas @ 2007-05-25 21:25 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-fbdev-devel, Geoff Levand
On Fri, 2007-05-25 at 12:13 +0200, Geert Uytterhoeven wrote:
> On Fri, 4 May 2007, Antonino A. Daplas wrote:
> > On Fri, 2007-05-04 at 10:50 +0200, Geert Uytterhoeven wrote:
> > > It looks like unregister_framebuffer() doesn't cause fbcon_del_cursor_timer()
> > > to be called.
> > >
> > > Hence if cursor_timer_handler() runs, it will try to schedule work on
> > > fb_info.queue, which is no longer valid, and queue_work() will BUG_ON().
> > >
> > > Or am I missing something?
> >
> > The console cursor is not part of fbdev. fbcon_del_cursor_timer() is
> > done in fbcon_exit() in fbcon.c. You cannot (or, rather, should not)
> > call unregister_framebuffer() unless fbcon unbinds the underlying
> > driver.
>
> Indeed, when unbinding the console first using
>
> echo 0 > /sys/class/vtconsole/vtcon1/bind
>
> the problem no longer happens on halt (Geoff: and ps3-hack-fbcon-shutdown.diff
> is no longer needed).
>
> However there are still a few remaining issues:
> - unbinding requires CONFIG_VT_HW_CONSOLE_BINDING=y,
> - unbinding can be done using sysfs only (for now),
> - worse, unbinding may fail, e.g. if the console is in graphics mode due to
> running X.
>
> Our problem is that we have to shutdown ps3fb on reboot/kexec, to release the
> hypervisor resources used by ps3fb. If unbinding fails, we cannot do that.
Both you and drmfb has the same problem, and Jesse submitted a patch
that will unbind fbcon prior to unregister_framebuffer(). The patch
needs a few tweaks but is fine by me in principle.
Search lkml for [PATCH 1/3] allow console unregistration.
As for the first, maybe a
'select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE' under ps3fb?
As for the second and third concerns, Jesse's patch would take care of
that.
Tony
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-05-25 21:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-04 8:50 unregister_framebuffer() and cursor Geert Uytterhoeven
2007-05-04 9:42 ` Antonino A. Daplas
2007-05-25 10:13 ` Geert Uytterhoeven
2007-05-25 21:25 ` Antonino A. Daplas
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).