diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2011-02-13 17:11:25 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-22 02:20:30 -0400 |
commit | 929c972e9589644805577317a38f1cd6b3ce5fc2 (patch) | |
tree | 07a368a9916e027353cceb93049f5d21818f8f39 /drivers/video/sis/sis_main.c | |
parent | 74de5f4e52bf6e2ee1fe559d53c5dbf0d9d6e4cd (diff) |
sisfb: add subroutine for detecting XGI Z9
Z7 and Z9 have the same PCI ID, so additional checking is needed to
detect Z9. The method was "documented" in XGI's xgifb driver.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sis/sis_main.c')
-rw-r--r-- | drivers/video/sis/sis_main.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c index 364559b12fc..f0c48e84bcd 100644 --- a/drivers/video/sis/sis_main.c +++ b/drivers/video/sis/sis_main.c | |||
@@ -4563,6 +4563,11 @@ sisfb_post_sis315330(struct pci_dev *pdev) | |||
4563 | } | 4563 | } |
4564 | #endif | 4564 | #endif |
4565 | 4565 | ||
4566 | static inline int sisfb_xgi_is21(struct sis_video_info *ivideo) | ||
4567 | { | ||
4568 | return ivideo->chip_real_id == XGI_21; | ||
4569 | } | ||
4570 | |||
4566 | static void __devinit | 4571 | static void __devinit |
4567 | sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay) | 4572 | sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay) |
4568 | { | 4573 | { |
@@ -5802,6 +5807,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
5802 | #endif | 5807 | #endif |
5803 | 5808 | ||
5804 | ivideo->chip = chipinfo->chip; | 5809 | ivideo->chip = chipinfo->chip; |
5810 | ivideo->chip_real_id = chipinfo->chip; | ||
5805 | ivideo->sisvga_engine = chipinfo->vgaengine; | 5811 | ivideo->sisvga_engine = chipinfo->vgaengine; |
5806 | ivideo->hwcursor_size = chipinfo->hwcursor_size; | 5812 | ivideo->hwcursor_size = chipinfo->hwcursor_size; |
5807 | ivideo->CRT2_write_enable = chipinfo->CRT2_write_enable; | 5813 | ivideo->CRT2_write_enable = chipinfo->CRT2_write_enable; |
@@ -6035,6 +6041,18 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
6035 | sisfb_detect_custom_timing(ivideo); | 6041 | sisfb_detect_custom_timing(ivideo); |
6036 | } | 6042 | } |
6037 | 6043 | ||
6044 | #ifdef CONFIG_FB_SIS_315 | ||
6045 | if (ivideo->chip == XGI_20) { | ||
6046 | /* Check if our Z7 chip is actually Z9 */ | ||
6047 | SiS_SetRegOR(SISCR, 0x4a, 0x40); /* GPIOG EN */ | ||
6048 | reg = SiS_GetReg(SISCR, 0x48); | ||
6049 | if (reg & 0x02) { /* GPIOG */ | ||
6050 | ivideo->chip_real_id = XGI_21; | ||
6051 | dev_info(&pdev->dev, "Z9 detected\n"); | ||
6052 | } | ||
6053 | } | ||
6054 | #endif | ||
6055 | |||
6038 | /* POST card in case this has not been done by the BIOS */ | 6056 | /* POST card in case this has not been done by the BIOS */ |
6039 | if( (!ivideo->sisvga_enabled) | 6057 | if( (!ivideo->sisvga_enabled) |
6040 | #if !defined(__i386__) && !defined(__x86_64__) | 6058 | #if !defined(__i386__) && !defined(__x86_64__) |