aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/via/chip.h8
-rw-r--r--drivers/video/via/hw.c15
2 files changed, 23 insertions, 0 deletions
diff --git a/drivers/video/via/chip.h b/drivers/video/via/chip.h
index 8c06bd3c0b4d..d9b6e06e0700 100644
--- a/drivers/video/via/chip.h
+++ b/drivers/video/via/chip.h
@@ -121,9 +121,17 @@ struct lvds_chip_information {
121 int i2c_port; 121 int i2c_port;
122}; 122};
123 123
124/* The type of 2D engine */
125enum via_2d_engine {
126 VIA_2D_ENG_H2,
127 VIA_2D_ENG_H5,
128 VIA_2D_ENG_M1,
129};
130
124struct chip_information { 131struct chip_information {
125 int gfx_chip_name; 132 int gfx_chip_name;
126 int gfx_chip_revision; 133 int gfx_chip_revision;
134 enum via_2d_engine twod_engine;
127 struct tmds_chip_information tmds_chip_info; 135 struct tmds_chip_information tmds_chip_info;
128 struct lvds_chip_information lvds_chip_info; 136 struct lvds_chip_information lvds_chip_info;
129 struct lvds_chip_information lvds_chip_info2; 137 struct lvds_chip_information lvds_chip_info2;
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index c94bcce71eaf..ae664fbd7e80 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2016,6 +2016,21 @@ static void init_gfx_chip_info(struct pci_dev *pdev,
2016 CX700_REVISION_700; 2016 CX700_REVISION_700;
2017 } 2017 }
2018 } 2018 }
2019
2020 /* Determine which 2D engine we have */
2021 switch (viaparinfo->chip_info->gfx_chip_name) {
2022 case UNICHROME_VX800:
2023 case UNICHROME_VX855:
2024 viaparinfo->chip_info->twod_engine = VIA_2D_ENG_M1;
2025 break;
2026 case UNICHROME_K8M890:
2027 case UNICHROME_P4M900:
2028 viaparinfo->chip_info->twod_engine = VIA_2D_ENG_H5;
2029 break;
2030 default:
2031 viaparinfo->chip_info->twod_engine = VIA_2D_ENG_H2;
2032 break;
2033 }
2019} 2034}
2020 2035
2021static void init_tmds_chip_info(void) 2036static void init_tmds_chip_info(void)