aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fb
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert files to UTF-8Ulrich Spörlein2012-01-151-97/+97
| | | | Notes: svn path=/head/; revision=230134
* Convert files to UTF-8Ulrich Spörlein2012-01-152-2/+2
| | | | Notes: svn path=/head/; revision=230132
* - Add support for ASCII art splash screens in TheDraw formatEitan Adler2011-12-121-0/+135
| | | | | | | | | | | | PR: kern/143370 Submitted by: Antony Mawer <antony@mawer.org> Reviewed by: gjb (doc) Reviewed by: des (style) Approved by: ed MFC after: 1 month Notes: svn path=/head/; revision=228445
* - There's no need to overwrite the default device method with the defaultMarius Strobl2011-11-221-2/+1
| | | | | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID. Notes: svn path=/head/; revision=227843
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.Ed Schouten2011-11-071-1/+1
| | | | | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static. Notes: svn path=/head/; revision=227309
* Make sparc64 compatible with NEW_PCIB and enable it:Marius Strobl2011-10-021-55/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement bus_adjust_resource() methods as far as necessary and in non-PCI bridge drivers as far as feasible without rototilling them. - As NEW_PCIB does a layering violation by activating resources at layers above pci(4) without previously bubbling up their allocation there, move the assignment of bus tags and handles from the bus_alloc_resource() to the bus_activate_resource() methods like at least the other NEW_PCIB enabled architectures do. This is somewhat unfortunate as previously sparc64 (ab)used resource activation to indicate whether SYS_RES_MEMORY resources should be mapped into KVA, which is only necessary if their going to be accessed via the pointer returned from rman_get_virtual() but not for bus_space(9) as the later always uses physical access on sparc64. Besides wasting KVA if we always map in SYS_RES_MEMORY resources, a driver also may deliberately not map them in if the firmware already has done so, possibly in a special way. So in order to still allow a driver to decide whether a SYS_RES_MEMORY resource should be mapped into KVA we let it indicate that by calling bus_space_map(9) with BUS_SPACE_MAP_LINEAR as actually documented in the bus_space(9) page. This is implemented by allocating a separate bus tag per SYS_RES_MEMORY resource and passing the resource via the previously unused bus tag cookie so we later on can call rman_set_virtual() in sparc64_bus_mem_map(). As a side effect this now also allows to actually indicate that a SYS_RES_MEMORY resource should be mapped in as cacheable and/or read-only via BUS_SPACE_MAP_CACHEABLE and BUS_SPACE_MAP_READONLY respectively. - Do some minor cleanup like taking advantage of rman_init_from_resource(), factor out the common part of bus tag allocation into a newly added sparc64_alloc_bus_tag(), hook up some missing newbus methods and replace some homegrown versions with the generic counterparts etc. - While at it, let apb_attach() (which can't use the generic NEW_PCIB code as APB bridges just don't have the base and limit registers implemented) regarding the config space registers cached in pcib_softc and the SYSCTL reporting nodes set up. Notes: svn path=/head/; revision=225931
* Use the preload_fetch_addr() and preload_fetch_size() convenienceMarcel Moolenaar2011-02-131-15/+17
| | | | | | | | | functions to obtain the address and size of the bitmap splash image. Sponsored by: Juniper Networks. Notes: svn path=/head/; revision=218661
* Fix segment:offset calculation of interrupt vector for relocated video BIOSJung-uk Kim2010-09-131-8/+6
| | | | | | | | | | when the original offset is bigger than size of one page. X86BIOS macros cannot be used here because it is assumed address is only linear in a page. Tested by: netchild Notes: svn path=/head/; revision=212580
* Disable video ROM shadowing by default as I originally intended. I foundJung-uk Kim2010-09-021-2/+2
| | | | | | | | a case where video ROM for an IGP is too tightly coupled with system BIOS to get relocated. Notes: svn path=/head/; revision=212154
* Make sure the interrupt entry point is within the video ROM range. We mustJung-uk Kim2010-08-311-9/+15
| | | | | | | | | | | not change interrupt vector if it is not pointing the ROM itself. Actually, we just fail shadowing altogether if that is the case because the shadowed copy will be useless for sure and POST may not be relocatable or useful. While I'm here, fix a debugging message under bootverbose, really. r211829 fixed one case but broke another. Mea Culpa. Notes: svn path=/head/; revision=212070
* Fix a debugging message under bootverbose. This address is not linear.Jung-uk Kim2010-08-251-1/+1
| | | | Notes: svn path=/head/; revision=211829
* Add an experimental feature to shadow video BIOS. Long ago, this trick wasJung-uk Kim2010-08-251-10/+57
| | | | | | | | | | | | | supported by many BIOSes to improve performance of VESA BIOS calls for real mode OSes but it is not our intention here. However, this may help some platforms where the video ROMs are inaccessible after suspend, for example. Note it may consume up to 64K bytes of contiguous memory depending on video controller model when it is enabled. This feature can be disabled by setting zero to 'debug.vesa.shadow_rom' loader tunable via loader(8) or loader.conf(5). The default is 1 (enabled), for now. Notes: svn path=/head/; revision=211827
* Protect shared palette and state buffer with a mutex. Remove defunctJung-uk Kim2010-08-071-14/+27
| | | | | | | spltty() calls while I am here. Notes: svn path=/head/; revision=210994
* Initialize a variable before its use.Jung-uk Kim2010-07-131-1/+1
| | | | Notes: svn path=/head/; revision=210017
* Preallocate buffers for palette and state. Do not save DAC registers asJung-uk Kim2010-07-131-83/+58
| | | | | | | we reset DAC mode and restore palette data while we are resuming always. Notes: svn path=/head/; revision=210016
* Plug a possible memory leak.Jung-uk Kim2010-07-061-1/+1
| | | | | | | Submitted by: Yamagi Burmeister (lists at yamagi dot org) Notes: svn path=/head/; revision=209740
* Fix a possible null pointer dereference. A patch for -STABLE wasJung-uk Kim2010-07-061-0/+2
| | | | | | | Submitted by: Yamagi Burmeister (lists at yamagi dot org) Notes: svn path=/head/; revision=209737
* Use M_WAITOK for VESA BIOS initialization consistently.Jung-uk Kim2010-06-231-5/+5
| | | | Notes: svn path=/head/; revision=209491
* Let x86bios_alloc() pass contigmalloc(9) flags. Use it to set M_WAITOKJung-uk Kim2010-06-231-9/+7
| | | | | | | | from VESA BIOS initialization. All other malloc(9) uses in the function is blocking any way. Notes: svn path=/head/; revision=209472
* Remove unused i586 optimized bcopy/bzero/etc implementations that utilizeKonstantin Belousov2010-06-231-10/+1
| | | | | | | | | | | | FPU registers for copying. Remove the switch table and jumps from bcopy/bzero/... to the actual implementation. As a side-effect, i486-optimized bzero is removed. Reviewed by: bde Tested by: pho (previous version) Notes: svn path=/head/; revision=209460
* Restore the previous VESA mode after BIOS POST, just in case.Jung-uk Kim2010-05-181-0/+1
| | | | Notes: svn path=/head/; revision=208279
* Remove unnecessary pointer increment. A wrong pointer may be passed toJung-uk Kim2010-05-181-4/+4
| | | | | | | | | | | free(9) and it can cause kernel panic when there are multiple graphics controllers in the system. Tested by: Brandon Gooch (jamesbrandongooch at gmail dot com) MFC after: 3 days Notes: svn path=/head/; revision=208276
* Allocate memory for VBE info block with malloc(9), not as static local.Jung-uk Kim2010-04-071-22/+28
| | | | Notes: svn path=/head/; revision=206384
* Do not penalize correct or correctable VESA mode tables by calling anotherJung-uk Kim2010-03-251-7/+14
| | | | | | | | VBE function. Most problems should be corrected by the mode table sanity check and we only need the paranoid in extremely rare cases. Notes: svn path=/head/; revision=205653
* Teach VGA framebuffer about 8-bit palette format for VESA.Jung-uk Kim2010-03-242-12/+16
| | | | Notes: svn path=/head/; revision=205604
* Add my copyright here. It seems I have contributed enough code. :-)Jung-uk Kim2010-03-231-0/+1
| | | | Notes: svn path=/head/; revision=205566
* Be extremely careful when we determine bytes per scan line information.Jung-uk Kim2010-03-231-11/+54
| | | | | | | | | | First, we compare mode table data against minimum value. If the mode table does not make sense, we set the minimum in the mode info. When we actually set the mode, we try VESA BIOS function and compare it against the previous value. If it makes more sense, update the information. Notes: svn path=/head/; revision=205564
* Fall back to VGA palette functions if VESA function failed and DAC is stillJung-uk Kim2010-03-231-11/+10
| | | | | | | | in 6-bit mode. Although we have to check non-VGA compatibility bit here, it seems there are too many broken VESA BIOSes out to rely on it. Notes: svn path=/head/; revision=205558
* Map entire video memory again. This is a partial backout of r203535.Jung-uk Kim2010-03-231-3/+4
| | | | | | | | Although we do not use them all directly, it seems VGA render may access unmapped memory region and cause kernel panic. Notes: svn path=/head/; revision=205557
* Yet another attempt to make palette loading more safer:Jung-uk Kim2010-02-231-24/+33
| | | | | | | | | | | | - Add a separate palette data for 8-bit DAC mode when SC_PIXEL_MODE is set and fill it up with default gray-scale palette data for text. Now we don't have to set `hint.sc.0.vesa_mode' to get the default palette data. - Add a new adapter flag, V_ADP_DAC8 to track whether the controller is using 8-bit palette format and load correct palette when switching modes. - Set 8-bit DAC mode only for non-VGA compatible graphics mode. Notes: svn path=/head/; revision=204265
* Re-add accidentally removed pixel format for direct memory model.Jung-uk Kim2010-02-231-2/+42
| | | | Notes: svn path=/head/; revision=204236
* Fix FBIO_ADPINFO ioctl on amd64.Jung-uk Kim2010-02-231-3/+3
| | | | Notes: svn path=/head/; revision=204235
* Map and report actual video memory we need.Jung-uk Kim2010-02-061-81/+34
| | | | Notes: svn path=/head/; revision=203535
* Replace some homegrown functions with better/correct ones.Jung-uk Kim2010-02-051-46/+7
| | | | Notes: svn path=/head/; revision=203530
* Remove dead code and fix style(9) bugs.Jung-uk Kim2010-02-031-66/+77
| | | | Notes: svn path=/head/; revision=203455
* Use bytes per scan line from mode table. The previous implementation didJung-uk Kim2010-02-031-37/+13
| | | | | | | not reflect actual number of bytes when it was not exactly width * bpp * 8. Notes: svn path=/head/; revision=203453
* Correct virtual address of frame buffer for non-linear mode.Jung-uk Kim2010-02-031-1/+1
| | | | | | | Reported by: Marc UBM Bocklet (ubm dot freebsd at googlemail dot com) Notes: svn path=/head/; revision=203451
* Use VESA palette load/save functions if VESA BIOS says the current paletteJung-uk Kim2010-01-271-14/+22
| | | | | | | | | | | format is higher than 6-bit instead of relying VGA compatibility flag. This fixes palette problem of NVIDIA GeForce 6600. Reduce code differences between palette load/save functions while we are here. Tested by: danfe Notes: svn path=/head/; revision=203078
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.Robert Noland2009-12-298-28/+30
| | | | | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime... Notes: svn path=/head/; revision=201223
* - Remove a redundant check for dpms(4).Jung-uk Kim2009-11-121-2/+2
| | | | | | | - Test a cheaper function first. Notes: svn path=/head/; revision=199230
* - Partially revert hackish r198964 and r199002.Jung-uk Kim2009-11-121-1/+0
| | | | | | | | | | - Add a proxy driver vgapm to help vgapci to save/load VGA state. - Move device_set_desc() to the right place while we are here. Reviewed by: jhb Notes: svn path=/head/; revision=199229
* Remove duplicate suspend/resume code from vga_pci.c and let vga(4) registerJung-uk Kim2009-11-061-0/+1
| | | | | | | | | itself to an associated PCI device if it exists. It is little bit hackish but it should fix build without frame buffer driver since r198964. Fix some style(9) nits in vga_isa.c while we are here. Notes: svn path=/head/; revision=199002
* Save/restore VGA state from vga_pci.c instead of relying on vga_isa.c.Jung-uk Kim2009-11-051-49/+5
| | | | | | | | It was not working because we were saving its state after the device was powered down. Simplify vesa_load_state() as the culprit is fixed now. Notes: svn path=/head/; revision=198964
* Do not probe video mode if we are not going to use it.Jung-uk Kim2009-11-041-7/+9
| | | | Notes: svn path=/head/; revision=198911
* Restore color palette format if we reset video mode.Jung-uk Kim2009-11-041-0/+2
| | | | Notes: svn path=/head/; revision=198867
* Save/restore VGA color palette while suspending and resuming.Jung-uk Kim2009-11-041-0/+1
| | | | Notes: svn path=/head/; revision=198866
* Fix VESA color palette corruption:Jung-uk Kim2009-11-031-59/+36
| | | | | | | | | | | | | | | - VBE 3.0 says palette format resets to 6-bit mode when video mode changes. We simply set 8-bit mode when we switch modes if the adapter supports it. - VBE 3.0 also says if the mode is not VGA compatible, we must use VBE function to save/restore palette. Otherwise, VGA function may be used. Thus, reinstate the save/load palette functions only for non-VGA compatible modes regardless of its palette format. - Let vesa(4) set VESA modes even if vga(4) claims to support it. - Reset default palette if VESA pixel mode is set initially. - Fix more style nits. Notes: svn path=/head/; revision=198858
* Remove a redundant byte swapping in the previous commit.Jung-uk Kim2009-10-231-1/+0
| | | | Notes: svn path=/head/; revision=198423
* - When we restore VESA state, try BIOS POST earlier. VESA restore stateJung-uk Kim2009-10-232-25/+71
| | | | | | | | | | | | | | | | function may not work properly if we don't. Turn off hardware cursor as vesa_set_mode() does. - Add VBE 3.0 specific fields in VESA mode structure and pack it. Note the padding is 190 bytes although VBE 3.0 says 189 bytes. It must be wrong because the size of structure becomes 255 bytes and the specification says it must be 256 bytes in total. In fact, an example code in the spec. does it right, though. While we are at it, fix some i386-isms. - Remove state buffer size limitation. It is no longer necessary since sys/compat/x86bios/x86bios.c r198251. - Move int 0x10 vector test into vesa_bios_post() as we always do it anyway. Notes: svn path=/head/; revision=198419
* Rewrite x86bios and update its dependent drivers.Jung-uk Kim2009-10-191-301/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Do not map entire real mode memory (1MB). Instead, we map IVT/BDA and ROM area separately. Most notably, ROM area is mapped as device memory (uncacheable) as it should be. User memory is dynamically allocated and free'ed with contigmalloc(9) and contigfree(9). Remove now redundant and potentially dangerous x86bios_alloc.c. If this emulator ever grows to support non-PC hardware, we may implement it with rman(9) later. - Move all host-specific initializations from x86emu_util.c to x86bios.c and remove now unnecessary x86emu_util.c. Currently, non-PC hardware is not supported. We may use bus_space(9) later when the KPI is fixed. - Replace all bzero() calls for emulated registers with more obviously named x86bios_init_regs(). This function also initializes DS and SS properly. - Add x86bios_get_intr(). This function checks if the interrupt vector is available for the platform. It is not necessary for PC-compatible hardware but it may be needed later. ;-) - Do not try turning off monitor if DPMS does not support the state. - Allocate stable memory for VESA OEM strings instead of just holding pointers to them. They may or may not be accessible always. Fix a memory leak of video mode table while I am here. - Add (experimental) BIOS POST call for vesa(4). This function calls VGA BIOS POST code from the current VGA option ROM. Some video controllers cannot save and restore the state properly even if it is claimed to be supported. Usually the symptom is blank display after resuming from suspend state. If the video mode does not match the previous mode after restoring, we try BIOS POST and force the known good initial state. Some magic was taken from NetBSD (and it was taken from vbetool, I believe.) - Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4) to identify who owns the VESA BIOS. This is very useful for multi-display adapter setup. By default, the POST video controller is automatically probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding vgapci unit number. You may override it from loader but it is very unlikely to be necessary. Unfortunately only AGP/PCI/PCI-E controllers can be matched because ISA controller does not have necessary device IDs. - Fix a long standing bug in state save/restore function. The state buffer pointer should be ES:BX, not ES:DI according to VBE 3.0. If it ever worked, that's because BX was always zero. :-) - Clean up register initializations more clearer per VBE 3.0. - Fix a lot of style issues with vesa(4). Notes: svn path=/head/; revision=198251