mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 09:44:13 +00:00
kboot: Save notch height in dcp node
DCP will use this information to provide "notch-less" display modes. Signed-off-by: Janne Grunau <j@jannau.net>
This commit is contained in:
parent
53e6254497
commit
0bb521c2c3
1 changed files with 12 additions and 0 deletions
12
src/kboot.c
12
src/kboot.c
|
@ -240,7 +240,19 @@ static int dt_set_chosen(void)
|
|||
|
||||
// We do not need to reserve the framebuffer, as it will be excluded from the usable RAM
|
||||
// range already.
|
||||
|
||||
// save notch height in the dcp node if present
|
||||
if (cur_boot_args.video.height - fb_height) {
|
||||
int dcp = fdt_path_offset(dt, "dcp");
|
||||
if (dcp >= 0)
|
||||
if (fdt_appendprop_u32(dt, dcp, "apple,notch-height",
|
||||
cur_boot_args.video.height - fb_height))
|
||||
printf("FDT: couldn't set apple,notch-height\n");
|
||||
}
|
||||
}
|
||||
node = fdt_path_offset(dt, "/chosen");
|
||||
if (node < 0)
|
||||
bail("FDT: /chosen node not found in devtree\n");
|
||||
|
||||
int ipd = adt_path_offset(adt, "/arm-io/spi3/ipd");
|
||||
if (ipd < 0)
|
||||
|
|
Loading…
Reference in a new issue