-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pc-tty: add framebuffer-based console #515
Open
adamgreloch
wants to merge
4
commits into
master
Choose a base branch
from
adamgreloch/RTOS-925
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 tasks
adamgreloch
force-pushed
the
adamgreloch/RTOS-925
branch
from
October 4, 2024 08:16
35702e8
to
2654383
Compare
adamgreloch
force-pushed
the
adamgreloch/RTOS-925
branch
from
October 4, 2024 12:40
2654383
to
548f3f7
Compare
adamgreloch
force-pushed
the
adamgreloch/RTOS-925
branch
3 times, most recently
from
October 7, 2024 07:33
6d0bbae
to
1370274
Compare
adamgreloch
force-pushed
the
adamgreloch/RTOS-925
branch
2 times, most recently
from
October 21, 2024 07:58
c8fb3ba
to
7a450db
Compare
agkaminski
reviewed
Oct 21, 2024
adamgreloch
force-pushed
the
adamgreloch/RTOS-925
branch
from
October 21, 2024 09:48
7a450db
to
be2c3eb
Compare
agkaminski
reviewed
Oct 29, 2024
tty/pc-tty/ttypc_fbcon.c
Outdated
static void _drawPixel(ttypc_vt_t *vt, uint16_t x, uint16_t y, uint32_t color) | ||
{ | ||
ttypc_t *ttypc = vt->ttypc; | ||
*(volatile uint32_t *)((addr_t)ttypc->fbaddr + (x * (ttypc->fbbpp / 8U)) + (y * ttypc->fbpitch)) = color; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addr_t
is reserved for physical addresses. Use uintptr_t
or, even better, char *
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to uintptr_t
for now. What's the idea behind char *
?
Adds a graphics mode console that prints terminal output in 8x16 font to a linear framebuffer located under address queried via platformctl/pctl_graphmode in a 80x25 terminal resolution. This implementation assumes ARGB ordering of the framebuffer JIRA: RTOS-925
Graphical apps can now disable console drawing via ioctl/TTYSETMODE to ensure uninterrupted drawing (otherwise app and console would draw to the framebuffer in the same time, causing mess) JIRA: RTOS-925
Current vt will now automatically resize from 80x25 to the maximum resolution supported by current graphic mode if fbcon is enabled (i.e. for 1280x800 and 8x16 font it will resize to 160x50) JIRA: RTOS-925
Since the _ttypc_vga_{set,read,write,move} have the ttypc_vt_t already passed, they can retrieve the vga pointer from that struct. This also makes the API more secure in case of fbcon, which implicitly assumed vga == vt->vram when calculating char positions. Now this assumption is guaranteed JIRA: RTOS-925
adamgreloch
force-pushed
the
adamgreloch/RTOS-925
branch
from
October 30, 2024 15:52
be2c3eb
to
25efa68
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a graphics mode console that prints terminal output in 8x16 font to a linear framebuffer located under address queried via platformctl/pctl_graphmode in a maximum resolution supported by current graphic mode
This implementation assumes ARGB ordering of the framebuffer
JIRA: RTOS-925
Description
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment
cmd: add vbe modesetting command plo#352
phoenix: add fbcon ioctls libphoenix#386