All of lore.kernel.org
 help / color / mirror / Atom feed
* Framebuffer address and kernel video mode
@ 2009-02-05 20:44 phcoder
  2009-02-05 22:54 ` Colin D Bennett
  2009-02-07 22:54 ` Robert Millan
  0 siblings, 2 replies; 5+ messages in thread
From: phcoder @ 2009-02-05 20:44 UTC (permalink / raw)
  To: The development of GRUB 2

Hello. First of all some good news: I managed to boot xnu kernel. To do 
so I need to set it to video mode and pass video mode info to kernel. 
Now I do it in adapter-specific way which is bad and ugly. So I would 
like to propose an interface to set video mode before loading kernel and 
then retrieve information:
For this I propose to put grub_gfxterm_init lines 253 (modevar = 
grub_env_get ("gfxmode"))-482 (grub_video_fill_rect (...)) into video.c as
grub_video_setup_by_var (char *varname)
The informations I need is:

framebuffer address, bytes_per_scan_line, resolution, color depth

Unfortunately framebuffer_address and bytes_per_scanline is missing from 
  struct grub_video_mode_info. I propose to add it to this structure

Thanks
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framebuffer address and kernel video mode
  2009-02-05 20:44 Framebuffer address and kernel video mode phcoder
@ 2009-02-05 22:54 ` Colin D Bennett
  2009-02-06  6:11   ` phcoder
  2009-02-07 22:56   ` Robert Millan
  2009-02-07 22:54 ` Robert Millan
  1 sibling, 2 replies; 5+ messages in thread
From: Colin D Bennett @ 2009-02-05 22:54 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 1435 bytes --]

On Thu, 05 Feb 2009 21:44:59 +0100
phcoder <phcoder@gmail.com> wrote:

> Hello. First of all some good news: I managed to boot xnu kernel. To do 
> so I need to set it to video mode and pass video mode info to kernel. 
> Now I do it in adapter-specific way which is bad and ugly. So I would 
> like to propose an interface to set video mode before loading kernel and 
> then retrieve information:
> For this I propose to put grub_gfxterm_init lines 253 (modevar = 
> grub_env_get ("gfxmode"))-482 (grub_video_fill_rect (...)) into video.c as
> grub_video_setup_by_var (char *varname)
> The informations I need is:
> 
> framebuffer address, bytes_per_scan_line, resolution, color depth
> 
> Unfortunately framebuffer_address and bytes_per_scanline is missing from 
>   struct grub_video_mode_info. I propose to add it to this structure
> 
> Thanks
> Vladimir 'phcoder' Serbinenko

Well, we could do this, but I don't really like the idea of making
framebuffer address and bytes_per_scan line parts of the generic video
API.

I think it would be OK to make these data accessible as an optional
feature.  That is, potentially future video drivers might not use a
framebuffer. (OpenGL driver? :-)  The VBE driver can return the
framebuffer address, but if another driver can't provide it, then maybe
NULL is returned instead, and this would have to be handled by clients
of the video API.

Regards,
Colin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framebuffer address and kernel video mode
  2009-02-05 22:54 ` Colin D Bennett
@ 2009-02-06  6:11   ` phcoder
  2009-02-07 22:56   ` Robert Millan
  1 sibling, 0 replies; 5+ messages in thread
From: phcoder @ 2009-02-06  6:11 UTC (permalink / raw)
  To: The development of GRUB 2

Colin D Bennett wrote:
> feature.  That is, potentially future video drivers might not use a
> framebuffer. (OpenGL driver? :-) 

In this context I would think more about X11 or vnc driver

 > The VBE driver can return the
> framebuffer address, but if another driver can't provide it, then maybe
> NULL is returned instead, and this would have to be handled by clients
> of the video API.
That's why I proposed to pass variable name to the parameter. Not having 
a framebuffer address means that xnu will boot in blind mode. So one 
should be able to specify video drivers for grub and xnu separately:
E.g
gfxmode=vnc
[..]
menuentry "Darwin" {
     xnugfx=vbe
[...]
}
Thanks
Vladimir 'phcoder' Serbinenko



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framebuffer address and kernel video mode
  2009-02-05 20:44 Framebuffer address and kernel video mode phcoder
  2009-02-05 22:54 ` Colin D Bennett
@ 2009-02-07 22:54 ` Robert Millan
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Millan @ 2009-02-07 22:54 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Feb 05, 2009 at 09:44:59PM +0100, phcoder wrote:
> Hello. First of all some good news: I managed to boot xnu kernel. To do 
> so I need to set it to video mode and pass video mode info to kernel. 
> Now I do it in adapter-specific way which is bad and ugly. So I would 
> like to propose an interface to set video mode before loading kernel and 
> then retrieve information:
> For this I propose to put grub_gfxterm_init lines 253 (modevar = 
> grub_env_get ("gfxmode"))-482 (grub_video_fill_rect (...)) into video.c as
> grub_video_setup_by_var (char *varname)
> The informations I need is:
> 
> framebuffer address, bytes_per_scan_line, resolution, color depth
> 
> Unfortunately framebuffer_address and bytes_per_scanline is missing from 
>  struct grub_video_mode_info. I propose to add it to this structure

This is VERY nice.  Maybe we can make the Linux loader do the same, once we
switch to loader/i386/linux.c (current loader is loader/i386/pc/linux.c).

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Framebuffer address and kernel video mode
  2009-02-05 22:54 ` Colin D Bennett
  2009-02-06  6:11   ` phcoder
@ 2009-02-07 22:56   ` Robert Millan
  1 sibling, 0 replies; 5+ messages in thread
From: Robert Millan @ 2009-02-07 22:56 UTC (permalink / raw)
  To: The development of GRUB 2

On Thu, Feb 05, 2009 at 02:54:28PM -0800, Colin D Bennett wrote:
> 
> Well, we could do this, but I don't really like the idea of making
> framebuffer address and bytes_per_scan line parts of the generic video
> API.
> 
> I think it would be OK to make these data accessible as an optional
> feature.  That is, potentially future video drivers might not use a
> framebuffer.

Being optional should be no problem IMO, but please don't make it unportable
by requiring clients to access VBE directly.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-07 22:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-05 20:44 Framebuffer address and kernel video mode phcoder
2009-02-05 22:54 ` Colin D Bennett
2009-02-06  6:11   ` phcoder
2009-02-07 22:56   ` Robert Millan
2009-02-07 22:54 ` Robert Millan

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.