Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39430 )
Change subject: edid_fill_fb: Add row_alignment argument ......................................................................
Patch Set 13:
(1 comment)
To be honest, I knew the edid struct is messed up and just avoided it. But that struct shouldn't affect drivers that don't use it anyway.
I would prefer to keep an API for `bytes_per_line`. Maybe just take both arguments and use the maximum or bail out if both aren't 0? I know there is only one case where we don't know an alignment (VBE), but the solution looks too hack'ish for my taste.
If you feel strong about it and want to keep vbe_get_row_ alignment(), please add an elaborate comment so no future reader has to have doubts why it's working.
https://review.coreboot.org/c/coreboot/+/39430/13/src/include/vbe.h File src/include/vbe.h:
https://review.coreboot.org/c/coreboot/+/39430/13/src/include/vbe.h@114 PS13, Line 114: * Calculate row alignment from given parameters. It's not actually calculating the row alignment. It just gives a number that is good enough to reconstruct `bytes_per_line` later. For instance if the row alignment is 64 and `scanline_bytes` is 640, it would just return 1 (which is ok given the context where this is used, but only there).