Commit graph

102 commits

Author SHA1 Message Date
Vladimir Testov
339eacce1b * grub-core/video/fb/video_fb.c: Merge two blit functions
into one.
2013-11-05 21:46:16 +04:00
Vladimir Serbinenko
3fe63754d2 * grub-core/video/i386/pc/vga.c: Fix double bufferring and
add mode 0x12.
2013-11-05 02:41:50 +01:00
Vladimir Serbinenko
c1bee64676 Move cpuid code to cpuid.h and TSC code to tsc.c. 2013-10-26 23:39:10 +02:00
Vladimir Serbinenko
3523b8d8a7 * grub-core/video/bitmap_scale.c: Use unsigned arithmetics when
appropriate.
2013-10-25 21:39:00 +02:00
Vladimir Serbinenko
d43c64899d * grub-core/video/fb/fbblit.c: Use (255 ^ x) rather than (255 - x).
Use unsigned divisions rather than signed variants.
2013-10-25 21:35:44 +02:00
Vladimir Serbinenko
f690f8b030 * grub-core/video/readers/png.c (grub_png_convert_image): Use
unsigned arithmetics.
	Add missing break.
2013-10-25 20:36:39 +02:00
Vladimir Serbinenko
74ff2c0501 * grub-core/video/readers/jpeg.c: Use unsigned where appropriate. 2013-10-25 20:35:02 +02:00
Vladimir Serbinenko
af81ed880d * conf/Makefile.common (CPPFLAGS_KERNEL): Add -DGRUB_KERNEL=1.
* include/grub/dl.h (GRUB_MOD_INIT), (GRUB_MOD_FINI): Define
	functions when compiling for kernel.
2013-10-25 16:07:01 +02:00
Robert Millan
f70d5c0701 * grub-core/video/i386/pc/vbe.c (grub_video_vbe_setup): Replace
numeric constants with their symbolic equivalent.
	Taken from branch "vbe-on-coreboot".
2013-10-24 08:53:04 +02:00
Vladimir 'phcoder' Serbinenko
e44b9a8349 * grub-core/video/capture.c: Do not do finalization when .fini
is called as there is explicit capture_end.
2013-10-03 23:33:58 +02:00
Vladimir Testov
ebc1da55cd * grub-core/gfxmenu/theme_loader.c: New global options for the
theme background image handling. desktop-image-scale-method,
       desktop-image-h-align, desktop-image-v-align.
       * grub-core/gfxmenu/view.c: Likewise.
       * include/gfxmenu_view.h: Likewise.
       * include/bitmap_scale.h: Proportional scale functions introduced.
       * grub-core/video/bitmap_scale.c: Likewise. Verification checks are
       put in a separate functions. GRUB_ERR_BUG is set for grub_error in
       cases of unexpected input variables for scale functions.
       * docs/grub.texi: Updated documentation for new options.
2013-10-02 18:17:33 +04:00
Vladimir 'phcoder' Serbinenko
c573914389 * grub-core/video/readers/png.c: Support narrow (4-/2-/1-bpp) PNG. 2013-10-02 13:22:56 +02:00
Vladimir Testov
d999ac72e2 * grub-core/video/bitmap_scale.c (scale_bilinear): Increased precision
to eliminate artefacts in bilinear interpolation.
2013-10-01 16:34:04 +04:00
Vladimir 'phcoder' Serbinenko
2b131610d0 * grub-core/video/readers/tga.c: Support paletted tga. 2013-09-28 19:22:20 +02:00
Vladimir 'phcoder' Serbinenko
de6e5ff89b * grub-core/video/readers/jpeg.c (grub_jpeg_decode_data): Remove
incorrect cbcr setting when in color mode.
2013-09-28 03:06:04 +02:00
Vladimir 'phcoder' Serbinenko
fa31ee9c2c * grub-core/video/readers/png.c: Support paletted images and clean up
greyscale support.
2013-09-28 03:04:34 +02:00
Vladimir 'phcoder' Serbinenko
d72bff0997 * grub-core/video/readers/png.c (grub_png_decode_image_header):
Fix formula for computing total number of bytes.
2013-09-27 21:51:52 +02:00
Vladimir 'phcoder' Serbinenko
29648c5d84 * grub-core/video/readers/tga.c: Reorganize to separate RLE and
image processing, fix big-endian and support grayscale.
2013-09-27 21:49:08 +02:00
Vladimir 'phcoder' Serbinenko
4a87649207 * grub-core/video/fb/video_fb.c (grub_video_fb_create_render_target):
Correctly will with maximum transparency when using index color.
2013-09-27 21:44:03 +02:00
Vladimir 'phcoder' Serbinenko
3ccf16dff9 * grub-core/video/readers/png.c: Support grayscale 2013-09-27 12:04:09 +02:00
Vladimir 'phcoder' Serbinenko
e9c492a02e * grub-core/video/readers/jpeg.c: Support grayscale. 2013-09-27 11:13:36 +02:00
Vladimir 'phcoder' Serbinenko
621bed6990 * grub-core/video/efi_gop.c (grub_video_gop_setup): Fix a typo which
desactivated use of EDID at all.
2013-09-23 13:40:07 +02:00
Vladimir 'phcoder' Serbinenko
fc4c4fddf6 Detach optional parts of gfxterm and integrate in with coreboot init. 2013-05-31 00:42:33 +02:00
Vladimir 'phcoder' Serbinenko
6570b2050e Move blit and fill dispatcher to appropriate files to decrease export
and relocation overhead.
2013-05-30 22:06:28 +02:00
Vladimir 'phcoder' Serbinenko
47cf82b461 * grub-core/video/readers/jpeg.c: Use grub_dprintf for debug statements
rather than printf.
	* grub-core/video/readers/tga.c: Likewise.
2013-05-07 11:37:11 +02:00
Vladimir 'phcoder' Serbinenko
85002bf34a Agglomerate more mallocs to speed-up gfxterm. 2013-05-04 22:23:23 +02:00
Vladimir 'phcoder' Serbinenko
b7c036bce3 More video checks. 2013-05-04 14:00:14 +02:00
Vladimir 'phcoder' Serbinenko
92323d1fb0 Speed-up gfxterm by saving intermediate results in index+alpha
format.
2013-05-04 13:58:30 +02:00
Vladimir 'phcoder' Serbinenko
03f7c8c304 Fix several memory leaks. 2013-05-04 13:47:10 +02:00
Vladimir 'phcoder' Serbinenko
cff501187c * grub-core/video/fb/fbblit.c (grub_video_fbblit_blend_BGR888_RGBA8888):
Fix order bug.
	(grub_video_fbblit_blend_RGB888_RGBA8888): Likewise.
2013-05-03 14:07:30 +02:00
Vladimir 'phcoder' Serbinenko
a8905e8ae8 Several fixes to ieee1275 and big-endian video. 2013-05-02 22:30:20 +02:00
Vladimir 'phcoder' Serbinenko
5036166022 First automated video test (running videotest and comparing results) 2013-05-02 14:39:03 +02:00
Vladimir 'phcoder' Serbinenko
45fbd9a23f Add missing video ids to coreboot and ieee1275 video. 2013-04-24 14:44:15 +02:00
Vladimir 'phcoder' Serbinenko
d178788e71 Support coreboot framebuffer.
* grub-core/video/i386/coreboot/cbfb.c: New file.
2013-04-21 13:02:10 +02:00
Vladimir 'phcoder' Serbinenko
386497990a * grub-core/commands/videotest.c (grub_cmd_videotest): Fix error
handling when creating text_layer failed.
	* grub-core/video/video.c (grub_video_create_render_target):
	Set result to 0 on error.
	(grub_video_delete_render_target): Do not dereference NULL.
2013-04-19 15:09:15 +02:00
Vladimir 'phcoder' Serbinenko
a79b8a1584 Merge powerpc grub-mkrescue flavour with common. Use xorriso HFS+
feature for it.
2013-04-11 23:15:26 +02:00
Vladimir 'phcoder' Serbinenko
21344ef620 * grub-core/video/i386/pc/vbe.c
(grub_video_vbe_print_adapter_specific_info): Replace division by
	shifts.
2013-03-10 18:49:05 +01:00
Vladimir 'phcoder' Serbinenko
6e4146c41e Move to more hookless approach in IEEE1275 devices handling. 2013-03-02 23:51:19 +01:00
Vladimir 'phcoder' Serbinenko
3056d3e752 Remove nested functions from videoinfo iterators. 2013-03-01 11:11:36 +01:00
Colin Watson
ca3a74469a Remove nested functions from PCI iterators.
* grub-core/bus/pci.c (grub_pci_iterate): Add hook_data argument,
passed to hook.  Update all callers to pass appropriate hook data.
* grub-core/bus/emu/pci.c (grub_pci_iterate): Likewise.
* include/grub/pci.h (grub_pci_iteratefunc_t): Add data argument.
Remove NESTED_FUNC_ATTR from here and from all users.
(grub_pci_iterate): Update prototype.
* grub-core/bus/cs5536.c (grub_cs5536_find: hook): Make static
instead of nested.  Rename to ...
(grub_cs5536_find_iter): ... this.
* grub-core/kern/efi/mm.c (stop_broadcom: find_card): Likewise.
* grub-core/kern/mips/loongson/init.c (init_pci: set_card):
Likewise.
* grub-core/kern/vga_init.c (grub_qemu_init_cirrus: find_card):
Likewise.
* grub-core/video/bochs.c (grub_video_bochs_setup: find_card):
Likewise.
* grub-core/video/cirrus.c (grub_video_cirrus_setup: find_card):
Likewise.
* grub-core/video/efi_uga.c (find_framebuf: find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c
(grub_video_radeon_fuloong2e_setup: find_card): Likewise.
* grub-core/video/sis315pro.c (grub_video_sis315pro_setup:
find_card): Likewise.
* grub-core/video/sm712.c (grub_video_sm712_setup: find_card):
Likewise.
2013-01-13 01:10:41 +00:00
Colin Watson
33a68ac643 * grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Remove incorrect
__attribute__ ((unused)).
* grub-core/video/bochs.c (find_card): Likewise.
* grub-core/video/cirrus.c (find_card): Likewise.
* grub-core/video/radeon_fuloong2e.c (find_card): Likewise.
* grub-core/video/sis315pro.c (find_card): Likewise.
* grub-core/video/sm712.c (find_card): Likewise.
2012-12-30 09:57:58 +00:00
Vladimir 'phcoder' Serbinenko
c50c867da3 Init video early on yeeloong to avoid being rebooted by watchdog.
* grub-core/Makefile.am (gensm712): New target.
	(sm712_start.S): Likewise.
	(boot/mips/loongson/fwstart.S): Depend on sm712_start.S
	* grub-core/boot/mips/loongson/fwstart.S [!FULOONG2F]: Init SM712.
	* grub-core/video/sm712.c [GENINIT]: Generate compact init procedure
	description.
	* include/grub/vga.h: Move registry definitions to...
	* include/grub/vgaregs.h: ... here.
2012-06-26 03:36:14 +02:00
Vladimir 'phcoder' Serbinenko
9e86d4c59a Speed-up video on yeeloong.
* grub-core/video/sm712.c (framebuffer): Remove render_target and
	add cached_ptr.
	(grub_video_sm712_video_fini): Unmap cached_ptr.
	(grub_video_sm712_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sm712_set_active_render_target): Removed.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sm712_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
2012-06-22 23:47:34 +02:00
Vladimir 'phcoder' Serbinenko
52f0f64384 Avoid unnecessary memcpy of whole video buffer.
* grub-core/video/fb/video_fb.c (dirty): New struct.
	(framebuffer): Add members current_dirty and previous_dirty.
	(dirty): New function.
	(grub_video_fb_fill_rect): Update dirty.
	(common_blitter): Likewise.
	(grub_video_fb_scroll): Likewise.
	(doublebuf_blit_update_screen): Copy only dirty part.
	(doublebuf_pageflipping_update_screen): Likewise.
	(grub_video_fb_doublebuf_blit_init): Init dirty.
	(doublebuf_pageflipping_init): Likewise.
	(grub_video_fb_setup): Likewise.
2012-06-19 19:34:51 +02:00
Vladimir 'phcoder' Serbinenko
70aaf3053a Speed-up video on fuloong.
* grub-core/bus/bonito.c (grub_pci_device_map_range_cached):
	New function.
	(grub_pci_device_unmap_range): Handle non-cached address.
	* grub-core/video/sis315pro.c (framebuffer): Remove render_target and
	add direct_ptr.
	(grub_video_sis315pro_video_fini): Unmap direct_ptr.
	(grub_video_sis315pro_setup): Use cache address and grub_video_fb_setup.
	(grub_video_sis315pro_set_active_render_target): Removed.
	(grub_video_sis315pro_get_info_and_fini): Use uncached address.
	(grub_video_adapter): Use grub_video_fb_set_active_render_target.
	(grub_video_sis315pro_swap_buffers): Call grub_video_fb_swap_buffers and
	sync caches.
	* include/grub/mips/loongson/pci.h (grub_pci_device_map_range_cached):
	New proto.
2012-06-17 01:09:32 +02:00
Vladimir 'phcoder' Serbinenko
ba67e2c635 Avoid slow read-back from VRAM.
* include/grub/video_fb.h (grub_video_fb_doublebuf_update_screen_t):
	Move from here ...
	* grub-core/video/fb/video_fb.c
	(grub_video_fb_doublebuf_update_screen_t): ... here. Remove arguments.
	* grub-core/video/fb/video_fb.c (framebuf_t): New type.
	(front_target): Remove front_target. Add pages.
	(grub_video_fb_init): Skip setting front_pages.
	(grub_video_fb_fini): Likewise.
	(doublebuf_blit_update_screen): Use pages.
	(grub_video_fb_doublebuf_blit_init): Likewise.
	(doublebuf_pageflipping_init): Allocate offscreen buffer.
	(doublebuf_pageflipping_update_screen): Use offscreen buffer.
	(grub_video_fb_setup): Prefer doublebuffing.
2012-06-15 23:57:20 +02:00
Vladimir 'phcoder' Serbinenko
6e5efd60a1 * grub-core/video/efi_gop.c (grub_video_gop_setup): Reject invalid
resolutions.
	* grub-core/video/i386/pc/vbe.c (grub_vbe_get_preferred_mode): Likewise.
	* grub-core/video/video.c (grub_video_edid_preferred_mode): Likewise.
2012-06-02 20:15:11 +02:00
Matthew Garrett
4ce776d23e * grub-core/term/efi/console.c (grub_efi_console_init): Set text mode.
(grub_efi_console_fini): Likewise.
	* grub-core/video/efi_gop.c (framebuffer): New field offscreen.
	(grub_video_gop_fill_mode_info): Rename to ...
	(grub_video_gop_fill_real_mode_info): ... this.
	(grub_video_gop_fill_mode_info): New function.
	(grub_video_gop_setup): Setup double framebuffer.
	(grub_video_gop_get_info_and_fini): Use original framebuffer.
	Free offscreen.
	(grub_video_gop_swap_buffers): Copy framebuffer.
	(grub_video_gop_fini): Free offscreen buffer.
	* include/grub/efi/graphics_output.h (grub_efi_gop_blt_operation_t):
	New enum.
	(grub_efi_gop_blt_pixel): New struct.
2012-05-26 13:33:34 +02:00
Vladimir 'phcoder' Serbinenko
bb51c6c647 * grub-core/commands/acpi.c: Add TRANSLATORS comments.
* grub-core/commands/gptsync.c: Likewise.
	* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/legacycfg.c: Likewise.
	* grub-core/io/gzio.c: Likewise.
	* grub-core/net/net.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/tests/test_blockarg.c: Likewise.
	* grub-core/video/video.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkfont.c: Likewise.
2012-03-06 14:11:10 +01:00
Vladimir 'phcoder' Serbinenko
ef292a8775 * grub-core/net/http.c: Add TRANSLATORS comments.
* grub-core/normal/cmdline.c: Likewise.
	* grub-core/normal/misc.c: Likewise.
	* grub-core/partmap/msdos.c: Likewise.
	* grub-core/parttool/msdospart.c: Likewise.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* grub-core/term/terminfo.c: Likewise.
	* grub-core/video/bitmap.c: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkimage.c: Likewise.
	* util/grub-mklayout.c: Likewise.
	* util/grub-setup.c: Likewise.
2012-03-05 16:42:26 +01:00