aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fb
Commit message (Collapse)AuthorAgeFilesLines
...
* sys: use our nitems() macro when param.h is available.Pedro F. Giffuni2016-04-215-15/+14
| | | | | | | | | This should cover all the remaining cases in the kernel. Discussed in: freebsd-current Notes: svn path=/head/; revision=298431
* As <machine/pmap.h> is included from <vm/pmap.h>, there is no need toSvatopluk Kraus2016-02-221-1/+0
| | | | | | | | | | include it explicitly when <vm/pmap.h> is already included. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D5373 Notes: svn path=/head/; revision=295880
* Replace several bus_alloc_resource() calls using default arguments with ↵Justin Hibbits2016-02-191-4/+4
| | | | | | | | | | | | bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306 Notes: svn path=/head/; revision=295790
* Add support for USB display link adapters to the FB and VT drivers.Hans Petter Selasky2015-03-071-3/+10
| | | | | | | | | | | | | The vtophys() function is used to get the physical page address for the virtually allocated frame buffers when a physically continuous memory area is not available. This change also allows removing the masking of the FB_FLAG_NOMMAP flag in the PS3 syscons driver. The FB and VT drivers were tested using X.org/xf86-video-scfb and syscons. Notes: svn path=/head/; revision=279752
* vt(4): Add support to "downgrade" from eg. vt_fb to vt_vgaJean-Sébastien Pédron2015-03-011-0/+2
| | | | | | | | | | | | | | | | | The main purpose of this feature is to be able to unload a KMS driver. When going back from the current vt(4) backend to the previous backend, the previous backend is reinitialized with the special VDF_DOWNGRADE flag set. Then the current driver is terminated with the new "vd_fini" callback. In the case of vt_fb and vt_vga, this allows the former to pass the vgapci device vt_fb used to vt_vga so the device can be rePOSTed. Differential Revision: https://reviews.freebsd.org/D687 Notes: svn path=/head/; revision=279488
* Forward the FBIO_BLANK IOCTL to framebuffer clients. Bump the FreeBSDHans Petter Selasky2015-02-161-1/+2
| | | | | | | | | | version to force re-compilation of external video driver kernel modules. Discussed with: ray @ Notes: svn path=/head/; revision=278846
* vt(4): Use power_{suspend,resume} event handlers to implementAndriy Gapon2015-01-271-18/+0
| | | | | | | | | | | | | | | | | | | suspend/resume The goal is to avoid that the vt(4) resume happens before the video display is resumed. The original patch was provided by Andriy Gapon. This new patch registers the handlers in vt_upgrade(). This is done once, thanks to the VDF_ASYNC flag. I abused this flag because it was already abused by the keyboard allocation. The event handlers then call the backend if it provides callbacks for suspend/resume. Differential Revision: https://reviews.freebsd.org/D1004 On behalf of: dumbbell MFC after: 2 weeks Notes: svn path=/head/; revision=277795
* vt(4): Fix mouse cursor handling in vt_fb/creator_vt/ofwfbJean-Sébastien Pédron2014-08-271-17/+13
| | | | | | | | | | | | | | | There were two issues: 1. The area given to vt_is_cursor_in_area() was adding the drawable area offset, something already handled by this function. 2. The cursor was shifted on the screen by the offset of this area and thus was misplaced or not erased. Furthermore, when reaching the bottom or right borders, the cursor was either totally removed or not erased correctly. MFC after: 1 week Notes: svn path=/head/; revision=270720
* vt(4): Store a rectangle for the drawable area, not just the top-left cornerJean-Sébastien Pédron2014-08-251-6/+8
| | | | | | | | | | | This allows backends to verify they do not draw outside of this area. This fixes a bug in vt_vga where the text was happily drawn over the right and bottom margins, when using the Gallant font. MFC after: 1 week Notes: svn path=/head/; revision=270613
* vt(4): Add vd_bitblt_bmp_t callbackJean-Sébastien Pédron2014-08-231-0/+2
| | | | | | | | | | The code was already there in all backends, we just expose it. This is used to display the splash screen. MFC after: 1 week Notes: svn path=/head/; revision=270431
* creator_fb: Implement vd_bitblt_text_tJean-Sébastien Pédron2014-08-231-8/+62
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=270412
* vt(4): Colors are indexed against a console palette, not a VGA paletteJean-Sébastien Pédron2014-08-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename vt_generate_vga_palette() to vt_generate_cons_palette() and change it to build a palette where the color index is the same than in terminal escape codes, not the VGA index. That's what TCHAR_CREATE() uses and passes to vt(4). The main differences between both orders are: o Blue and red are swapped (1 <-> 4) o Yellow and cyan are swapped (3 <-> 6) The problem remained unnoticed, because the RGB bit indexes passed to vt_generate_vga_palette() were reversed. This inversion was cancelled by the colors inversions in the generated palette. For instance, red (0xff0000) and blue (0x0000ff) have bytes in opposite order, but were swapped in the palette. But after changing the value of blue (see last paragraph), the modified color was in fact the red one. This commit includes a fix to creator_vt.c, submitted by Nathan Whitehorn: fb_cmsize is set to 16. Before this, the generated palette would be overwritte. This fixes colors on sparc64 with a Creator3D adapter. While here, tune the palette to better match console colors and improve the readability (especially the dark blue). Submitted by: nwhitehorn (fix to creator_vt.c) MFC after: 1 week Notes: svn path=/head/; revision=269783
* fbd: Fix a bug where vt_fb_attach() success would be considered a failureJean-Sébastien Pédron2014-08-101-2/+3
| | | | | | | | | | | | | | | | vt_fb_attach() currently always returns 0, but it could return a code defined in errno.h. However, it doesn't return a CN_* code. So checking its return value against CN_DEAD (which is 0) is incorrect, and in this case, a success becomes a failure. The consequence was unimportant, because the caller (drm_fb_helper.c) would only log an error message in this case. The console would still work. Approved by: nwhitehorn Notes: svn path=/head/; revision=269779
* Retire vd_maskbitbltchr. The same functionality can be obtained by testingNathan Whitehorn2014-08-071-1/+0
| | | | | | | | for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr() were doing anyway. Notes: svn path=/head/; revision=269685
* Retire various intertwined bits of fbd(4) and vt_fb, in particular theNathan Whitehorn2014-08-061-103/+8
| | | | | | | | pixel modification indirection. No actual drivers use it and those that might (e.g. creatorfb) use custom implementations of vd_bitbltchr(). Notes: svn path=/head/; revision=269620
* Add a simple unaccelerated vt(4) framebuffer driver for Sun framebuffersNathan Whitehorn2014-08-051-0/+220
| | | | | | | | | | | | | handled by creator(4) (Sun Creator 3D, Elite 3D, etc.). This provides vt(4) consoles on all devices currently supported by syscons on sparc64. The driver should also be easily adaptable to support newer Sun framebuffers such as the XVR-500 and higher. Many thanks to dumbbell@ (Jean-Sebastien Pedron) for testing this remotely during development. Notes: svn path=/head/; revision=269601
* Allow console drivers active from early boot to be used with xf86-video-scfb,Nathan Whitehorn2014-07-161-7/+0
| | | | | | | | | | | rather than only drivers attached later on. This involves a small amount of code duplication with dev/fb/fbd.c, which will fixed later on. Also improve performance of vt_blank() by making it not read from the framebuffer unnecessarily. Notes: svn path=/head/; revision=268771
* Should check fb_read method presence instead of double check for fb_write.Aleksandr Rybalko2014-07-091-1/+1
| | | | | | | | | Pointed by: emaste Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=268472
* Remove ia64.Marcel Moolenaar2014-07-071-22/+2
| | | | | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan Notes: svn path=/head/; revision=268351
* Pull in r267961 and r267973 again. Fix for issues reported will follow.Hans Petter Selasky2014-06-281-1/+0
| | | | Notes: svn path=/head/; revision=267992
* Revert r267961, r267973:Glen Barber2014-06-271-0/+1
| | | | | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory Notes: svn path=/head/; revision=267985
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifHans Petter Selasky2014-06-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=267961
* Remove more superfluous const specifiers.Dimitry Andric2014-02-232-8/+8
| | | | Notes: svn path=/projects/clang-sparc64/; revision=262376
* Clean up license textEd Maste2013-12-292-8/+1
| | | | | | | | - Renumber Regents clauses - Remove clause 3 and 4 from TNF license, following upstream change Notes: svn path=/head/; revision=260047
* o Add virtual terminal mmap request handler.Aleksandr Rybalko2013-12-231-1/+10
| | | | | | | | | | | o Forward termianl framebuffer ioctl to fbd. o Forward terminal mmap request to fbd. o Move inclusion of sys/conf.h to vt.h. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=259777
* Merge VT(9) project (a.k.a. newcons).Aleksandr Rybalko2013-12-052-0/+480
| | | | | | | | | | Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=259016
* Reduce diff against stable/9 slightly.Jung-uk Kim2013-08-281-3/+2
| | | | Notes: svn path=/head/; revision=255004
* Do not save/restore video memory if we are not using linear frame buffer.Jung-uk Kim2013-08-281-22/+15
| | | | | | | Note this partially revert r233896. Notes: svn path=/head/; revision=254999
* Make sure to free stale buffer before allocating new one for safety.Jung-uk Kim2013-08-281-2/+6
| | | | Notes: svn path=/head/; revision=254998
* Avoid unnecessary signedness conversion.Jung-uk Kim2013-08-281-3/+3
| | | | Notes: svn path=/head/; revision=254997
* Limit the amount of video memory we map for the driver to the maximum value.Jung-uk Kim2013-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 Notes: svn path=/head/; revision=248799
* Piggyback MIPS changes and add ARM syscons support for devices withOleksandr Tymoshenko2012-08-251-1/+6
| | | | | | | | | framebuffer While here - sort #if defined() order alphabetically Notes: svn path=/head/; revision=239696
* Provide basic glue to allow syscons to be used on MIPS, modelledRobert Watson2012-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 Notes: svn path=/head/; revision=239670
* Fix the previous commit to only copy the data we were asked to and notPoul-Henning Kamp2012-06-181-0/+1
| | | | | | | | | twice as much. Spotted by: Taku YAMAMOTO Notes: svn path=/head/; revision=237223
* On certain newer Intel Atom based motherboards, for instance thePoul-Henning Kamp2012-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. Notes: svn path=/head/; revision=237203
* Fix a Clang warning.Jung-uk Kim2012-04-161-1/+1
| | | | | | | Submitted by: arundel Notes: svn path=/head/; revision=234362
* Save and restore VGA display memory between suspend and resume.Jung-uk Kim2012-04-041-14/+29
| | | | Notes: svn path=/head/; revision=233896
* Do not copy VESA state buffer if the VBE call has failed for any reason.Jung-uk Kim2012-04-041-2/+2
| | | | | | | Do not unnecessarily clear the state buffer before calling the function. Notes: svn path=/head/; revision=233894
* Remove a useless warning. The mode information is unused for very long timeJung-uk Kim2012-04-041-4/+0
| | | | | | | and this function may be used with VESA mode since r232069. Notes: svn path=/head/; revision=233892
* Do not reuse the previous address when restoring linear frame buffer.Jung-uk Kim2012-03-191-4/+6
| | | | Notes: svn path=/head/; revision=233187
* Save and restore linear frame buffer between suspend and resume.Jung-uk Kim2012-03-171-0/+19
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=233056
* Remove unnecessary static variable initializations and duplicate codes.Jung-uk Kim2012-03-161-52/+42
| | | | | | | Consistently use bcopy(9) over memcpy(9). Notes: svn path=/head/; revision=233054
* Do not unnecessarily clear display memory when switching modes.Jung-uk Kim2012-03-161-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=233042
* If the VBE implementation does not support save/restore function, defer toJung-uk Kim2012-02-231-8/+5
| | | | | | | VGA methods. Unconditionally reset the VESA adapter before restoring state. Notes: svn path=/head/; revision=232069
* Update my copyright date.Jung-uk Kim2012-02-231-1/+1
| | | | Notes: svn path=/head/; revision=232065
* Probe supported states for save/restore function. Some VBE implementationJung-uk Kim2012-02-231-11/+11
| | | | | | | refuses to save/restore states if an unsupported bit is set. Notes: svn path=/head/; revision=232063
* Fix a typo introduced in r231843.Jung-uk Kim2012-02-231-1/+1
| | | | Notes: svn path=/head/; revision=232061
* Set the initial mode for the adapter after executing VESA BIOS POST.Jung-uk Kim2012-02-161-2/+5
| | | | | | | There is no need to set initial mode for BIOS. Notes: svn path=/head/; revision=231843
* Make sure the VESA mode number is between 256 and 511 inclusive.Jung-uk Kim2012-02-161-2/+4
| | | | Notes: svn path=/head/; revision=231842
* Properly check VESA video mode number.Jung-uk Kim2012-02-161-1/+1
| | | | Notes: svn path=/head/; revision=231841