Attention is currently required from: Furquan Shaikh, Maulik V Vaghela, Tim Wawrzynczak, Meera Ravindranath, Subrata Banik, Angel Pons, Patrick Rudolph. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56168 )
Change subject: drivers/intel/gma: Restructure Opregion version info code ......................................................................
Patch Set 6: Code-Review+1
(2 comments)
File src/drivers/intel/gma/opregion.h:
https://review.coreboot.org/c/coreboot/+/56168/comment/724d6fcf_f27c99e7 PS6, Line 37: #define IGD_OPREGION_VERSION 2 Please drop this macro, it is no longer used.
File src/drivers/intel/gma/opregion.c:
https://review.coreboot.org/c/coreboot/+/56168/comment/b86a243f_ad7054a0 PS6, Line 259: static void opregion_set_version(opregion_header_t *opheader) Looks like my comment on https://review.coreboot.org/c/coreboot/+/52758/comment/03016642_bb98db26/ was missed:
Another approach is to return a struct, but one needs to expose the struct type:
struct __packed opregion_version { u8 rsvd; u8 revision; u8 minor; u8 major; };
One would then declare `over` in the mailbox 0 struct as follows:
struct opregion_version over;
And the resulting function would then be:
static struct opregion_version opregion_get_version(void) { return (struct opregion_version) { .major = 2, .minor = 0 }; }
This function would then be used as follows:
opregion->header.over = opregion_get_version();
Thoughts?