mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-04 18:18:54 +00:00
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>
This commit is contained in:
parent
261a3ad426
commit
42fb142744
@ -158,16 +158,22 @@ static int ast_detect_chip(struct drm_device *dev, bool *need_post)
|
|||||||
/*
|
/*
|
||||||
* VGACRA3 Enhanced Color Mode Register, check if DVO is already
|
* VGACRA3 Enhanced Color Mode Register, check if DVO is already
|
||||||
* enabled, in that case, assume we have a SIL164 TMDS transmitter
|
* enabled, in that case, assume we have a SIL164 TMDS transmitter
|
||||||
|
*
|
||||||
|
* Don't make that assumption if we the chip wasn't enabled and
|
||||||
|
* is at power-on reset, otherwise we'll incorrectly "detect" a
|
||||||
|
* SIL164 when there is none.
|
||||||
*/
|
*/
|
||||||
jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xff);
|
if (!*need_post) {
|
||||||
if (jreg & 0x80)
|
jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xa3, 0xff);
|
||||||
ast->tx_chip_type = AST_TX_SIL164;
|
if (jreg & 0x80)
|
||||||
|
ast->tx_chip_type = AST_TX_SIL164;
|
||||||
|
}
|
||||||
|
|
||||||
if ((ast->chip == AST2300) || (ast->chip == AST2400)) {
|
if ((ast->chip == AST2300) || (ast->chip == AST2400)) {
|
||||||
/*
|
/*
|
||||||
* On AST2300 and 2400, look the configuration set by the SoC in
|
* On AST2300 and 2400, look the configuration set by the SoC in
|
||||||
* the SOC scratch register #1 bits 11:8 (interestingly marked
|
* the SOC scratch register #1 bits 11:8 (interestingly marked
|
||||||
* as "reserved" in the spec
|
* as "reserved" in the spec)
|
||||||
*/
|
*/
|
||||||
jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff);
|
jreg = ast_get_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xd1, 0xff);
|
||||||
switch (jreg) {
|
switch (jreg) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user