aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fb/fbd.c
Commit message (Collapse)AuthorAgeFilesLines
* chore: replace {0, 0} with {DEV,KOBJ}METHOD_ENDEnji Cooper2026-02-251-1/+1
| | | | | | | | | | | | | | Both of the aforementioned macros have been present in FreeBSD for well over a decade: 2009 for `KOBJMETHOD_END`; 2011 for `DEVMETHOD_END`. Adapt all hardcoded references of `{0, 0}` with `DEVMETHOD_END` and `KOBJMETHOD_END` as appropriate. This helps ensure that future adaptations to drivers following patterns documented in driver(9) can be made more easily/without issue. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D55414
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Fix various places which cast a pointer to a vm_paddr_t or vice versa.John Baldwin2022-10-031-2/+2
| | | | | | | | GCC warns about the mismatched sizes on i386 where vm_paddr_t is 64 bits. Reviewed by: imp, markj Differential Revision: https://reviews.freebsd.org/D36750
* Adjust fbd_list() definition to avoid clang 15 warningDimitry Andric2022-07-191-1/+1
| | | | | | | | | | | | | | | With clang 15, the following -Werror warnings is produced: sys/dev/fb/fbd.c:205:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] fbd_list() ^ void This is because fbd_list() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days
* Remove unused fbd_devclass.John Baldwin2022-05-061-5/+3
|
* Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrightsEd Maste2021-08-081-1/+0
| | | | | | | These ones were unambiguous cases where the Foundation was the only listed copyright holder (in the associated license block). Sponsored by: The FreeBSD Foundation
* vm_ooffset_t is now unsignedEric van Gyzen2020-09-181-1/+1
| | | | | | | | | | | | | vm_ooffset_t is now unsigned. Remove some tests for negative values, or make other adjustments accordingly. Reported by: Coverity Reviewed by: kib markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D26214 Notes: svn path=/head/; revision=365886
* Include eventhandler.h in more compilation unitsConrad Meyer2019-05-211-0/+1
| | | | | | | | | | | | | | | | This was enumerated with exhaustive search for sys/eventhandler.h includes, cross-referenced against EVENTHANDLER_* usage with the comm(1) utility. Manual checking was performed to avoid redundant includes in some drivers where a common os_bsd.h (for example) included sys/eventhandler.h indirectly, but it is possible some of these are redundant with driver-specific headers in ways I didn't notice. (These CUs did not show up as missing eventhandler.h in tinderbox.) X-MFC-With: r347984 Notes: svn path=/head/; revision=348026
* sys/dev: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Notes: svn path=/head/; revision=326255
* Provide way for framebuffer driver to request mmap(2) mapping typeOleksandr Tymoshenko2016-10-011-0/+2
| | | | | | | | | | | | | | | | | | | | On ARM if memattr is not overriden mmap(2) maps framebuffer memory as WBWA which means part of changes to content in userland end up in cache and appear on screen gradually as cache lines are evicted. This change adds configurable memattr that hardware fb implementation can set to get the memory mapping type it requires: - Add new flag FB_FLAG_MEMATTR that indicates that framebuffer driver overrides default memattr - Add new field fb_memattr to struct fb_info to specify requested memattr Reviewed by: ray Differential Revision: https://reviews.freebsd.org/D8064 Notes: svn path=/head/; revision=306555
* 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
* 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 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
* 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
* 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-051-0/+467
Reviewed by: nwhitehorn MFC_to_10_after: re approval Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=259016