intel: Prepare registers so Windows drivers are happier

Change-Id: I12ebed30de4df9814ccb62341c7715fc62c7f5b9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/23431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Patrick Georgi 2018-01-25 18:23:15 +01:00 committed by Patrick Georgi
parent 26436fb09a
commit 0f68b23aaf
5 changed files with 7 additions and 1 deletions

View File

@ -285,6 +285,7 @@ intel_gma_init_igd_opregion(igd_opregion_t *opregion)
opregion->header.mailboxes = MAILBOXES_MOBILE;
// TODO Initialize Mailbox 1
opregion->mailbox1.clid = 1;
// TODO Initialize Mailbox 3
opregion->mailbox3.bclp = IGD_BACKLIGHT_BRIGHTNESS;

View File

@ -42,6 +42,8 @@ uintptr_t graphics_soc_write_acpi_opregion(struct device *device,
current += sizeof(igd_opregion_t);
opregion->mailbox1.clid = 1;
/* TODO Initialize Mailbox 3 */
opregion->mailbox3.bclp = IGD_BACKLIGHT_BRIGHTNESS;
opregion->mailbox3.pfit = IGD_FIELD_VALID | IGD_PFIT_STRETCH;

View File

@ -480,6 +480,7 @@ static int update_igd_opregion(igd_opregion_t *opregion)
struct device *igd;
/* TODO Initialize Mailbox 1 */
opregion->mailbox1.clid = 1;
/* TODO Initialize Mailbox 3 */
opregion->mailbox3.bclp = IGD_BACKLIGHT_BRIGHTNESS;

View File

@ -58,7 +58,7 @@ enum cb_err init_igd_opregion(igd_opregion_t *opregion)
/* 8KiB */
opregion->header.size = sizeof(igd_opregion_t) / KiB;
opregion->header.version = IGD_OPREGION_VERSION;
opregion->header.version = IGD_OPREGION_VERSION << 24;
/* FIXME We just assume we're mobile for now */
opregion->header.mailboxes = MAILBOXES_MOBILE;

View File

@ -67,6 +67,8 @@ static void update_igd_opregion(igd_opregion_t *opregion)
{
u16 reg16;
opregion->mailbox1.clid = 1;
/* Initialize Mailbox 3 */
opregion->mailbox3.bclp = IGD_BACKLIGHT_BRIGHTNESS;
opregion->mailbox3.pfit = IGD_FIELD_VALID | IGD_PFIT_STRETCH;