diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_fb.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_fb.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_fb.c b/drivers/gpu/drm/nouveau/nv04_fb.c deleted file mode 100644 index 375f5533c313..000000000000 --- a/drivers/gpu/drm/nouveau/nv04_fb.c +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #include <drm/drmP.h> | ||
2 | #include "nouveau_drv.h" | ||
3 | #include <drm/nouveau_drm.h> | ||
4 | |||
5 | int | ||
6 | nv04_fb_vram_init(struct drm_device *dev) | ||
7 | { | ||
8 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
9 | u32 boot0 = nv_rd32(dev, NV04_PFB_BOOT_0); | ||
10 | |||
11 | if (boot0 & 0x00000100) { | ||
12 | dev_priv->vram_size = ((boot0 >> 12) & 0xf) * 2 + 2; | ||
13 | dev_priv->vram_size *= 1024 * 1024; | ||
14 | } else { | ||
15 | switch (boot0 & NV04_PFB_BOOT_0_RAM_AMOUNT) { | ||
16 | case NV04_PFB_BOOT_0_RAM_AMOUNT_32MB: | ||
17 | dev_priv->vram_size = 32 * 1024 * 1024; | ||
18 | break; | ||
19 | case NV04_PFB_BOOT_0_RAM_AMOUNT_16MB: | ||
20 | dev_priv->vram_size = 16 * 1024 * 1024; | ||
21 | break; | ||
22 | case NV04_PFB_BOOT_0_RAM_AMOUNT_8MB: | ||
23 | dev_priv->vram_size = 8 * 1024 * 1024; | ||
24 | break; | ||
25 | case NV04_PFB_BOOT_0_RAM_AMOUNT_4MB: | ||
26 | dev_priv->vram_size = 4 * 1024 * 1024; | ||
27 | break; | ||
28 | } | ||
29 | } | ||
30 | |||
31 | if ((boot0 & 0x00000038) <= 0x10) | ||
32 | dev_priv->vram_type = NV_MEM_TYPE_SGRAM; | ||
33 | else | ||
34 | dev_priv->vram_type = NV_MEM_TYPE_SDRAM; | ||
35 | |||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | int | ||
40 | nv04_fb_init(struct drm_device *dev) | ||
41 | { | ||
42 | /* This is what the DDX did for NV_ARCH_04, but a mmio-trace shows | ||
43 | * nvidia reading PFB_CFG_0, then writing back its original value. | ||
44 | * (which was 0x701114 in this case) | ||
45 | */ | ||
46 | |||
47 | nv_wr32(dev, NV04_PFB_CFG0, 0x1114); | ||
48 | return 0; | ||
49 | } | ||
50 | |||
51 | void | ||
52 | nv04_fb_takedown(struct drm_device *dev) | ||
53 | { | ||
54 | } | ||