提交 107ea34d 编写于 作者: H Harald Welte 提交者: Jonathan Corbet

viafb: Determine type of 2D engine and store it in chip_info

This will help us for the upcoming support for 2D acceleration using
the M1 engine.

[jc: fixed merge conflicts]
Signed-off-by: NHarald Welte <HaraldWelte@viatech.com>
上级 f1b99aa9
...@@ -121,9 +121,17 @@ struct lvds_chip_information { ...@@ -121,9 +121,17 @@ struct lvds_chip_information {
int i2c_port; int i2c_port;
}; };
/* The type of 2D engine */
enum via_2d_engine {
VIA_2D_ENG_H2,
VIA_2D_ENG_H5,
VIA_2D_ENG_M1,
};
struct chip_information { struct chip_information {
int gfx_chip_name; int gfx_chip_name;
int gfx_chip_revision; int gfx_chip_revision;
enum via_2d_engine twod_engine;
struct tmds_chip_information tmds_chip_info; struct tmds_chip_information tmds_chip_info;
struct lvds_chip_information lvds_chip_info; struct lvds_chip_information lvds_chip_info;
struct lvds_chip_information lvds_chip_info2; struct lvds_chip_information lvds_chip_info2;
......
...@@ -2016,6 +2016,21 @@ static void init_gfx_chip_info(struct pci_dev *pdev, ...@@ -2016,6 +2016,21 @@ static void init_gfx_chip_info(struct pci_dev *pdev,
CX700_REVISION_700; CX700_REVISION_700;
} }
} }
/* Determine which 2D engine we have */
switch (viaparinfo->chip_info->gfx_chip_name) {
case UNICHROME_VX800:
case UNICHROME_VX855:
viaparinfo->chip_info->twod_engine = VIA_2D_ENG_M1;
break;
case UNICHROME_K8M890:
case UNICHROME_P4M900:
viaparinfo->chip_info->twod_engine = VIA_2D_ENG_H5;
break;
default:
viaparinfo->chip_info->twod_engine = VIA_2D_ENG_H2;
break;
}
} }
static void init_tmds_chip_info(void) static void init_tmds_chip_info(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册