diff options
author | Mathieu Larouche <mathieu.larouche@matrox.com> | 2015-08-21 16:24:05 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-08-24 06:46:52 +0300 |
commit | 6d857c18aefdec782ba1db578a390fbac5145107 (patch) | |
tree | b2ba2b7beeaa19c2773b6487c252ab50706927f3 /drivers/gpu/drm/mgag200/mgag200_main.c | |
parent | 44790462d041d3037d60b3bf88f30837a72006ff (diff) | |
download | linux-6d857c18aefdec782ba1db578a390fbac5145107.tar.xz |
drm/mgag200: Add support for a new G200eW3 chipset
- Added support for the new deviceID for G200eW3
- Added PLL algorithm for the G200eW3
- Added some initialization code for G200eW3
Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/mgag200/mgag200_main.c')
-rw-r--r-- | drivers/gpu/drm/mgag200/mgag200_main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_main.c b/drivers/gpu/drm/mgag200/mgag200_main.c index c99c2cb28939..de06388069e7 100644 --- a/drivers/gpu/drm/mgag200/mgag200_main.c +++ b/drivers/gpu/drm/mgag200/mgag200_main.c @@ -82,12 +82,19 @@ static int mga_probe_vram(struct mga_device *mdev, void __iomem *mem) int orig; int test1, test2; int orig1, orig2; + unsigned int vram_size; /* Probe */ orig = ioread16(mem); iowrite16(0, mem); - for (offset = 0x100000; offset < mdev->mc.vram_window; offset += 0x4000) { + vram_size = mdev->mc.vram_window; + + if ((mdev->type == G200_EW3) && (vram_size >= 0x1000000)) { + vram_size = vram_size - 0x400000; + } + + for (offset = 0x100000; offset < vram_size; offset += 0x4000) { orig1 = ioread8(mem + offset); orig2 = ioread8(mem + offset + 0x100); |