All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marco Gerards <mgerards@xs4all.nl>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: Video subsystem draft
Date: Sat, 10 Dec 2005 22:01:53 +0100	[thread overview]
Message-ID: <877jacmzsu.fsf@xs4all.nl> (raw)
In-Reply-To: <439AAE9A.3050504@nic.fi> (Vesa Jääskeläinen's message of "Sat, 10 Dec 2005 12:31:54 +0200")

Vesa Jääskeläinen <chaac@nic.fi> writes:

>> First of all I'd like to see some double buffering feature.  Will that
>> be somehow possible?  In that case we need functions like:
>> 
>> - Switching to a buffer, making it visible.
>> - Selecting which buffer is used for output.
>
> Yes, double buffering is possible of course ;) It's not even hard one.
> There are some issues that must be decided.
>
> Most important one is, what you want to do with double buffer, do you
> want access to actual pixel data? Should this access be hidden or
> emulated. What happens when there are different graphics modes. Do we
> need to implement pixel data conversion layer.
>
> Or do you want only to hide some possible artifacts? Eg. having many
> changes to whole screen per refresh cycle? Current idea was only draw to
> screen when there is something new to draw.

Right, but in that case you can draw to another buffer and just
switch.  Usually that switch changing a pointer or offset in a
register of your video card.

> Now if we assume that there will be double buffering then there is
> problem where the actual data is stored. As we don't have fancy drivers
> for each video card there, we must use provided features of VBE (or
> similar interface).

If double buffering is not available we have to make a copy of the
buffer to the video memory.

> In banked modes, switching the bank can be slow, and if we require that
> double buffer is store on video memory, accessing (read&write) can be
> slow. It could also limit some modes from user as there is no room for
> double buffer. And worst case is here that some implementations of VBE
> can be buggy in this case... Ever seen div by zero from video bios ;) ?

AFAIK you can access all video memory from protected mode without bank
switching.  Please correct me if I am wrong.  Anyways, we can always
implement double buffering in software or make it optional or so.

> If we store this memory to host memory, then accessing it is fast, but
> swapping the whole screen can be slow. We could of course implement some
> dirty regions to optimize transfer time. Now if you want direct access
> to frame buffer data (read&write) then who is responsible to make sure
> pixel data is correct for the display? Do we need to convert pixel data
> on transfer?

In that case the pixel data should be correct for the display so it
can be directly copied.

Anyways, if the hardware is capable of doing double buffer, I would
prefer that to avoid flickering.  It could be optional or so.  But it
would be nice if the option is there.

> My idea was following in current implementation:
> - Supply basic operations on video driver
> - If there is complex graphics needed, use bitmap (it would have
> transparency support)

How would it support transparency?

> - When bitmap is loaded, it would be converted to device compatible bitmap

Sounds sane.

> - If there is a need to generate bitmap data, it should be done in
> emulated pixel buffer (something like R8G8B8A8) and then converted to
> device compatible bitmap.

Ok.

--
Marco




  reply	other threads:[~2005-12-10 21:02 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-23 11:24 Video subsystem draft Vesa Jääskeläinen
2005-10-23 15:03 ` Timothy Baldwin
2005-10-23 15:24   ` Vesa Jääskeläinen
2005-10-28  3:21 ` Yoshinori K. Okuji
2005-10-28 13:59   ` Vesa Jääskeläinen
2005-11-17 23:19     ` Vesa Jääskeläinen
2005-11-18 11:06       ` Yoshinori K. Okuji
2005-11-22 19:06         ` Vesa Jääskeläinen
2005-11-25 20:25           ` Yoshinori K. Okuji
2005-11-26  0:28             ` Vesa Jääskeläinen
2005-11-26 14:36               ` Vincent Pelletier
2005-11-26 19:54                 ` Yoshinori K. Okuji
2005-11-27  1:48                 ` Vesa Jääskeläinen
2005-12-09 22:44                   ` Marco Gerards
2005-12-10  0:19                     ` Yoshinori K. Okuji
2005-12-10 10:31                     ` Vesa Jääskeläinen
2005-12-10 21:01                       ` Marco Gerards [this message]
2005-12-10 21:23                         ` Vesa Jääskeläinen
2005-12-10 20:48                     ` Vesa Jääskeläinen
2005-12-10 21:15                       ` Marco Gerards
2005-12-10 22:14                         ` Vesa Jääskeläinen
2005-12-10 22:32                           ` Marco Gerards
2005-12-10 23:11                             ` Vesa Jääskeläinen
2005-11-27  2:00                 ` Vesa Jääskeläinen
2005-11-26 19:52               ` Yoshinori K. Okuji
2005-11-27  2:09                 ` Vesa Jääskeläinen
2005-12-09 22:33                   ` Marco Gerards
2005-11-28 21:29               ` Vesa Jääskeläinen
2005-12-06 15:18                 ` Vesa Jääskeläinen

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=877jacmzsu.fsf@xs4all.nl \
    --to=mgerards@xs4all.nl \
    --cc=grub-devel@gnu.org \
    /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.