summaryrefslogtreecommitdiff
path: root/sys/dev/wsfb
AgeCommit message (Collapse)Author
2021-08-30Add 10-bit pixel format support.jmcneill
2021-08-07Merge thorpej-cfargs2.thorpej
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2021-01-27add optional glyph cache for genfbmacallan
enable with options GENFB_GLYPHCACHE=n with n being the desired size of the cache in MB. Should be enough to cache at least 900 glyphs in whatever video mode used in order to be effective in 32bit per pixel that's about 1MB
2021-01-26remove outdated commentmacallan
2021-01-17Prefer printing the framebuffer's PA instead of VA. It's much more useful..jmcneill
2020-10-19Add "is_swapped" property which indicates 32-bpp framebuffer isrin
byte-swapped.
2020-10-18Revert rev 1.75; do not set WSFB_VRAM_IS_RAM flag bit. It indicatesrin
memory type obtained by mmap. I just misunderstood its intention. Thanks to jmcneill for pointing it out!
2020-10-18Remove stray TABs. No binary changes.rin
2020-10-18For WSDISPLAYIO_GET_FBINFO ioctl, set WSFB_VRAM_IS_RAM to fbi_flagsrin
when shadow FB is used.
2020-06-11Update for proplib(3) API changes.thorpej
2020-05-30reduce stack usage in genfb_calc_hsize()jdolecek
2020-04-13 Get genfb's address offset correctly when the vaule >= 4G. OK's by jmcneill.msaitoh
Tested on Intel BXNUC10I3FNK (Comet Lake U).
2020-02-23Do not replay the msgbuf if we are booting silent or quiet.martin
2019-08-09Fix bug introduced in rev. 1.69:rin
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wsfb/genfb.c#rev1.69 is_bgr should be initialized to false. Otherwise, color becomes strange for depths 24 and 32 unless backend explicitly set "is_bgr" property.
2019-08-07We support anti-aliasing for depth 2.rin
Use switch appropriately.
2019-08-02Notify size of shadow framebuffer if enabled.rin
2019-07-29Enable anti-aliasing for depth 24.rin
Style.
2019-07-28sys/dev/rasops routines support anti-aliasing for depths 15 and 16.rin
2019-07-26Add genfb(4) driver for mac68k grfbus.rin
1, 2, 4, 8, 15, and 32 color-depths are supported. ANSI colors on console are functional for depth >= 4. Graphic applications based on wsfb API should work, provided they can correctly handle fbi_fboffset and your color depth. wsfb driver of Xorg 1.20 and mlterm-fb (framebuffer version of x11/mlterm) work fine for depth == 1 || depth >= 8. For depth == 8 (256 colors), graphic applications require colormap callback, which is currently supported for some internal graphic adapters, and only Civic (found on Quadra AV series) was tested. Register definition and its usage are taken from Linux. You can easily support other adapters if Linux supports that. Have fun, and any problem reports are welcomed!
2019-05-31If an EDID is available, attempt to use the screen size to influence fontjmcneill
selection by passing a "wantcols" value to rasops_init that is satisfied by a font that is at least 3mm wide.
2018-09-03Rename min/max -> uimin/uimax for better honesty.riastradh
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended. HOWEVER! Some subsystems have #define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b)) even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation. To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it. I have left a handful of bootloaders that are too annoying to compile-test, and some dead code: cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4)) It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them. Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
2018-03-06Fix cmap bounds checking.mlelstv
2018-01-21CID-1427771: Remove incorrect pre-condition (index cannot be 256!)christos
2017-06-01remove checks for failure after memory allocation calls that cannot fail:chs
kmem_alloc() with KM_SLEEP kmem_zalloc() with KM_SLEEP percpu_alloc() pserialize_create() psref_class_create() all of these paths include an assertion that the allocation has not failed, so callers should not assert that again.
2017-05-19enable font loading and screen resizingmacallan
2017-02-25genfb(4): Enabling/Disabling shadowfb can be controlled via prop.nonaka
2015-06-01Fix splashscreen on resolutions where text is centered.nat
This commit was approved by macallan@
2015-05-01Include splash with genfb.nat
splash.o is only included with options SPLASHSCREEN. splash_image.o target moved to Makefile.kern.inc. This commit was approved by matt@
2015-03-20support 24bpp framebuffersjmcneill
2014-09-10handle WSDISPLAYIO_GET_EDID and WSDISPLAYIO_GET_FBINFO only if the busmacallan
frontend doesn't ( as in, returns EPASSTHROUGH or doesn't register a handler ) Now flags passed from things like bcm2835_genfb.c are actually seen by xf86-video-wsfb again and automatically disabling shadowfb works again, which results in a major speedup on this kind of hardware.
2014-07-24Add enable/disable polling hooks to genfb_ops.riastradh
2014-07-23RCS IDs do not go in header files.riastradh
2014-07-22Do not printf(foobar()). Bad bad bad bad bad!riastradh
2014-03-18Merge riastradh-drm2 to HEAD.riastradh
2014-01-22Provide a wsdisplay_accessops.pollcskrll
This makes sure that the screen gets painted properly during early boot input (e.g. boot -a) on the Raspberry PI.
2013-10-09support WSDISPLAYIO_GET_FBINFOmacallan
2013-01-10for WSDISPLAYIO_SMODE, if the bus ioctl handler returns EPASSTHROUGH, dont ↵jmcneill
treat it as an error
2013-01-09aprint_verbose -> aprint_debugjmcneill
2012-04-12in 32 bit colour assume RGB ordering, allow override using a device propertymacallan
2012-02-07On 8-bit screens only enable font anti-aliasing when the cmap_callbackphx
property is defined. It is needed for a suitable R3G3B2 color map. Ok by releng@
2012-01-11use rasops_init(0, 0)macallan
2012-01-04support anti-aliased fonts in 8 bit, generate an appropriate colour mapmacallan
2011-12-28if the cursor row passed in a device property doesn't fit on the screen justmacallan
ignore it and clear the screen
2011-12-22support anti-aliased fonts in 32bit colourmacallan
2011-07-13use callbacks that match the ioctl() interface to control backlightmacallan
2011-06-02some steps to make multiple instances work:macallan
- don't bail if we're not the console. If we get the right paramters there is no reason not to work - move wsdisplay_accessops into the softc - call wsdisplay_cnattach only if we're the console
2011-03-08fix build for LP32macallan
thanks to uebayasi@
2011-03-08look for a 'virtual_address' property and use it as fb addressmacallan
2011-02-22genfb_enable/disable_polling only matters if genfb is the console screen,jmcneill
so make it a noop if it's not