33 Commits

Author SHA1 Message Date
Michael Bishop
95ac371146 [lib][gfx] fix undefined flush pointer
all places that call flush, check if its null before calling it
but its never actually written to, so it can sometimes point to garbage and just fault
2022-09-25 18:16:52 -07:00
Travis Geiselbrecht
6462cbf51c [arch][fpu] add ability to specify per file or module if code needs fpu
Have the arch define additional compiler flags to explicit support or
not support a floating point unit.

Add ability for modules to per file or for the whole module mark code
as needing floating point support.

Add default flags for arm64, riscv, and x86 toolchains.

Needed because gcc 12 is getting much more aggressive about using vector
instructions for non float code, so getting away with avoiding it was
no longer working.

Still not perfect: printf code is being compiled with float, so it's
possible to use floating point instructions inside core kernel or
interrupt handling code if a printf is used.

Possibly will have problems on architectures where mixing float and non
float code at the linker generates issues, but so far seems to be okay.
2022-07-17 16:32:24 -07:00
Travis Geiselbrecht
fcb65c9a88 [dev/lib][warnings] fix -Wmissing-declarations warnings in dev/ and lib/ 2021-10-21 23:16:20 -07:00
Travis Geiselbrecht
ba530722f5 [warning] add -Wdouble-promotion
Mostly just a few warnings where things are promoted via passing floats to
printf. Those we should generally remove anyway because they're just
benchmarking code. Most things LK runs on either doesn't have float or
doesn't have double sized floats.
2020-07-25 17:16:22 -07:00
Travis Geiselbrecht
4edb93adde [lib][console] rename some console command types to be prefixed with console_
Some of the structures, notably 'cmd', in the lib console stuff are a
little too generically named and have collided with some other code
so prefix the names a bit more cleanly with console_

The change is largely mechanical, and folks with out of tree code can
easily switch by renaming:
cmd -> console_cmd
cmd_args -> console_cmd_args
cmd_block -> console_cmd_block
console_cmd -> console_cmd_func

Apologies if this breaks you but it should be pretty easy to fix.
2020-07-25 15:59:58 -07:00
Travis Geiselbrecht
6cb02526b7 [include][console] split lib/console.h into two
TL;DR most uses of lib/console.h -> lk/console_cmd.h

Move the part that lets a piece of code somewhere in the system to
define a console command from the actual lib/console api to start an
instance of the console. Move in almost every place the user of the
console command definition to the new header, lk/console_cmd.h which is
always in the include path.

Also remove most uses of testing for WITH_LIB_CONSOLE since you can
almost always just safely define it and then let the linker remove it.
2019-07-13 16:56:33 -07:00
Travis Geiselbrecht
3aecdda231 [includes] replace header guards with #pragma once 2019-07-13 15:46:16 -07:00
Travis Geiselbrecht
cba9e47987 [license] replace the longer full MIT license with a shorter one
Used scripts/replacelic. Everything seems to build fine.
2019-07-05 17:22:23 -07:00
Travis Geiselbrecht
3699e45942 [include][lib] move most of the dangling top level include/lib/.h files into their lib
Only remaining one is console.h which is a little funny and will need to
be dealt with separately.
2019-06-19 22:44:15 -07:00
Travis Geiselbrecht
d8fa82cb91 [formatting] run everything through codestyle
Almost nothing changes here except moving braces to the same line as the
function declaration. Everything else is largely whitespace changes and
a few dangling files with tab indents.

See scripts/codestyle
2019-06-19 21:02:24 -07:00
Travis Geiselbrecht
1b7a28efb8 [include][lk] fixup lk/ include path move 2019-06-19 19:46:11 -07:00
Travis Geiselbrecht
42ddc062f3 [lib][gfx][mandelbrot] fix spelling, switch to single precision 2019-06-14 19:53:41 -07:00
Travis Geiselbrecht
2e417c0488 [lib][gfx][mandelbrot] make sure alpha channel is set
stm32f7 discovery board apparently requires the alpha channel to be set.
2019-06-10 17:10:42 -07:00
Eric Holland
d90cb4e7c6 [gfx] Add mandelbrot test to gfx routines (#149) 2016-08-12 10:28:12 -07:00
cstout
c1255f7f47 [display] Refactor to avoid implicit framebuffer allocation.
Preparation to allow other images to be presented to the display.
Separate definitions of display and image formats.
display_get_info no longer provides a framebuffer.
display_get_framebuffer allocates a framebuffer for convenience.

Review URL: https://codereview.chromium.org/1777783003 .
2016-03-10 09:49:22 -08:00
cstout
0737848cde [target][dartuinoP0] Allow for varying framebuffer format and stride.
Remove dependency on gfx.
Add support for mono display LS013B7DH03.

R=gkalsi@google.com, travisg@gmail.com

Review URL: https://codereview.chromium.org/1741463002 .
2016-02-25 13:38:00 -08:00
Travis Geiselbrecht
d569c090ea [vim] remove vim expandtab comments on most of the files 2016-02-14 12:32:07 -08:00
Gurjant Kalsi
7b453164dd [qemu][m4][gfx][display] Get the VNC based LCD working on the qemu-m4 port. 2015-12-16 16:05:36 -08:00
Travis Geiselbrecht
a100ff384f [lib][gfx] add MONO -> MONO blitting support 2015-12-14 15:20:25 -08:00
Gurjant Kalsi
826be8b49d [dartuino][lcd][gfx] Added support for colour lcd, refactored sharp lcd code 2015-12-14 13:24:34 -08:00
Gurjant Kalsi
87860fd2bd [gfx][colour] Separate surface manipulation functions from colour translation functions 2015-12-08 10:57:59 -08:00
Gurjant Kalsi
5e23cdebaf [gfx][dartuino][lcd] Get the sharp memory lcd working on the dartuino 2015-12-07 12:47:32 -08:00
Carlos Pizano
db1ff1983d Add basic line drawing command
and clean up tabs in the file.

BUG=
R=travisg@google.com

Review URL: https://codereview.chromium.org/1411033002 .
2015-10-16 18:45:23 -07:00
Travis Geiselbrecht
c7ce0b9361 [lib][display] update display_get_info to return success/failure
Update all the users to check for error.
2015-10-08 15:54:40 -07:00
Travis Geiselbrecht
9e2bc8ebf0 [lib][gfx] call gfx_flush at the end of the debug patterns 2015-08-21 12:00:07 -07:00
Travis Geiselbrecht
014d98c43b [lib][gfx] make sure gfx library puts bits in the alpha channel
-Also add a few more test routines to the console
2015-08-17 16:02:18 -07:00
Dima Zavin
e8a9b4b7a4 [libc] move tracing out of debug into separate trace.h
Change-Id: I7476fc17b587a0ea2a42cbe3d49b72063e4c5dc8
Signed-off-by: Dima Zavin <dima@android.com>
2013-08-05 10:04:29 -07:00
Travis Geiselbrecht
98b4e0938e [make] rename DEBUGLEVEL -> LK_DEBUGLEVEL, remove DEBUG define
-Remove top level DEBUG=<N> define
-Rename DEBUGLEVEL to LK_DEBUGLEVEL to be clear.
-Fix the places that used DEBUGLEVEL and the few spots that #ifdef
on DEBUG.
2013-06-07 22:27:00 -07:00
Travis Geiselbrecht
9b961b4a34 [lib] run all of lib and include through astyle 2012-10-31 21:47:17 -07:00
Travis Geiselbrecht
e50d0dde0b [warnings] fix a couple of dangling warnings in some little-used libs 2012-10-13 21:40:04 -07:00
Travis Geiselbrecht
97cfd0bfa4 [make] update all of the rules.mk to use the new module system 2012-08-31 15:52:24 -07:00
Travis Geiselbrecht
affed1c106 [lib] add more references to assert.h 2012-04-23 15:52:31 -07:00
Travis Geiselbrecht
8712ae7cc5 [lib] generic graphics routines 2010-05-21 22:30:10 -07:00