aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/sis
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/sis')
-rw-r--r--drivers/video/sis/sis.h1
-rw-r--r--drivers/video/sis/sis_main.c18
-rw-r--r--drivers/video/sis/vgatypes.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/sis/sis.h b/drivers/video/sis/sis.h
index eac7a01925f3..1987f1b7212f 100644
--- a/drivers/video/sis/sis.h
+++ b/drivers/video/sis/sis.h
@@ -495,6 +495,7 @@ struct sis_video_info {
495 unsigned int refresh_rate; 495 unsigned int refresh_rate;
496 496
497 unsigned int chip; 497 unsigned int chip;
498 unsigned int chip_real_id;
498 u8 revision_id; 499 u8 revision_id;
499 int sisvga_enabled; /* PCI device was enabled */ 500 int sisvga_enabled; /* PCI device was enabled */
500 501
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index 364559b12fc5..f0c48e84bcdb 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
4566static inline int sisfb_xgi_is21(struct sis_video_info *ivideo)
4567{
4568 return ivideo->chip_real_id == XGI_21;
4569}
4570
4566static void __devinit 4571static void __devinit
4567sisfb_post_xgi_delay(struct sis_video_info *ivideo, int delay) 4572sisfb_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__)
diff --git a/drivers/video/sis/vgatypes.h b/drivers/video/sis/vgatypes.h
index 12c0dfaf2518..e3f9976cfef0 100644
--- a/drivers/video/sis/vgatypes.h
+++ b/drivers/video/sis/vgatypes.h
@@ -87,6 +87,7 @@ typedef enum _SIS_CHIP_TYPE {
87 SIS_341, 87 SIS_341,
88 SIS_342, 88 SIS_342,
89 XGI_20 = 75, 89 XGI_20 = 75,
90 XGI_21,
90 XGI_40, 91 XGI_40,
91 MAX_SIS_CHIP 92 MAX_SIS_CHIP
92} SIS_CHIP_TYPE; 93} SIS_CHIP_TYPE;