summaryrefslogtreecommitdiffstats
path: root/sys/dev/fb
Commit message (Collapse)AuthorAgeFilesLines
* Limit the amount of video memory we map for the driver to the maximum value.jkim2013-03-271-5/+6
| | | | | | | | | | This basically restores the spirit of r203535, which was partially reverted in r205557, while we still map fixed amount to work around transient issues we experienced with r203535. Prodded by: avg Tested by: avg MFC after: 1 week
* Piggyback MIPS changes and add ARM syscons support for devices withgonzo2012-08-251-1/+6
| | | | | | framebuffer While here - sort #if defined() order alphabetically
* Provide basic glue to allow syscons to be used on MIPS, modelledrwatson2012-08-251-0/+23
| | | | | | | | | on PowerPC support. This was clearly not something syscons was designed to do (very specific assumptions about the nature of VGA consoles on PCs), but fortunately others have long since blazed the way on making it work regardless of that. Sponsored by: DARPA, AFRL
* Fix the previous commit to only copy the data we were asked to and notphk2012-06-181-0/+1
| | | | | | twice as much. Spotted by: Taku YAMAMOTO
* On certain newer Intel Atom based motherboards, for instance thephk2012-06-171-3/+10
| | | | | | | | | | | | | | | | | | | D2500CC which I have, syscons in text-mode fails to show the expected contents due to write errors into video-memory. At least one of the causes is that we copy from syscons internal buffer to the video memory with optimized bcopy(9) which uses >16bit operations. Until now, 32bit and wider operations have always worked on the video memory, but since I cannot find a single source which says that this SHALL work, and since these chipsets/bugs are now out there, this commit changes syscons to always use 16bit copies on i386 & amd64. This may be relevevant for PR's: 166262 166639 and various other bug reports floating elsewhere on the net, but I lack hardware to test those.
* Fix a Clang warning.jkim2012-04-161-1/+1
| | | | Submitted by: arundel
* Save and restore VGA display memory between suspend and resume.jkim2012-04-041-14/+29
|
* Do not copy VESA state buffer if the VBE call has failed for any reason.jkim2012-04-041-2/+2
| | | | Do not unnecessarily clear the state buffer before calling the function.
* Remove a useless warning. The mode information is unused for very long timejkim2012-04-041-4/+0
| | | | and this function may be used with VESA mode since r232069.
* Do not reuse the previous address when restoring linear frame buffer.jkim2012-03-191-4/+6
|
* Save and restore linear frame buffer between suspend and resume.jkim2012-03-171-0/+19
| | | | MFC after: 1 week
* Remove unnecessary static variable initializations and duplicate codes.jkim2012-03-161-52/+42
| | | | Consistently use bcopy(9) over memcpy(9).
* Do not unnecessarily clear display memory when switching modes.jkim2012-03-161-1/+1
| | | | MFC after: 3 days
* If the VBE implementation does not support save/restore function, defer tojkim2012-02-231-8/+5
| | | | VGA methods. Unconditionally reset the VESA adapter before restoring state.
* Update my copyright date.jkim2012-02-231-1/+1
|
* Probe supported states for save/restore function. Some VBE implementationjkim2012-02-231-11/+11
| | | | refuses to save/restore states if an unsupported bit is set.
* Fix a typo introduced in r231843.jkim2012-02-231-1/+1
|
* Set the initial mode for the adapter after executing VESA BIOS POST.jkim2012-02-161-2/+5
| | | | There is no need to set initial mode for BIOS.
* Make sure the VESA mode number is between 256 and 511 inclusive.jkim2012-02-161-2/+4
|
* Properly check VESA video mode number.jkim2012-02-161-1/+1
|
* Convert files to UTF-8uqs2012-01-151-97/+97
|
* Convert files to UTF-8uqs2012-01-152-2/+2
|
* - Add support for ASCII art splash screens in TheDraw formateadler2011-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
* - There's no need to overwrite the default device method with the defaultmarius2011-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.
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-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.
* Make sparc64 compatible with NEW_PCIB and enable it:marius2011-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.
* Use the preload_fetch_addr() and preload_fetch_size() conveniencemarcel2011-02-131-15/+17
| | | | | | functions to obtain the address and size of the bitmap splash image. Sponsored by: Juniper Networks.
* Fix segment:offset calculation of interrupt vector for relocated video BIOSjkim2010-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
* Disable video ROM shadowing by default as I originally intended. I foundjkim2010-09-021-2/+2
| | | | | a case where video ROM for an IGP is too tightly coupled with system BIOS to get relocated.
* Make sure the interrupt entry point is within the video ROM range. We mustjkim2010-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.
* Fix a debugging message under bootverbose. This address is not linear.jkim2010-08-251-1/+1
|
* Add an experimental feature to shadow video BIOS. Long ago, this trick wasjkim2010-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.
* Protect shared palette and state buffer with a mutex. Remove defunctjkim2010-08-071-14/+27
| | | | spltty() calls while I am here.
* Initialize a variable before its use.jkim2010-07-131-1/+1
|
* Preallocate buffers for palette and state. Do not save DAC registers asjkim2010-07-131-83/+58
| | | | we reset DAC mode and restore palette data while we are resuming always.
* Plug a possible memory leak.jkim2010-07-061-1/+1
| | | | Submitted by: Yamagi Burmeister (lists at yamagi dot org)
* Fix a possible null pointer dereference. A patch for -STABLE wasjkim2010-07-061-0/+2
| | | | Submitted by: Yamagi Burmeister (lists at yamagi dot org)
* Use M_WAITOK for VESA BIOS initialization consistently.jkim2010-06-231-5/+5
|
* Let x86bios_alloc() pass contigmalloc(9) flags. Use it to set M_WAITOKjkim2010-06-231-9/+7
| | | | | from VESA BIOS initialization. All other malloc(9) uses in the function is blocking any way.
* Remove unused i586 optimized bcopy/bzero/etc implementations that utilizekib2010-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)
* Restore the previous VESA mode after BIOS POST, just in case.jkim2010-05-181-0/+1
|
* Remove unnecessary pointer increment. A wrong pointer may be passed tojkim2010-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
* Allocate memory for VBE info block with malloc(9), not as static local.jkim2010-04-071-22/+28
|
* Do not penalize correct or correctable VESA mode tables by calling anotherjkim2010-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.
* Teach VGA framebuffer about 8-bit palette format for VESA.jkim2010-03-242-12/+16
|
* Add my copyright here. It seems I have contributed enough code. :-)jkim2010-03-231-0/+1
|
* Be extremely careful when we determine bytes per scan line information.jkim2010-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.
* Fall back to VGA palette functions if VESA function failed and DAC is stilljkim2010-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.
* Map entire video memory again. This is a partial backout of r203535.jkim2010-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.
* Yet another attempt to make palette loading more safer:jkim2010-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.
OpenPOWER on IntegriCloud