diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-09-04 03:50:21 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-09-14 21:37:45 -0400 |
commit | 42fb1427443b8a72a3c07efa14d53c63d324cba8 (patch) | |
tree | 718b8bdb20f7539a6175cb2cda6a09deffbfb050 | |
parent | 261a3ad42605f5824072d1410d3c5f7b93f7cad8 (diff) |
drm/ast: Don't assume DVO enabled means SIL164 on uninitialized chips
It looks like the AST2400 comes up with the DVO enable bit set,
which causes us to incorrectly assume we have a SIL164 regardless
of the value of the scratch registers setup by the BMC firmware.
So let's limit that test to the case where the chip has already
been setup by a BIOS.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/ast/ast_main.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c index 556d065590cc..48998b2102a5 100644 --- a/drivers/gpu/drm/ast/ast_main.c +++ b/drivers/gpu/drm/ast/ast_main.c | |||
@@ -158,16 +158,22 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post) | |||
158 | /* | 158 | /* |
159 | * VGACRA3 Enhanced Color Mode Register, check if DVO is already | 159 | * VGACRA3 Enhanced Color Mode Register, check if DVO is already |
160 | * enabled, in that case, assume we have a SIL164 TMDS transmitter | 160 | * enabled, in that case, assume we have a SIL164 TMDS transmitter |
161 | * | ||
162 | * Don't make that assumption if we the chip wasn't enabled and | ||
163 | * is at power-on reset, otherwise we'll incorrectly "detect" a | ||
164 | * SIL164 when there is none. | ||
161 | */ | 165 | */ |
162 | jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xff); | 166 | if (!*need_post) { |
163 | if (jreg & 0x80) | 167 | jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xff); |
164 | ast->tx_chip_type = AST_TX_SIL164; | 168 | if (jreg & 0x80) |
169 | ast->tx_chip_type = AST_TX_SIL164; | ||
170 | } | ||
165 | 171 | ||
166 | if ((ast->chip == AST2300) || (ast->chip == AST2400)) { | 172 | if ((ast->chip == AST2300) || (ast->chip == AST2400)) { |
167 | /* | 173 | /* |
168 | * On AST2300 and 2400, look the configuration set by the SoC in | 174 | * On AST2300 and 2400, look the configuration set by the SoC in |
169 | * the SOC scratch register #1 bits 11:8 (interestingly marked | 175 | * the SOC scratch register #1 bits 11:8 (interestingly marked |
170 | * as "reserved" in the spec | 176 | * as "reserved" in the spec) |
171 | */ | 177 | */ |
172 | jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff); | 178 | jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff); |
173 | switch (jreg) { | 179 | switch (jreg) { |