Skip to contentSkip to conversation

Rotated menu on EFI?

DISCUSSION Michal Suchanek 3 participants 10 messages Jul 24, 2009 – Jul 29, 2009

lore
Share & tools
lore
#0 lore raw

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

Thanks

Michal

#1 lore raw
Quoted 4 lines · Michal Suchanek

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

I'm not sure what you mean by rotation. You mean that arrow keys navigate back to the top when pressing "down" in the bottom?

Signature · 5 lines
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."
#2 lore raw

2009/7/25 Robert Millan <[email protected]>:

Quoted 9 lines · Michal Suchanek
Quoted 4 lines

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

I'm not sure what you mean by rotation.  You mean that arrow keys navigate back to the top when pressing "down" in the bottom?

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

Thanks

Michal

#3 lore raw
Quoted 4 lines

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

This would require
(a) video support for EFI. This is simple to implement once framebuffer split is in
(b) rotation support in gfxterm. Patches are welcome

Quoted 11 lines

Thanks

Michal

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
#4 lore raw

2009/7/25 Vladimir 'phcoder' Serbinenko <[email protected]>:

Quoted 8 lines
Quoted 4 lines

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

This would require
(a) video support for EFI. This is simple to implement once framebuffer split is in
(b) rotation support in gfxterm. Patches are welcome

I was able to run gfxterm in qemu.

Looking at the VideoSubsystem I wonder at what level the rotation should be implemented. It could probably be done in gfxterm and blit_glyph only which would be quite simple.

True video rotation would be somewhat harder but transparent to other users of the video subsystem. Most functions could just go through a simple remapping of coordinates except for the bitmap storing and blitting functions. Rotated blitting is obviously somewhat harder and slower (unless done by real video hardware) and rotating the stored bitmaps is not very nice either.

I found two problems while trying to get gfxterm running.

The first one is with grub_mkrescue: it seems to ignore --modules= option. I specified --modules=gfxterm but gfxterm still has to be loaded in the grub.cfg. Another problem with this option is that the format is unspecified. Are the modules separated by commas, spaces, or other separators?

The other problem is graphics initialization. Unless I run "vbetest" before "terminal_output gfxterm" gfxterm says "no suitable videomode found".

Thanks

Michal

#5 lore raw
In reply to Michal Suchanek
Quoted 7 lines · Michal Suchanek

2009/7/25 Robert Millan <[email protected]>:

Quoted 6 lines · Michal Suchanek
Quoted 4 lines

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

Quoted 7 lines
Quoted 3 lines

I'm not sure what you mean by rotation.  You mean that arrow keys navigate back to the top when pressing "down" in the bottom?

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

As Vladimir points out, this can eventually work on EFI too, but EFI is lagging behind when it comes to graphical support. In any case, if we really want to support rotation it should be generic.

Btw, were you thinking about rotation in multiples of PI/2, or arbitrary floats? The former is not too hard, but the latter can be a PITA, I don't think it's worth it.

Signature · 5 lines
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."
#6 lore raw
Quoted 13 lines · Robert Millan
Quoted 12 lines · Michal Suchanek

2009/7/25 Robert Millan <[email protected]>:

Quoted 9 lines · Michal Suchanek
Quoted 4 lines

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

I'm not sure what you mean by rotation.  You mean that arrow keys navigate back to the top when pressing "down" in the bottom?

Quoted 7 lines
Quoted 2 lines

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

As Vladimir points out, this can eventually work on EFI too, but EFI is lagging behind when it comes to graphical support.  In any case, if we really want to support rotation it should be generic.

Yes. As about where to put it I would say to driver so it can be accelerated if it's possible. For non-accelerated targets rotation function will be in video_fb.mod

Quoted 17 lines

Btw, were you thinking about rotation in multiples of PI/2, or arbitrary floats?  The former is not too hard, but the latter can be a PITA, I don't think it's worth it.

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

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
#8 lore raw
In reply to Robert Millan

2009/7/28 Robert Millan <[email protected]>:

Quoted 16 lines · Michal Suchanek
Quoted 7 lines

2009/7/25 Robert Millan <[email protected]>:

Quoted 6 lines · Michal Suchanek
Quoted 4 lines

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

Quoted 7 lines
Quoted 3 lines

I'm not sure what you mean by rotation.  You mean that arrow keys navigate back to the top when pressing "down" in the bottom?

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

Quoted 7 lines

As Vladimir points out, this can eventually work on EFI too, but EFI is lagging behind when it comes to graphical support.  In any case, if we really want to support rotation it should be generic.

Btw, were you thinking about rotation in multiples of PI/2, or arbitrary floats?  The former is not too hard, but the latter can be a PITA, I don't think it's worth it.

I am thinking about the rotation which is required to turn a landscape monitor into a portrait one which is commonly used.

It is technically possible to arbitrarily rotate the picture but then you would need support for arbitrary screen shapes (shapes other than rectangles parallel with the axis) which is quite pointless for grub.

On second thought adding general rotation would be probably simpler than changing gfxterm to do the rotation by itself. It gives much better code separation and manageability.

The only problem is that there is a possibility to upload bitmaps into the video subsystem and rotating these would need additional memory because I know no way of rotating a non-square bitmap in place. Even if the bitmaps were rotated only when they are actually used it still requires additional memory.

Thanks

Michal

#9 lore raw
Quoted 4 lines

I am thinking about the rotation which is required to turn a landscape monitor into a portrait one which is commonly used.

Quoted 8 lines

It is technically possible to arbitrarily rotate the picture but then you would need support for arbitrary screen shapes (shapes other than rectangles parallel with the axis) which is quite pointless for grub.

On second thought adding general rotation would be probably simpler than changing gfxterm to do the rotation by itself. It gives much better code separation and manageability.

Adding rotation to arbitrary angle would require implementing of sines and cosines. And this risks to be terribly slow. Additionally few gfx drivers support such rotation. I really see no reason for such headache for us either. To make long story short rotation to arbitrary angle is a NO WAY as far as I'm concerned

Quoted 11 lines

Thanks

Michal

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 4 lines
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
#7 lore raw
In reply to Vladimir 'phcoder' Serbinenko

2009/7/28 Vladimir 'phcoder' Serbinenko <[email protected]>:

Quoted 17 lines · Robert Millan
Quoted 16 lines · Michal Suchanek
Quoted 14 lines

2009/7/25 Robert Millan <[email protected]>:

Quoted 9 lines · Michal Suchanek
Quoted 4 lines

Hello

Is there some chance that the grub menu could be drawn rotated on graphical devices like the efi graphics interface?

I'm not sure what you mean by rotation.  You mean that arrow keys navigate back to the top when pressing "down" in the bottom?

No, I mean that the arrow keys work normally but the menu is drawn rotated to match the screen orientation.

Quoted 7 lines
Quoted 4 lines

As Vladimir points out, this can eventually work on EFI too, but EFI is lagging behind when it comes to graphical support.  In any case, if we really want to support rotation it should be generic.

Yes. As about where to put it I would say to driver so it can be accelerated if it's possible. For non-accelerated targets rotation function will be in video_fb.mod

Unfortunately, with the code I have there is no place to put the rotation other than the driver.

This would mean that every unaccelerated framebuffer driver would have to duplicate it.

I will have a look at your driver split patch to see if it improves the situation.

Thanks

Michal