diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-05-19 19:36:03 +0200 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2010-04-20 22:23:19 +0200 |
commit | 107ea34db4560e6db41a9da90128ccc5e60f6b21 (patch) | |
tree | 60e75e5ade320b57fa3c3663f4df8c6d8a39e019 /drivers/video | |
parent | viafb: Unify duplicated set_bpp() code (diff) | |
download | linux-107ea34db4560e6db41a9da90128ccc5e60f6b21.tar.xz linux-107ea34db4560e6db41a9da90128ccc5e60f6b21.zip |
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: Harald Welte <HaraldWelte@viatech.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/via/chip.h | 8 | ||||
-rw-r--r-- | drivers/video/via/hw.c | 15 |
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 { 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 { int gfx_chip_name; int gfx_chip_revision; + enum via_2d_engine twod_engine; struct tmds_chip_information tmds_chip_info; struct lvds_chip_information lvds_chip_info; 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, 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) |