intel/gma: Clarify code and use dedicated init for Google Peppy

Hardware / Coreboot - Ronald G. Minnich [gmail.com] - 25 August 2014 15:36 UTC

Peppy had some issues with FUI. We decided it was time to create peppy-specific gma.c and i915io.c files. Using yabel and the i915tool, we generated a replay attack, then interpolated against the slippy i915io.c to get something working.

Also, in preparation for moving code out of the mainboard gma.c to generic driver code, we got rid of some hardcodes in the mainboard gma.c that have no business being there. The worst were the computation of gmch_[m,n] and it turns out that we had some long-standing bugs related to confusion about 'bpp'. I've killed the word bpp everywhere I could because there are at least 3 things that correspond to bpp. We now have framebuffer, pipe, and panel bpp. The names are long because I want to avoid all the mistakes we've all been making in the last year :-) Sadly, that means a lot of changes not just peppy-related, but they are simple and in a good cause.

The test pattern generation is driven by a global variable in mainboard/peppy/gma.c. I've found in the past that it's very useful to have a function like this available, as one can activate it while using a jtag debugger: halt at the right place in ramstage, set the
variable to 1, continue. It's not enough code to worry about always including.

The last hard-codes for M and N registers are gone, and the function to set from generic intel_dp.c code works. To avoid screen trash on a dev mode boot, which we liked but nobody else did :-), we now take the time to put a pleasing background color that sort of doubles as a power LED.

Rough timing is ramstage start is at 2.2, and dev setup is done at 3.3. These new platforms are depressingly slow to boot. Rom init alone is taking 1.9 seconds. 13 years ago it was 3 seconds from power on to bash prompt. These CPUs are at least 10x faster and take much longer to get going.

Future work, once we get this through, is to move more functions to the intel driver, and combine the mainboard i915io.c into the mainboard gma.c. That separation only existed because i915io.c was generated by a tool, and it had lots of ugliness. Most ugliness is gone.

Old-Change-Id: I6a6295b423a41e263f82cef33eacb92a14163321

9518b56 intel/gma: Clarify code and use dedicated init for Google Peppy
src/cpu/samsung/exynos5250/chip.h | 2 +-
src/cpu/samsung/exynos5420/chip.h | 2 +-
src/drivers/intel/gma/i915.h | 3 +-
src/drivers/intel/gma/intel_ddi.c | 4 +-
src/drivers/intel/gma/intel_dp.c | 72 +++--
src/include/edid.h | 22 +-
src/include/vbe.h | 2 +-
src/lib/edid.c | 23 +-
src/mainboard/google/link/i915.c | 2 +-
src/mainboard/google/peppy/Kconfig | 3 +
src/mainboard/google/peppy/Makefile.inc | 1 +
src/mainboard/google/peppy/gma.c | 434 +++++++++++++++++++++++++++++++
src/mainboard/google/peppy/i915io.c | 144 ++++++++++
src/mainboard/google/peppy/mainboard.h | 25 ++
src/mainboard/google/pit/devicetree.cb | 2 +-
src/mainboard/google/pit/mainboard.c | 2 +-
src/mainboard/google/slippy/gma.c | 6 +-
src/mainboard/google/snow/devicetree.cb | 2 +-
src/mainboard/google/snow/mainboard.c | 2 +-
src/northbridge/intel/haswell/gma.c | 15 +-
src/northbridge/intel/nehalem/gma.c | 2 +-
21 files changed, 701 insertions(+), 69 deletions(-)

Upstream: review.coreboot.org


  • Share