exynos-linux-stable/drivers/gpu/drm/ast
Russell Currey dbc808362b drm/ast: Handle configuration without P2A bridge
commit 71f677a91046599ece96ebab21df956ce909c456 upstream.

The ast driver configures a window to enable access into BMC
memory space in order to read some configuration registers.

If this window is disabled, which it can be from the BMC side,
the ast driver can't function.

Closing this window is a necessity for security if a machine's
host side and BMC side are controlled by different parties;
i.e. a cloud provider offering machines "bare metal".

A recent patch went in to try to check if that window is open
but it does so by trying to access the registers in question
and testing if the result is 0xffffffff.

This method will trigger a PCIe error when the window is closed
which on some systems will be fatal (it will trigger an EEH
for example on POWER which will take out the device).

This patch improves this in two ways:

 - First, if the firmware has put properties in the device-tree
containing the relevant configuration information, we use these.

 - Otherwise, a bit in one of the SCU scratch registers (which
are readable via the VGA register space and writeable by the BMC)
will indicate if the BMC has closed the window. This bit has been
defined by Y.C Chen from Aspeed.

If the window is closed and the configuration isn't available from
the device-tree, some sane defaults are used. Those defaults are
hopefully sufficient for standard video modes used on a server.

Signed-off-by: Russell Currey <ruscur@russell.cc>
Acked-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-05 14:40:17 +02:00
..
ast_dp501.c drm/ast: Cleanup analog init code path 2014-09-15 11:37:46 +10:00
ast_dram_tables.h drm: Initial KMS driver for AST (ASpeed Technologies) 2000 series (v2) 2012-05-17 10:53:37 +01:00
ast_drv.c drm/ast: Use lockless gem BO free callback 2016-06-01 09:40:02 +02:00
ast_drv.h drm/ast: Handle configuration without P2A bridge 2017-07-05 14:40:17 +02:00
ast_fb.c drm: Remove superflous linux/fb.h includes 2016-08-12 10:41:39 +02:00
ast_main.c drm/ast: Handle configuration without P2A bridge 2017-07-05 14:40:17 +02:00
ast_mode.c drm/core: Change declaration for gamma_set. 2016-06-07 15:30:09 +02:00
ast_post.c drm/ast: Handle configuration without P2A bridge 2017-07-05 14:40:17 +02:00
ast_tables.h drm/ast: Add reduced blanking modes for wide screen mode 2014-09-16 14:57:47 +10:00
ast_ttm.c drm/drivers: add support for using the arch wc mapping API. 2016-10-26 16:48:01 +10:00
Kconfig drm/ast: make fbdev support really optional 2016-07-18 09:11:41 +02:00
Makefile drm/ast: initial DP501 support (v0.2) 2014-05-19 11:13:57 +10:00