aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/stdvga.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2024-03-15 19:50:29 -0400
committerKevin O'Connor <kevin@koconnor.net>2024-03-15 19:50:29 -0400
commit1588fd1437960d94cadc30c42243671e8c0f1281 (patch)
tree0cf7998bd5397998f27af9291b078cde5ba3e603 /vgasrc/stdvga.c
parentd73e18bb70f8bf0c6fd405900dd267948dd6c3b2 (diff)
downloadseabios-1588fd1437960d94cadc30c42243671e8c0f1281.tar.gz
vgasrc: Rename vgahw_get_linesize() to vgahw_minimum_linelength()
Make the relationship between vgahw_get_linelength() and vgahw_get_linesize() more clear by renaming it to vgahw_minimum_linelength(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'vgasrc/stdvga.c')
-rw-r--r--vgasrc/stdvga.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c
index 9d8f556f..da67af41 100644
--- a/vgasrc/stdvga.c
+++ b/vgasrc/stdvga.c
@@ -275,6 +275,14 @@ stdvga_set_window(struct vgamode_s *curmode_g, int window, int val)
return -1;
}
+// Minimum framebuffer bytes between each vertical line for given mode
+int
+stdvga_minimum_linelength(struct vgamode_s *vmode_g)
+{
+ return DIV_ROUND_UP(GET_GLOBAL(vmode_g->width) * vga_bpp(vmode_g), 8);
+}
+
+// Return number of framebuffer bytes between start of each vertical line
int
stdvga_get_linelength(struct vgamode_s *curmode_g)
{
@@ -282,6 +290,7 @@ stdvga_get_linelength(struct vgamode_s *curmode_g)
return val * 8 / stdvga_vram_ratio(curmode_g);
}
+// Set number of framebuffer bytes between start of each vertical line
int
stdvga_set_linelength(struct vgamode_s *curmode_g, int val)
{
@@ -290,6 +299,7 @@ stdvga_set_linelength(struct vgamode_s *curmode_g, int val)
return 0;
}
+// Return framebuffer offset of first byte of displayed content
int
stdvga_get_displaystart(struct vgamode_s *curmode_g)
{
@@ -299,6 +309,7 @@ stdvga_get_displaystart(struct vgamode_s *curmode_g)
return addr * 4 / stdvga_vram_ratio(curmode_g);
}
+// Set framebuffer offset of first byte of displayed content
int
stdvga_set_displaystart(struct vgamode_s *curmode_g, int val)
{
@@ -321,11 +332,6 @@ stdvga_set_dacformat(struct vgamode_s *curmode_g, int val)
return -1;
}
-int
-stdvga_get_linesize(struct vgamode_s *vmode_g)
-{
- return DIV_ROUND_UP(GET_GLOBAL(vmode_g->width) * vga_bpp(vmode_g), 8);
-}
/****************************************************************
* Save/Restore state