Thanks for the explanation, I get what you're trying to do now. I think it should work except for two issues:

1. It removes the safety-check for "did someone forget to set the right option". The problem is that when someone creates a new mainboard, they may not know that they were supposed to select FORCE_DISPLAY_INIT because they don't use display_init_required() anyway. That may lead to unnecessary extra resets in some edge cases that are hard to notice. (Then again, I don't think we're going to make a lot more Chromebooks that init their displays unconditionally in the future, so if you think this makes things cleaner I'm willing to let go of that extra assertion.)
2. It doesn't do the right thing for devices that don't have a display at all. In order to keep the vboot API small, we have the slightly weird requirement that a device which doesn't have a display must pass DISPLAY_INIT in the context of vb2api_fw_phase1() to avoid those extra resets (the current code just does that because they would never select MUST_REQUEST_DISPLAY). Maybe there's some other Kconfig we could check in addition to determine whether there's a display at all? (Maybe HAVE_LINEAR_FRAMEBUFFER? But that option doesn't seem to be super well-maintained because it doesn't really do much... e.g. MT8183/GOOGLE_KUKUI doesn't seem to set it. If we wanted to rely on that it would be good to have an assertion that reminds people to select it from their SoCs... maybe in set_vbe_mode_info_valid()?)

View Change

3 comments:

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I52288b0d5f33cd11d84e609e039dc4ea16ff7bdf
Gerrit-Change-Number: 34622
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra@intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Amol N Sukerkar <amol.n.sukerkar@intel.com>
Gerrit-Reviewer: Boon Tiong Teo <boon.tiong.teo@intel.com>
Gerrit-Reviewer: Damien Zammit
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Ronak Kanabar <ronak.kanabar@intel.com>
Gerrit-Reviewer: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Varshit B Pandya <varshit.b.pandya@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Joel Kitching <kitching@google.com>
Gerrit-CC: Lean Sheng Tan <lean.sheng.tan@intel.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Wed, 31 Jul 2019 00:30:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment