All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Andrew Morton <akpm@osdl.org>,
	benh@kernel.crashing.org,
	Knut Petersen <Knut_Petersen@t-online.de>
Subject: Re: BUG: fb_imageblit called before fb_check_var and fb_set_par function
Date: Sat, 27 Aug 2005 08:36:36 +0800	[thread overview]
Message-ID: <430FB594.9040901@gmail.com> (raw)
In-Reply-To: <430F5D92.4080300@t-online.de>

Knut Petersen wrote:
> 
>> This has been discussed before.  Not all hardware can do a set_par()
>> instantaneously, some may require seconds.  And that will become a 
>> usability
>> problem. Just imagine switching from one console to another and it takes
>> 5 seconds.
> 
> That would be unacceptable, agreed. But it´s also not really acceptable 
> to risk to execute a few
> dozend imageblits in redraw_screen() while the hardware might be in an 
> unusable state.

It doesn't. but it depends what you mean by unusable state. In the
console/fbcon/fbdev subsystem an unusable state can be any of the ff:

	- KD_GRAPHICS mode
	- between coming from KD_GRAPHICS to KD_TEXT and before set_par()
	- graphics device in a suspended state 

If any the above are true, no drawing functions gets called.

> Checking
> for that situation every imageblit would have a big performance penalty.
> 

Maybe. I've measured this before, you lose something like 3-5%.  Hardly
noticeable in real-world usage. So I would gladly sacrifice a little
performance for stability. Doing a set_par() for each switch, in turn,
will be noticeable and is a great blow to usability.  It really boils down
to a balance between usability, stability and performance.  Throw in code
readability and maintainability also.

(Note: In the case of a bug in an app that runs as root, I think everyone will
agree that the bug must be fixed in the app, not the kernel.)

(Note 2: Even with those checks in place, the 2.6 framebuffer system is still
faster than 2.4)

Tony


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

      reply	other threads:[~2005-08-27  0:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-25 12:26 BUG: fb_imageblit called before fb_check_var and fb_set_par function Knut Petersen
2005-08-25 14:05 ` Antonino A. Daplas
2005-08-25 15:59   ` Knut Petersen
2005-08-25 18:09     ` Antonino A. Daplas
2005-08-26  8:23       ` Knut Petersen
2005-08-26 14:01         ` Antonino A. Daplas
2005-08-26 16:30           ` Knut Petersen
2005-08-26 17:00             ` Antonino A. Daplas
2005-08-26 18:21               ` Knut Petersen
2005-08-27  0:36                 ` Antonino A. Daplas [this message]

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=430FB594.9040901@gmail.com \
    --to=adaplas@gmail.com \
    --cc=Knut_Petersen@t-online.de \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --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.