Commit Graph

112 Commits

Author SHA1 Message Date
Nico Huber
98a673dc57 gma ddi: Move conditionally used Program_Buffer_Translations()
When compiled for Broxton, Buffers.Translations() is a stub and GCC 8
correctly identifies the use of unitialized fields. However, it can't
see that it's never called in that case. Draw the definition of
Program_Buffer_Translations() inside the respective `if` to make that
clear.

Change-Id: I8edbb8ac9249d76465d1cd07526fb6eeef0618e1
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/26305
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
2018-05-19 20:38:15 +00:00
Arthur Heymans
60d0e5f9f6 gma: Add Pipe_Index to the Connectors.Post_On method
On GMCH targets the Pipe index needs to be programmed in the output
register.

Change-Id: I6a614a9359c95adb59a1b6d0e34febe302fcfbf8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25410
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 13:01:30 +00:00
Arthur Heymans
e87d0d1e2b gma: Add flag to use GMCH PP registers
Change-Id: Ia94af6340bdf329328f265fb9424224c1ab5f45f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25408
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 13:00:30 +00:00
Arthur Heymans
5d08a93cb9 gma: Add GPU_Port types that are convenient for GMCH to use
Change-Id: I9120d084637d36a7e2276fcf3f630b3f7ed32509
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25407
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 13:00:26 +00:00
Arthur Heymans
636390ca01 gma: Add a flag to use GMCH transcoder registers
Change-Id: Ic9bff918bdcab3c5c55316cb6de1a8a8bf1c6430
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25406
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 13:00:19 +00:00
Arthur Heymans
229ed1c7bf gma: Add flag to use GMCH GMBUS registers
Change-Id: Id5d115c7a4711f634171e6e163439ebab4ee6076
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25405
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 12:59:55 +00:00
Arthur Heymans
dfcdd77f8e gma: Add flag to allow use of VGACNTRL on GMCH
Change-Id: If2f12f14b4f367cdfc8cc2c20402f2350e3bbba8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25404
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 12:59:46 +00:00
Arthur Heymans
d1988d1a03 gma: Make Raw_Clock a variable
On GMCH the Raw_Clock depends on the FSB frequency.

Change-Id: I11af9ecb3504983ba1d3136c1b82bd14363afdba
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/25403
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-04-03 12:59:42 +00:00
Nico Huber
7628493a7e gfx_test: Update i915 binding in wrapper script
Always load i915 even if it wasn't loaded before. Also, force
`modeset=1` as that's our use case and we might have booted with
`i915.modeset=0`. Last but not least, search for the correct
vtcon* entry in sysfs instead of guessing, and always unbind it
(i.e. unbind the dummy driver when we want to switch back to
i915).

Change-Id: Ib62a05a3621aef2992372a6d3acad1196a363a95
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22715
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:28:16 +00:00
Nico Huber
9ca69f14ba gfx_test: Add top marker for rotated framebuffers
Mark the top with an arrow. Desperately needs anti aliasing.

Change-Id: Ide0e06c29fefc8b5288714d53ee9fa15df2d5452
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22714
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:27:00 +00:00
Nico Huber
88f3c98b1a gfx_test: Add rotation parameter
Pass the requested rotation through to libgfxinit and enable Y tiling
in case of 90° rotations.

Change-Id: Icc4c4ee1ce43ecf1603cb673f1a10609494f757d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22713
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:26:47 +00:00
Nico Huber
244ea7e88f gfx_test: Add corner markers to test screen
Show a white-framed square with rotating colors in each corner.

Change-Id: Ifcd20a3f531c9cebcaf0e7502a76ffb7ff6ca4f8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22712
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:26:43 +00:00
Nico Huber
9b479412a7 gma: Add support for rotated framebuffers
As for the tiling, we enable support for rotated framebuffers on
platforms with Plane_Control. On every path where a rotated frame-
buffer may be expected, we have to exchange width and height in
case of 90 degree rotations. Beside the rotation setting itself,
the hardware needs to know the vertical stride instead of the hori-
zontal and a delicate page mapping in case of 90 degree rotations.
For that we divide the GTT space into two, the lower half contains
the linear mappings, the upper half mappings for a rotated scanout.

Change-Id: I1c901b7abc0fe7764bee87f6fda58ba9fa3f340d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22711
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:26:37 +00:00
Nico Huber
b7470499e8 Add Rotation setting to Framebuffer
Add a Rotation setting to the Framebuffer type that tells us if the
framebuffer is rotated by 90, 180 or 270 degrees. The hardware should
rotate the picture in the opposite direction before display.

To support more complex memory layouts, we also add a V_Stride (ver-
tical stride) setting.

Change-Id: I6430fb44b5c9cfcf9fa58684a425e8c2e4647ac3
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/22710
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:26:31 +00:00
Nico Huber
0164b024a6 gma: Set tiled framebuffers up through Plane_Control
On platforms with Plane_Control registers (Broxton/Skylake+) we can
use X and Y tiled framebuffers for scanout (older platforms support
X tiling only). As our main use case is 90° rotation with Y tiled
framebuffers, we implement it for the newer platforms only for now.

We also set up a fence register for linear access to the tiled frame-
buffer through the aperture.

Change-Id: I913c82f62fd28b681a06ce13f41160a07e559799
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22709
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:26:03 +00:00
Nico Huber
b03c8f19ae gma registers: Add procedures to set fence registers
Through fence registers, we can tell the hardware which parts of the
aperture cover tiled framebuffers. Only legacy X and Y tiling is sup-
ported. According to `i915_reg.h` there are 16 fence registers from
G4x on and 32 from Ivy Bridge on (this only partially matches docu-
mentation: Haswell has 16 regs documented and the fence registers
were not documented at all before).

Change-Id: I02edc99b315e24dc175c6f93aff627e59cb1ff0b
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/22708
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: Nico Huber <nico.h@gmx.de>
2017-12-12 14:25:56 +00:00
Nico Huber
51375ad75a Add Tiling setting to Framebuffer
Beside linear framebuffers, we can, on Intel hardware, easily support X
and Y tiled framebuffers too. If we access the framebuffer through the
aperture window, we can let the hardware handle the tiling.

Tiling generally divides the framebuffer into rectangular pieces of
fixed size where each piece, or tile, is represented by one page of
memory. Even inside one tile, the pixels are not always ordered linearly
but either in a row-major (aka. X tiled) or column-major (aka. Y tiled)
manner.

Change-Id: I3e6f93caa8f2485a5792d72cfe2e8b3902add7a3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22707
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:04:43 +00:00
Nico Huber
e7ac6ebddc gma: Implement PCI Id based generation check
We were used to sanity check the GPU generation by the audio id because
that was easily accessible in MMIO space and only one number per gene-
ration. It doesn't work on Skylake, though, so we read PCI ids instead.

Change-Id: Id6c9cfdb00664dc2c36b2cbd13136568829297d5
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21394
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 14:03:22 +00:00
Nico Huber
208857d393 gma hsw+: Treat DDI E and PCH DAC disabling separately
We only use DDI E for analog VGA outputs through the PCH DAC. DDI E
might be configured differently, though, by a previously running dri-
ver, so we have to treat the two entities seperately on the All_Off()
path.

Change-Id: I603ecd29c48af43bc21acaadbedaeae451acbcf3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20822
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 13:59:24 +00:00
Nico Huber
907e4157aa gma hsw+: Don't use DDI E if DDI A uses all lanes
DDI E shares its two lanes with DDI A. If DDI A is configured to use
all four lanes, DDI E is disabled. As DDI E is the only DDI that can
be configured in FDI mode to feed the PCH DAC, treat `Analog` as in-
valid in this configuration.

Change-Id: I94e9537c9f30d0cbf757b816f38d44e1b43805b3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20821
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 13:55:14 +00:00
Nico Huber
19729a747b gma hsw+: Revise Has_DDI_D flag
The GFX Programmer's Reference Manuals (PRMs) aren't clear on this but
it's pretty clear from the processor datasheets which SKUs expose which
pins: All U/Y processors lack DDI D.

Change-Id: I84c40b6bc01091de8a512e21354243c74643e0f5
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20820
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-12-12 13:54:25 +00:00
Arthur Heymans
5fd9a31968 gma: Fix decoding the size of Stolen Memory on Gen4
The size of stolen memory needs to be decoded in MiB.

Change-Id: I1ceb9ffd85d6ebb54a0e099e200a5068c34a6251
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/21514
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: Nico Huber <nico.h@gmx.de>
2017-09-18 20:45:31 +00:00
Nico Huber
3b654a0991 gfx_test: Set our own framebuffers up, update README
Use GMA.Setup_Default_FB() to allocate framebuffers in the stolen
memory. To help with setups where we can't unload the i915 driver,
back up and restore the current GTT setup and framebuffer contents.

Also add a wrapper script and update the README.

Change-Id: I10790d35d38b7b211f41b2452f6d2baf17372e31
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20604
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-09-13 16:14:59 +00:00
Nico Huber
42fb2d065d gma: Add procedure to power up legacy VGA block
Calling this is necessary for VGA text mode on at least Skylake, where
the legacy VGA registers are inaccessible otherwise.

Change-Id: I48ba1738bcc7babd4e666e5266f775dcd06b2a3f
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/21323
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: Nico Huber <nico.h@gmx.de>
2017-09-04 12:51:16 +00:00
Nico Huber
3a0e2a08f5 gma skl: Disable DDI clocks on reset path
After reset DPLL_CTRL2 is initialized to 0. Which means some clock
disable bits are not set and might cause some hassle later. Set them
and close the related TODO.

Change-Id: I1a470dff55e317e8119906b3e397f6f2314abcbd
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20648
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-30 15:14:08 +00:00
Nico Huber
8540805c29 gma skl: Prevent race by late timeout check
We initialize the timeout variable before the first event on the other
side (i.e. us sending a request to PCODE). With very slow debug output
sending the request itself might take longer than the timeout period.

Reorder the code to check the timeout condition only after the first
try and thereby make sure that we always try at least twice. Also issue
a debug message in case we timed out.

Change-Id: I8cdeb3e36d7eafbef8a1a8e13670f3f9838a2f38
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20647
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-30 15:14:01 +00:00
Nico Huber
234e772f42 dp training: Allow to adjust pre-emphasis during clock recovery
That's not demanded by the spec but there are sinks in the wild that
need it.

Change-Id: Ibef5236ca771e0e02beb4e76650ffb6974657846
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21216
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2017-08-28 22:09:18 +00:00
Nico Huber
41b18ca031 dp training: Fix channel equalization phase
First, allow updates to voltage swing too during channel equalization.
Spec just says to adjust the settings as requested.

Second, the loop conditions differ from the clock recovery phase. We
have only 6 tries in total but no particular order is enforced.

Change-Id: I4673390d8c0f9a5642702872e5b4ab11f54797c7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21215
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2017-08-28 22:09:04 +00:00
Nico Huber
1bc496fc83 gma-display_probing: Only check display type on DVI-I
On DVI-I connectors the DDC is shared between the analog and digital
parts. To decide which path to take we checked the digital input bit
of the EDID. We did this overeagerly for all ports, which broke com-
patibility with DP adapters (the DP realm is very complex and we are
supposed to discover the whole downstream hierarchie, which obviously
would be overkill).

Change-Id: Ifc53e8ab985695e6e4ff1d42659826710a50eae9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20135
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2017-08-28 20:12:45 +00:00
Nico Huber
c3f66f6353 gma: Add Map_Linear_FB()
Change-Id: Ia8850256b3a679e3b76567a6e3146e4c3dc38960
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20609
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-28 20:11:58 +00:00
Nico Huber
eedde88f43 gma: Check that framebuffer fits stolen memory and aperture
Change-Id: I92bd42e4a838832999a6d6fa795a8015d9896a12
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20605
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-28 20:11:55 +00:00
Nico Huber
5374c3ac83 gma: Add Setup_Default_FB()
Add new public procedure Setup_Default_FB() to configure a framebuffer
in stolen memory. The optional parameter `Clear` tells it to clear the
configured framebuffer.

Also remove Setup_Default_GTT() from the public interface.

Change-Id: I6ece4f56bbd34126ef34f0107d5ccdbde8a007ac
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20603
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-28 20:11:50 +00:00
Nico Huber
194e57e625 gma: Allow offsets /= 0 in Setup_Default_GTT()
Honor the `Offset` field of the given framebuffer and add preconditions
that ensure we won't overflow the GTT or its target address space.

Change-Id: I6577e98e154610228734baee7674ee54b9a922e8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20602
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-28 20:11:28 +00:00
Nico Huber
bebca13b4d gma: Move a warning justification to spec
Makes us compatible with SPARK 2017.

Change-Id: Ie325b913e329ceb522a320c76f1cccf512e5b79f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20170
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
2017-08-28 20:11:16 +00:00
Nico Huber
e015e82aff gma: Fix refined contract of Initialize()
To be compatible with HW.PCI.Dev implementations that do actual register
accesses, we have to account for hardware state updates.

Change-Id: I86e42163d7847f7011bcf9a0ef5c2c7f25b4b1be
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/21207
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Adrian-Ken Rueegsegger <ken@codelabs.ch>
2017-08-28 20:11:13 +00:00
Nico Huber
17d64b6d01 gma: Clear "fence" registers during initialization
These registers are used to mark certain GTT regions as tiled.

Change-Id: Ic2cd61c0c1b42990ed955d7f77a428a2b9dbabd5
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20601
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-21 10:56:43 +00:00
Nico Huber
2b6f699218 gma: Add a HW.PCI.Dev for dynamic MMIO setup
Remove `MMIO_Base` option from Initialize() and try to derive it
using libhwbase' PCI mechanism instead.

Change-Id: Iacd4d098954bb96c1c6b40fdfb2636191d9517c7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20600
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-21 10:56:15 +00:00
Nico Huber
b8ae61876b gma: Move GTT constants into GMA.Config
Change-Id: Ie4b017f26b658c1818f90701089ce5d3171e4953
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20599
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-21 10:54:09 +00:00
Nico Huber
fda2d6eaef gfx_test: Update to use *libhwbase* new PCI interface
Thereby, move `gfx_test` into HW.GFX.GMA to make package dependencies
easier to handle.

Change-Id: Ie8a1251354b4fff57eef8c4bada8b49aa04ef382
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20598
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-21 10:53:25 +00:00
Nico Huber
58afc202b1 gma skl: Add I_boost configuration
Hardcoded to 1 since we don't support Skylake-Y (ULX).

Change-Id: I22fa056531cac18828c867f9c9f5745ec424d38c
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20168
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-25 20:23:59 +00:00
Nico Huber
18ff0c13b7 gma skl: Add DDI buffer translations
Change-Id: Ibb058de78f671b94ee788f30342184a8c31a1154
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20167
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-25 20:23:19 +00:00
Nico Huber
730f17c6ab gma hsw bdw: Add DDI buffer translations
Change-Id: Ib87be86e2853e6b9df7e19dd9cb80d4f7effefc5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20166
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-25 20:21:27 +00:00
Nico Huber
01b680ff02 gma hsw+: Add boilerplate for DDI buffer translations
Change-Id: I8fcba64a3c663b9eea7fb11088c62ea584d63e04
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20129
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-25 20:20:27 +00:00
Nico Huber
247adf39f6 gma hsw+: Add default value for HDMI buffer levels
Add a configuration option to override the default HDMI translation.
It's not exported yet, as we've never seen a non-default value being
used. So this is just to have a common place for the defaults.

Also sets the recommended default value for Broxton as defined in the
PRM.

Change-Id: I59fae0fb4f444d9193a98b6a0edf337ecbba3b62
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20165
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-07-25 20:15:32 +00:00
Nico Huber
0923b795fe gma-connectors: Add Initialize() procedure
Change-Id: I62946152da9a93b881e0b0ea4b2679086ec8e970
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/20128
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2017-07-25 20:14:32 +00:00
Nico Huber
fb4f8ce26a Add a README describing libgfxinit and the build process
Change-Id: I5728095e224be428d319fac96942df5d6dd85304
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18793
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-06 17:52:30 +02:00
Nico Huber
1d0abe468b Add linux user-space app gfx_test
This simple program scans all ports and configures pipes for the first
three available displays. It presumes that there is enough framebuffer
mapped for all pipes and fills it with test images.

The only command line parameter ist the path to a PCI-device node in
sysfs. On exit, the hardware is left in the configured state. So the
user has to make sure, that he either can work without the gfx hard-
ware or has another driver to restore a working state.

Change-Id: I2144300589e113e711db7959aa68fa96c3844568
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18786
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-06-06 17:52:22 +02:00
Nico Huber
3586101e0b gma: Juggle with types of a precondition
Using the same type (Pos64) as in the actual calculation below, helps
current SPARK Pro to prove absence of overflows (SPARK GPL 2016 still
works too ofc).

Change-Id: Ifde556f9201f3333be0eb8566bf69b7f9df11277
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18809
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-06-03 15:32:09 +02:00
Nico Huber
1c3b9285ce gma broxton: Add final glue
Add new configuration flags for Broxton and hook up its DDI_Phy
implementation in the shared Haswell DDI code. Haswell and Skylake
get DDI_Phy stubs.

Tested (in Linux userspace) on ASRock J3455-ITX which exposes the
following ports:
  o VGA through an active eDP to VGA converter chip
  o HDMI 2.0 through an active DP to HDMI converter chip
  o DVI-D connected to the SoC

Change-Id: If72b228c6a4c45487261e6e7435d281ec2d97f38
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18426
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-06-03 15:24:28 +02:00
Nico Huber
fdd93659e0 gma broxton: Add signal level control for DDI PHYs
Other than for the DDIs of the Core processor series, we don't select
signal levels from a preconfigured set but have to program the indivi-
dual values.

Change-Id: I3ab4d5e2ed47db0d4ce47a17c4a5fb08b5416bc2
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/18425
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-06-03 15:24:14 +02:00