linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: Antonino Daplas <adaplas@pol.net>
Cc: James Simmons <jsimmons@infradead.org>,
	linux-fbdev-devel@lists.sourceforge.net,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	luther@dpt-info.u-strasbg.fr
Subject: Re: [Linux-fbdev-devel] [PATCH] FBDev: vga16fb port
Date: Wed, 4 Dec 2002 11:38:24 +0100	[thread overview]
Message-ID: <95A78C92329@vcnet.vc.cvut.cz> (raw)

On  4 Dec 02 at 17:08, Antonino Daplas wrote:
> On Wed, 2002-12-04 at 12:32, Sven Luther wrote:
> > On Tue, Dec 03, 2002 at 05:22:35PM +0500, Antonino Daplas wrote:
> > > >   2) The ability to go back to vga text mode on close of /dev/fb. 
> > > >      Yes fbdev/fbcon supports that now. 
> > > 
> > > I'll take a stab at writing VGA save/restore routines which hopefully is
> > > generic enough to be used by various hardware.  No promises though, VGA
> > > programming gives me a headache :(
> > 
> > BTW, i am writing a fbdev for a card where the docs tell me to disable
> > vga output before enabling graphical output. Does i need to do this in
> > the fbdev i write, or is it already handled by the vga layer, or
> > whatever ?
> 
> Most cards with a VGA core needs to disable the VGA output before going
> to graphics mode.  Disabling VGA output is hardware specific, and is
> usually automatic when you go to graphics mode.
> 
> Because James wrote the fb framework to be very modular, then you must
> be careful to save/restore the initial video state  when loading or
> unloading.  Theoretically, a driver should load, but not go to graphics
> mode immediately.  Only upon a call to xxxfb_set_par() should the driver
> do so.  Before going to graphics mode, that's were you save the initial
> state.  Have a reference count or something to keep track of the number
> of users, and when this reference count becomes zero, restore the
> initial state.  You should be able to do this by hooking these routines
> in fb_open() and fb_release().

FYI, I'm not going to support any hardware restoration on last fb_release,
nor hardware init only after first fb_open in matroxfb. Either you want
this driver, or not. Besides that I do not see any reason to have such 
code, matroxfb provides multiple framebuffers, and to get them
all work, hardware must be in known state, it is impossible to program
only half of chip and expect that it will somehow work. It will crash,
lock your PCI bus, or even commits suicide.

And I'm sure that other possible solution, that opening /dev/fb1 
(or /dev/videoX or /dev/dri/mga) will cause your vgacon picture to 
disappear, violates principle of least surprise.
                                            Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

             reply	other threads:[~2002-12-04 10:38 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-04 10:38 Petr Vandrovec [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-11-28  7:24 [PATCH] FBDev: vga16fb port Antonino Daplas
2002-12-02 20:31 ` [Linux-fbdev-devel] " James Simmons
2002-12-03 12:22   ` Antonino Daplas
2002-12-03 15:47     ` Alan Cox
2002-12-03 20:50       ` Antonino Daplas
2002-12-03 22:01         ` James Simmons
2002-12-03 22:02       ` James Simmons
2002-12-04  3:19         ` Tomas Szepe
2002-12-04  7:32     ` Sven Luther
2002-12-04 12:08       ` Antonino Daplas
2002-12-04 10:28         ` Sven Luther
2002-12-04 17:27           ` Antonino Daplas
2002-12-04 16:47             ` Sven Luther
2002-12-05  1:04               ` Antonino Daplas
2002-12-05 17:35                 ` James Simmons
2002-12-05 18:03                   ` Sven Luther
2002-12-05 20:37                     ` James Simmons
2002-12-05 20:44                       ` Sven Luther
2002-12-06  0:50                         ` James Simmons
2002-12-06  1:36                         ` Antonino Daplas
2002-12-03 20:49   ` Antonino Daplas
2002-12-04 23:44     ` James Simmons

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=95A78C92329@vcnet.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=adaplas@pol.net \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luther@dpt-info.u-strasbg.fr \
    /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;
as well as URLs for NNTP newsgroup(s).