Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32719 )
Change subject: drivers/apple: Add hybrid graphics driver ......................................................................
Patch Set 14:
(9 comments)
Sorry, I completely forgot about this review. If it ever happens again, feel free to ping me on irc.
https://review.coreboot.org/c/coreboot/+/32719/14//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/32719/14//COMMIT_MSG@11 PS14, Line 11: splitted split
https://review.coreboot.org/c/coreboot/+/32719/14/src/drivers/apple/hybrid_g... File src/drivers/apple/hybrid_graphics/acpi/gmux.asl:
PS14: This file is very confusing. What does it do?
https://review.coreboot.org/c/coreboot/+/32719/14/src/drivers/apple/hybrid_g... PS14, Line 30: Name (_PRW, Package (0x02) { 0x16, 0x03 }) Needs `gpi6_routing` in devicetree?
NB. I don't quite understand why this would generate a wake event?
https://review.coreboot.org/c/coreboot/+/32719/14/src/drivers/apple/hybrid_g... PS14, Line 33: Method (_L16, 0, NotSerialized) see above
https://review.coreboot.org/c/coreboot/+/32719/14/src/drivers/apple/hybrid_g... PS14, Line 44: \GP06 |= Arg0 `|= 0` seems like a no-op???
Also, I'm confused. Is it an input or output? Should it be switched to input maybe during sleep?
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... File src/drivers/apple/hybrid_graphics/gmux.h:
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... PS8, Line 45: int port
you're right.
Ack
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... File src/drivers/apple/hybrid_graphics/gmux.c:
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... PS8, Line 34: udelay(100);
Well, what you're saying seems logical, but this code is from apple-gmux linux driver. […]
Understood.
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... PS8, Line 38: return !!i;
Shouldn't this be `!(gwr & 0x01)`? i.e. […]
This however looks like a bug in the code flow and is not related to the hardware interface.
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... File src/drivers/apple/hybrid_graphics/romstage.c:
https://review.coreboot.org/c/coreboot/+/32719/8/src/drivers/apple/hybrid_gr... PS8, Line 30: /* TODO: Use generic device instead of dummy PNP device */
It's based on lenovo/hybrid_graphics. […]
I would simply try `device generic` in the dt and find_dev_path() here. Maybe I think it's too easy, no idea what could go wrong.