Nico Huber uploaded patch set #3 to this change.

View Change

gma: Refactor Update_Outputs()

In Update_Outputs(), we used to have two steps, iterating over
all available pipes: We disabled all pipes whose mode changed
or that would be disabled otherwise. Then, we enabled all pipes
with new modes.

As checks for validity of the configurations were only done on
demand in the second step, that left us with no knowledge about
what configs would actually be tried. To make this information
available for future work, we add a validation step before the
existing two. That gives us:

1. Validate all new configs
2. Disable pipes
- whose mode changed
- that were disconneced
- whose config didn't validate
3. Enable/update pipes with new configs

This way, we can make global decisions ahead of 2. and 3. based
on the remaining, _valid_ configurations.

The `Loop_Invariant` of 1. allows us to keep the validation
in mind, to satisfy pre-conditions of the various steps ahead.
To not lose the validation, Fill_Port_Config() needs a post
condition and a little restructuring to prove it.

Change-Id: I079ae8f85c821a272b5d095c1ef437ee804aa9ac
Signed-off-by: Nico Huber <nico.h@gmx.de>
---
M common/hw-gfx-gma-config_helpers.adb
M common/hw-gfx-gma-config_helpers.ads
M common/hw-gfx-gma.adb
3 files changed, 74 insertions(+), 64 deletions(-)

git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/28/35528/3

To view, visit change 35528. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I079ae8f85c821a272b5d095c1ef437ee804aa9ac
Gerrit-Change-Number: 35528
Gerrit-PatchSet: 3
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@gmail.com>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-MessageType: newpatchset