All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Knut Petersen <Knut_Petersen@t-online.de>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Detect switching to X?
Date: Mon, 28 Nov 2005 15:31:24 +0800	[thread overview]
Message-ID: <438AB24C.60405@gmail.com> (raw)
In-Reply-To: <438A9BA8.3070600@t-online.de>

Knut Petersen wrote:
> Hi Tony
> 
>>>
>>> Is there any way for a framebuffer driver to detect that a switch
>>> to X is in progress?
>>>   
>>
>> None, although fbcon will detect switches from KD_TEXT<->KD_GRAPHICS. I'm
>> thinking of adding optional fb_save_state() and fb_restore_state() hooks
>> which fbcon will call before going to KD_TEXT and before going to
>> KD_GRAPHICS respectively.
>>
>> I have the code in my development tree since one of the drivers does
>> not work with the experimental DRI driver. The DRI driver does not fully
>> restore its hardware state so the fbdev driver has to do the restore
>> for it.
>>
>>  
>>
> Please do submit that code as a patch to the main kernel tree as soon as
> possible.
> 

The patch is not really palatable.  It is a patch that attempts to fix
bugs in X, not fbcon.  Unless the problem is really widespread, then maybe
I'll go for it for mainline.

> I cannot take advantage of the full memory reserved for the
> cyberblade/i1 because
> the trident X driver only knows about the vga style way of setting the
> screen start
> address. The other way involves the usage of the register at GEBase +
> 0x10, but
> that disables the vga style setting completely.
> 
> There is one alternative way: I could hook somewhere into a periodically
> called
> interrupt, put some insane value into the vga style regs and check for a
> change.
> Then I would assume that X has switched to KD_GRAPHICS and enable the
> vga style again.

You need not do that (do a periodic check).  A set_par() will always be
called by fbcon whenever the console transitions from KD_GRAPHICS to
KD_TEXT.  So all you need to do is possibly check some register that says
the hardware is in legacy mode.

Tony


-------------------------------------------------------
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

  reply	other threads:[~2005-11-28  7:32 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 [this message]
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
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=438AB24C.60405@gmail.com \
    --to=adaplas@gmail.com \
    --cc=Knut_Petersen@t-online.de \
    --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.