[coreboot-gerrit] Change in coreboot[master]: coreboot_tables: Comment struct lb_framebuffer

Nico Huber (Code Review) gerrit at coreboot.org
Sat Jan 27 16:50:38 CET 2018


Nico Huber has uploaded this change for review. ( https://review.coreboot.org/23466


Change subject: coreboot_tables: Comment struct lb_framebuffer
......................................................................

coreboot_tables: Comment struct lb_framebuffer

Try to clarify `bytes_per_line`. This was ignored in CorebootPayloadPkg
for some reason and led to some confusion.

Maybe we should document some of the other fields as well. I would have
thought, though, it's self-explanatory, but I also thought that about
`bytes_per_line`.

Change-Id: I5e1343b5fe37ac106e61e6907fbcc1737ac56f8b
Signed-off-by: Nico Huber <nico.h at gmx.de>
---
M src/commonlib/include/commonlib/coreboot_tables.h
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/23466/1

diff --git a/src/commonlib/include/commonlib/coreboot_tables.h b/src/commonlib/include/commonlib/coreboot_tables.h
index eaa3c4e..6882213 100644
--- a/src/commonlib/include/commonlib/coreboot_tables.h
+++ b/src/commonlib/include/commonlib/coreboot_tables.h
@@ -219,6 +219,17 @@
 	uint64_t physical_address;
 	uint32_t x_resolution;
 	uint32_t y_resolution;
+	/**
+	 * `bytes_per_line` gives the offset in bytes from one line to
+	 * another. Thus, the data for a pixel with the coordinates (X, Y)
+	 * from the upper left corner starts at
+	 *
+	 *   physical_address + Y * bytes_per_line + X * bits_per_pixel / 8
+	 *
+	 * `bytes_per_line` is always big enough to hold `x_resolution`
+	 * pixels. It can, however, be chosen arbitrarily higher (e.g.
+	 * to fulfill hardware constraints or for optimization purposes).
+	 */
 	uint32_t bytes_per_line;
 	uint8_t bits_per_pixel;
 	uint8_t red_mask_pos;

-- 
To view, visit https://review.coreboot.org/23466
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e1343b5fe37ac106e61e6907fbcc1737ac56f8b
Gerrit-Change-Number: 23466
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h at gmx.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180127/192c5ad6/attachment-0001.html>


More information about the coreboot-gerrit mailing list