From: Knut Petersen <Knut_Petersen@t-online.de>
To: "Antonino A. Daplas" <adaplas@gmail.com>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Detect switching to X?
Date: Mon, 28 Nov 2005 14:46:02 +0100 [thread overview]
Message-ID: <438B0A1A.6010409@t-online.de> (raw)
In-Reply-To: <438AC4D9.9040603@gmail.com>
Hi Tony,
thanks for the quick reply.
>Try this patch.
>
>fb_save_state() will be called when going from KD_GRAPHICS to KD_TEXT. The
>driver has the opportunity here to save the current state of the hardware
>before it's touched by fbdev.
>fb_restore_state() will be called when going from KD_TEXT to KD_GRAPHICS
>mode. The driver has the opportunity to set the hardware back to something
>recognizable by the graphics application.
>
>
Are you sure? I added a save_state and restore_state function to
cyblafb, both
including nothing but a printk and return. I also added a printk at the
start of
both the check_var and set_par functions of cyblafb. The "Scrollmode=
..." lines
originate from a printk in updatescrollmode:
Loading of cyblafb and switching to it using the following commands:
echo -n "0" > /sys/class/graphics/fb0/con_rotate
echo -n "0" > /sys/class/graphics/fb1/con_rotate
con2fb /dev/fb0 /dev/tty1
rmmod cyblafb
sync
modprobe cyblafb scalign=4
con2fb /dev/fb1 /dev/tty1
echo -n "0" > /sys/class/graphics/fb0/con_rotate
echo -n "0" > /sys/class/graphics/fb1/con_rotate
setfont ~/lat9w-16.psfu.gz
rcgpm restart
echo -e '\033[?2c'
dmesg output:
[ 4910.034508] cyblafb: CyblaFB version 0.55 normal exit.
[ 4910.086590] cyblafb: CyblaFB version 0.55 initializing
[ 4910.088746] cyblafb: Pixmap size = 8188, alignement = 4
[ 4910.090688] ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKA] ->
GSI 11 (level, low) -> IRQ 11
[ 4910.094348] cyblafb: region 0x3c0/0x20 already reserved
[ 4910.096321] cyblafb: region 0xe1800000/0x800000 already reserved
[ 4910.098374] cyblafb: check_var
[ 4910.106050] cyblafb: set_par
[ 4910.108224] Scrollmode = SCROLL_PAN_MOVE
[ 4910.121050] Scrollmode = SCROLL_PAN_MOVE
[ 4910.138671] Scrollmode = SCROLL_PAN_MOVE
[ 4910.138763] Scrollmode = SCROLL_PAN_MOVE
[ 4910.180336] Scrollmode = SCROLL_PAN_MOVE
now switching to X:
[ 4921.533936] Scrollmode = SCROLL_PAN_REDRAW
now switching back to framebuffer console:
[ 4929.167382] cyblafb: set_par
[ 4929.169506] Scrollmode = SCROLL_PAN_MOVE
[ 4929.181895] cyblafb: save_state has been called, switching from
KD_GRAPHICS to KD_TEXT
[ 4929.181917] cyblafb: check_var
[ 4929.181929] cyblafb: set_par
[ 4929.184695] Scrollmode = SCROLL_PAN_MOVE
no switching to X again:
[ 4933.273261] Scrollmode = SCROLL_PAN_REDRAW
1. restore_state is never called
2. there is a set_par prior to the call to save_state, but that´s
irrelevant for me as
there is a check_var and set_par call after save_state.
cu,
Knut
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
next prev parent reply other threads:[~2005-11-28 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-27 6:12 Detect switching to X? Knut Petersen
2005-11-27 22:38 ` Antonino A. Daplas
2005-11-28 5:54 ` Knut Petersen
2005-11-28 7:31 ` Antonino A. Daplas
2005-11-28 8:12 ` Knut Petersen
2005-11-28 8:27 ` Antonino A. Daplas
2005-11-28 8:50 ` Antonino A. Daplas
2005-11-28 13:46 ` Knut Petersen [this message]
2005-11-28 14:25 ` Antonino A. Daplas
2005-11-28 15:12 ` Knut Petersen
2005-11-28 15:39 ` Antonino A. Daplas
2005-11-28 22:17 ` Knut Petersen
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=438B0A1A.6010409@t-online.de \
--to=knut_petersen@t-online.de \
--cc=adaplas@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.