Patch set 25:Code-Review +1
1 comment:
File src/mainboard/google/kukui/panel_krane.c:
Patch Set #15, Line 357: static struct panel_description *krane_panels[] = {
I did some experiment and found it not being very easy/clean at the moment. […]
Well... even with 8 byte per command some of your panels take up multiple KB right now. I think it would quickly become worth it. But I think it's okay to check these in like this and then do that later (if you hopefully still have time).
For loading, just allocate a big buffer that can easily hold your biggest panel. BSS is (relatively) cheap. It should just need something like
struct panel_description *get_panel_description(int panel_id)
{
char filename[64];
static u8 buffer[4*KiB];
/* ...maybe cache result if you want to call this more than once... */
if (!snprintf(filename, sizeof(filename), "panel-description-%d",
panel_id) ||
!cbfs_boot_load_file(filename, buffer, sizeof(buffer),
CBFS_TYPE_STRUCT))
return NULL;
return (struct panel_description *)buffer;
}
To view, visit change 33413. To unsubscribe, or for help writing mail filters, visit settings.