diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-12-10 09:30:05 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 03:05:20 -0400 |
commit | 7ad2d31cb692597f7918fce2f52a4c1949fbcf8d (patch) | |
tree | 7ff7f87196af92fb5de716da681d1b08961196bb /drivers/gpu/drm/nouveau/nouveau_state.c | |
parent | 83465324cb50e22b45ad53fd6e8887b1f8e43702 (diff) |
drm/nouveau: move vram detection funcs to chipset-specific fb code
Also, display detected memory type in logs - though, we don't even try to
detect this yet.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 912839c2bc16..dba3e90188de 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -87,7 +87,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
87 | engine->pm.clocks_get = nv04_pm_clocks_get; | 87 | engine->pm.clocks_get = nv04_pm_clocks_get; |
88 | engine->pm.clocks_pre = nv04_pm_clocks_pre; | 88 | engine->pm.clocks_pre = nv04_pm_clocks_pre; |
89 | engine->pm.clocks_set = nv04_pm_clocks_set; | 89 | engine->pm.clocks_set = nv04_pm_clocks_set; |
90 | engine->vram.init = nouveau_mem_detect; | 90 | engine->vram.init = nv04_fb_vram_init; |
91 | engine->vram.takedown = nouveau_stub_takedown; | 91 | engine->vram.takedown = nouveau_stub_takedown; |
92 | engine->vram.flags_valid = nouveau_mem_flags_valid; | 92 | engine->vram.flags_valid = nouveau_mem_flags_valid; |
93 | break; | 93 | break; |
@@ -134,7 +134,11 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
134 | engine->pm.clocks_get = nv04_pm_clocks_get; | 134 | engine->pm.clocks_get = nv04_pm_clocks_get; |
135 | engine->pm.clocks_pre = nv04_pm_clocks_pre; | 135 | engine->pm.clocks_pre = nv04_pm_clocks_pre; |
136 | engine->pm.clocks_set = nv04_pm_clocks_set; | 136 | engine->pm.clocks_set = nv04_pm_clocks_set; |
137 | engine->vram.init = nouveau_mem_detect; | 137 | if (dev_priv->chipset == 0x1a || |
138 | dev_priv->chipset == 0x1f) | ||
139 | engine->vram.init = nv1a_fb_vram_init; | ||
140 | else | ||
141 | engine->vram.init = nv10_fb_vram_init; | ||
138 | engine->vram.takedown = nouveau_stub_takedown; | 142 | engine->vram.takedown = nouveau_stub_takedown; |
139 | engine->vram.flags_valid = nouveau_mem_flags_valid; | 143 | engine->vram.flags_valid = nouveau_mem_flags_valid; |
140 | break; | 144 | break; |
@@ -181,7 +185,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
181 | engine->pm.clocks_get = nv04_pm_clocks_get; | 185 | engine->pm.clocks_get = nv04_pm_clocks_get; |
182 | engine->pm.clocks_pre = nv04_pm_clocks_pre; | 186 | engine->pm.clocks_pre = nv04_pm_clocks_pre; |
183 | engine->pm.clocks_set = nv04_pm_clocks_set; | 187 | engine->pm.clocks_set = nv04_pm_clocks_set; |
184 | engine->vram.init = nouveau_mem_detect; | 188 | engine->vram.init = nv10_fb_vram_init; |
185 | engine->vram.takedown = nouveau_stub_takedown; | 189 | engine->vram.takedown = nouveau_stub_takedown; |
186 | engine->vram.flags_valid = nouveau_mem_flags_valid; | 190 | engine->vram.flags_valid = nouveau_mem_flags_valid; |
187 | break; | 191 | break; |
@@ -230,7 +234,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
230 | engine->pm.clocks_set = nv04_pm_clocks_set; | 234 | engine->pm.clocks_set = nv04_pm_clocks_set; |
231 | engine->pm.voltage_get = nouveau_voltage_gpio_get; | 235 | engine->pm.voltage_get = nouveau_voltage_gpio_get; |
232 | engine->pm.voltage_set = nouveau_voltage_gpio_set; | 236 | engine->pm.voltage_set = nouveau_voltage_gpio_set; |
233 | engine->vram.init = nouveau_mem_detect; | 237 | engine->vram.init = nv10_fb_vram_init; |
234 | engine->vram.takedown = nouveau_stub_takedown; | 238 | engine->vram.takedown = nouveau_stub_takedown; |
235 | engine->vram.flags_valid = nouveau_mem_flags_valid; | 239 | engine->vram.flags_valid = nouveau_mem_flags_valid; |
236 | break; | 240 | break; |
@@ -286,7 +290,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
286 | engine->pm.temp_get = nv40_temp_get; | 290 | engine->pm.temp_get = nv40_temp_get; |
287 | engine->pm.pwm_get = nv40_pm_pwm_get; | 291 | engine->pm.pwm_get = nv40_pm_pwm_get; |
288 | engine->pm.pwm_set = nv40_pm_pwm_set; | 292 | engine->pm.pwm_set = nv40_pm_pwm_set; |
289 | engine->vram.init = nouveau_mem_detect; | 293 | engine->vram.init = nv10_fb_vram_init; |
290 | engine->vram.takedown = nouveau_stub_takedown; | 294 | engine->vram.takedown = nouveau_stub_takedown; |
291 | engine->vram.flags_valid = nouveau_mem_flags_valid; | 295 | engine->vram.flags_valid = nouveau_mem_flags_valid; |
292 | break; | 296 | break; |