diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-19 22:17:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-19 22:17:35 -0500 |
commit | da935c66bacb3ed9ada984b053297f87c2dff63a (patch) | |
tree | 46278da2b312c73f1375b830d7e5912bf23abd78 /drivers/gpu/drm/nouveau | |
parent | 9435eb1cf0b76b323019cebf8d16762a50a12a19 (diff) | |
parent | 2205a6ea93fea76f88b43727fea53f3ce3790d6f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/e1000e/netdev.c
net/xfrm/xfrm_policy.c
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bios.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 13 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_pm.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_temp.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_dfp.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv40_graph.c | 46 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_evo.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_graph.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_vm.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_graph.c | 23 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_grctx.c | 2 |
14 files changed, 87 insertions, 55 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c index 2aef5cd3acf5..6bdab891c64e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bios.c +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c | |||
@@ -6228,7 +6228,7 @@ parse_dcb15_entry(struct drm_device *dev, struct dcb_table *dcb, | |||
6228 | entry->tvconf.has_component_output = false; | 6228 | entry->tvconf.has_component_output = false; |
6229 | break; | 6229 | break; |
6230 | case OUTPUT_LVDS: | 6230 | case OUTPUT_LVDS: |
6231 | if ((conn & 0x00003f00) != 0x10) | 6231 | if ((conn & 0x00003f00) >> 8 != 0x10) |
6232 | entry->lvdsconf.use_straps_for_mode = true; | 6232 | entry->lvdsconf.use_straps_for_mode = true; |
6233 | entry->lvdsconf.use_power_scripts = true; | 6233 | entry->lvdsconf.use_power_scripts = true; |
6234 | break; | 6234 | break; |
@@ -6310,6 +6310,9 @@ void merge_like_dcb_entries(struct drm_device *dev, struct dcb_table *dcb) | |||
6310 | static bool | 6310 | static bool |
6311 | apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf) | 6311 | apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf) |
6312 | { | 6312 | { |
6313 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
6314 | struct dcb_table *dcb = &dev_priv->vbios.dcb; | ||
6315 | |||
6313 | /* Dell Precision M6300 | 6316 | /* Dell Precision M6300 |
6314 | * DCB entry 2: 02025312 00000010 | 6317 | * DCB entry 2: 02025312 00000010 |
6315 | * DCB entry 3: 02026312 00000020 | 6318 | * DCB entry 3: 02026312 00000020 |
@@ -6327,6 +6330,18 @@ apply_dcb_encoder_quirks(struct drm_device *dev, int idx, u32 *conn, u32 *conf) | |||
6327 | return false; | 6330 | return false; |
6328 | } | 6331 | } |
6329 | 6332 | ||
6333 | /* GeForce3 Ti 200 | ||
6334 | * | ||
6335 | * DCB reports an LVDS output that should be TMDS: | ||
6336 | * DCB entry 1: f2005014 ffffffff | ||
6337 | */ | ||
6338 | if (nv_match_device(dev, 0x0201, 0x1462, 0x8851)) { | ||
6339 | if (*conn == 0xf2005014 && *conf == 0xffffffff) { | ||
6340 | fabricate_dcb_output(dcb, OUTPUT_TMDS, 1, 1, 1); | ||
6341 | return false; | ||
6342 | } | ||
6343 | } | ||
6344 | |||
6330 | return true; | 6345 | return true; |
6331 | } | 6346 | } |
6332 | 6347 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index a7fae26f4654..d38a4d9f9b0b 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -128,6 +128,7 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan, | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | 130 | ||
131 | nvbo->bo.mem.num_pages = size >> PAGE_SHIFT; | ||
131 | nouveau_bo_placement_set(nvbo, flags, 0); | 132 | nouveau_bo_placement_set(nvbo, flags, 0); |
132 | 133 | ||
133 | nvbo->channel = chan; | 134 | nvbo->channel = chan; |
@@ -166,17 +167,17 @@ static void | |||
166 | set_placement_range(struct nouveau_bo *nvbo, uint32_t type) | 167 | set_placement_range(struct nouveau_bo *nvbo, uint32_t type) |
167 | { | 168 | { |
168 | struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); | 169 | struct drm_nouveau_private *dev_priv = nouveau_bdev(nvbo->bo.bdev); |
170 | int vram_pages = dev_priv->vram_size >> PAGE_SHIFT; | ||
169 | 171 | ||
170 | if (dev_priv->card_type == NV_10 && | 172 | if (dev_priv->card_type == NV_10 && |
171 | nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM)) { | 173 | nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) && |
174 | nvbo->bo.mem.num_pages < vram_pages / 2) { | ||
172 | /* | 175 | /* |
173 | * Make sure that the color and depth buffers are handled | 176 | * Make sure that the color and depth buffers are handled |
174 | * by independent memory controller units. Up to a 9x | 177 | * by independent memory controller units. Up to a 9x |
175 | * speed up when alpha-blending and depth-test are enabled | 178 | * speed up when alpha-blending and depth-test are enabled |
176 | * at the same time. | 179 | * at the same time. |
177 | */ | 180 | */ |
178 | int vram_pages = dev_priv->vram_size >> PAGE_SHIFT; | ||
179 | |||
180 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_ZETA) { | 181 | if (nvbo->tile_flags & NOUVEAU_GEM_TILE_ZETA) { |
181 | nvbo->placement.fpfn = vram_pages / 2; | 182 | nvbo->placement.fpfn = vram_pages / 2; |
182 | nvbo->placement.lpfn = ~0; | 183 | nvbo->placement.lpfn = ~0; |
@@ -785,7 +786,7 @@ nouveau_bo_move_flipd(struct ttm_buffer_object *bo, bool evict, bool intr, | |||
785 | if (ret) | 786 | if (ret) |
786 | goto out; | 787 | goto out; |
787 | 788 | ||
788 | ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, new_mem); | 789 | ret = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, new_mem); |
789 | out: | 790 | out: |
790 | ttm_bo_mem_put(bo, &tmp_mem); | 791 | ttm_bo_mem_put(bo, &tmp_mem); |
791 | return ret; | 792 | return ret; |
@@ -811,11 +812,11 @@ nouveau_bo_move_flips(struct ttm_buffer_object *bo, bool evict, bool intr, | |||
811 | if (ret) | 812 | if (ret) |
812 | return ret; | 813 | return ret; |
813 | 814 | ||
814 | ret = ttm_bo_move_ttm(bo, evict, no_wait_reserve, no_wait_gpu, &tmp_mem); | 815 | ret = ttm_bo_move_ttm(bo, true, no_wait_reserve, no_wait_gpu, &tmp_mem); |
815 | if (ret) | 816 | if (ret) |
816 | goto out; | 817 | goto out; |
817 | 818 | ||
818 | ret = nouveau_bo_move_m2mf(bo, evict, intr, no_wait_reserve, no_wait_gpu, new_mem); | 819 | ret = nouveau_bo_move_m2mf(bo, true, intr, no_wait_reserve, no_wait_gpu, new_mem); |
819 | if (ret) | 820 | if (ret) |
820 | goto out; | 821 | goto out; |
821 | 822 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index a21e00076839..390d82c3c4b0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -507,6 +507,7 @@ nouveau_connector_native_mode(struct drm_connector *connector) | |||
507 | int high_w = 0, high_h = 0, high_v = 0; | 507 | int high_w = 0, high_h = 0, high_v = 0; |
508 | 508 | ||
509 | list_for_each_entry(mode, &nv_connector->base.probed_modes, head) { | 509 | list_for_each_entry(mode, &nv_connector->base.probed_modes, head) { |
510 | mode->vrefresh = drm_mode_vrefresh(mode); | ||
510 | if (helper->mode_valid(connector, mode) != MODE_OK || | 511 | if (helper->mode_valid(connector, mode) != MODE_OK || |
511 | (mode->flags & DRM_MODE_FLAG_INTERLACE)) | 512 | (mode->flags & DRM_MODE_FLAG_INTERLACE)) |
512 | continue; | 513 | continue; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c index 13bb672a16f4..f658a04eecf9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.c +++ b/drivers/gpu/drm/nouveau/nouveau_drv.c | |||
@@ -234,9 +234,9 @@ nouveau_pci_suspend(struct pci_dev *pdev, pm_message_t pm_state) | |||
234 | pci_set_power_state(pdev, PCI_D3hot); | 234 | pci_set_power_state(pdev, PCI_D3hot); |
235 | } | 235 | } |
236 | 236 | ||
237 | acquire_console_sem(); | 237 | console_lock(); |
238 | nouveau_fbcon_set_suspend(dev, 1); | 238 | nouveau_fbcon_set_suspend(dev, 1); |
239 | release_console_sem(); | 239 | console_unlock(); |
240 | nouveau_fbcon_restore_accel(dev); | 240 | nouveau_fbcon_restore_accel(dev); |
241 | return 0; | 241 | return 0; |
242 | 242 | ||
@@ -359,9 +359,9 @@ nouveau_pci_resume(struct pci_dev *pdev) | |||
359 | nv_crtc->lut.depth = 0; | 359 | nv_crtc->lut.depth = 0; |
360 | } | 360 | } |
361 | 361 | ||
362 | acquire_console_sem(); | 362 | console_lock(); |
363 | nouveau_fbcon_set_suspend(dev, 0); | 363 | nouveau_fbcon_set_suspend(dev, 0); |
364 | release_console_sem(); | 364 | console_unlock(); |
365 | 365 | ||
366 | nouveau_fbcon_zfill_all(dev); | 366 | nouveau_fbcon_zfill_all(dev); |
367 | 367 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 01bffc4412d2..9821fcacc3d2 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -848,9 +848,6 @@ extern void nv10_mem_put_tile_region(struct drm_device *dev, | |||
848 | struct nouveau_fence *fence); | 848 | struct nouveau_fence *fence); |
849 | extern const struct ttm_mem_type_manager_func nouveau_vram_manager; | 849 | extern const struct ttm_mem_type_manager_func nouveau_vram_manager; |
850 | 850 | ||
851 | /* nvc0_vram.c */ | ||
852 | extern const struct ttm_mem_type_manager_func nvc0_vram_manager; | ||
853 | |||
854 | /* nouveau_notifier.c */ | 851 | /* nouveau_notifier.c */ |
855 | extern int nouveau_notifier_init_channel(struct nouveau_channel *); | 852 | extern int nouveau_notifier_init_channel(struct nouveau_channel *); |
856 | extern void nouveau_notifier_takedown_channel(struct nouveau_channel *); | 853 | extern void nouveau_notifier_takedown_channel(struct nouveau_channel *); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index fb846a3fef15..4399e2f34db4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c | |||
@@ -443,7 +443,7 @@ nouveau_hwmon_fini(struct drm_device *dev) | |||
443 | struct nouveau_pm_engine *pm = &dev_priv->engine.pm; | 443 | struct nouveau_pm_engine *pm = &dev_priv->engine.pm; |
444 | 444 | ||
445 | if (pm->hwmon) { | 445 | if (pm->hwmon) { |
446 | sysfs_remove_group(&pm->hwmon->kobj, &hwmon_attrgroup); | 446 | sysfs_remove_group(&dev->pdev->dev.kobj, &hwmon_attrgroup); |
447 | hwmon_device_unregister(pm->hwmon); | 447 | hwmon_device_unregister(pm->hwmon); |
448 | } | 448 | } |
449 | #endif | 449 | #endif |
@@ -543,7 +543,7 @@ nouveau_pm_resume(struct drm_device *dev) | |||
543 | struct nouveau_pm_engine *pm = &dev_priv->engine.pm; | 543 | struct nouveau_pm_engine *pm = &dev_priv->engine.pm; |
544 | struct nouveau_pm_level *perflvl; | 544 | struct nouveau_pm_level *perflvl; |
545 | 545 | ||
546 | if (pm->cur == &pm->boot) | 546 | if (!pm->cur || pm->cur == &pm->boot) |
547 | return; | 547 | return; |
548 | 548 | ||
549 | perflvl = pm->cur; | 549 | perflvl = pm->cur; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_temp.c b/drivers/gpu/drm/nouveau/nouveau_temp.c index 7ecc4adc1e45..8d9968e1cba8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_temp.c +++ b/drivers/gpu/drm/nouveau/nouveau_temp.c | |||
@@ -265,8 +265,8 @@ nouveau_temp_probe_i2c(struct drm_device *dev) | |||
265 | struct i2c_board_info info[] = { | 265 | struct i2c_board_info info[] = { |
266 | { I2C_BOARD_INFO("w83l785ts", 0x2d) }, | 266 | { I2C_BOARD_INFO("w83l785ts", 0x2d) }, |
267 | { I2C_BOARD_INFO("w83781d", 0x2d) }, | 267 | { I2C_BOARD_INFO("w83781d", 0x2d) }, |
268 | { I2C_BOARD_INFO("f75375", 0x2e) }, | ||
269 | { I2C_BOARD_INFO("adt7473", 0x2e) }, | 268 | { I2C_BOARD_INFO("adt7473", 0x2e) }, |
269 | { I2C_BOARD_INFO("f75375", 0x2e) }, | ||
270 | { I2C_BOARD_INFO("lm99", 0x4c) }, | 270 | { I2C_BOARD_INFO("lm99", 0x4c) }, |
271 | { } | 271 | { } |
272 | }; | 272 | }; |
diff --git a/drivers/gpu/drm/nouveau/nv04_dfp.c b/drivers/gpu/drm/nouveau/nv04_dfp.c index ef23550407b5..c82db37d9f41 100644 --- a/drivers/gpu/drm/nouveau/nv04_dfp.c +++ b/drivers/gpu/drm/nouveau/nv04_dfp.c | |||
@@ -342,8 +342,8 @@ static void nv04_dfp_mode_set(struct drm_encoder *encoder, | |||
342 | if (nv_encoder->dcb->type == OUTPUT_LVDS) { | 342 | if (nv_encoder->dcb->type == OUTPUT_LVDS) { |
343 | bool duallink, dummy; | 343 | bool duallink, dummy; |
344 | 344 | ||
345 | nouveau_bios_parse_lvds_table(dev, nv_connector->native_mode-> | 345 | nouveau_bios_parse_lvds_table(dev, output_mode->clock, |
346 | clock, &duallink, &dummy); | 346 | &duallink, &dummy); |
347 | if (duallink) | 347 | if (duallink) |
348 | regp->fp_control |= (8 << 28); | 348 | regp->fp_control |= (8 << 28); |
349 | } else | 349 | } else |
@@ -518,8 +518,6 @@ static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode) | |||
518 | return; | 518 | return; |
519 | 519 | ||
520 | if (nv_encoder->dcb->lvdsconf.use_power_scripts) { | 520 | if (nv_encoder->dcb->lvdsconf.use_power_scripts) { |
521 | struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder); | ||
522 | |||
523 | /* when removing an output, crtc may not be set, but PANEL_OFF | 521 | /* when removing an output, crtc may not be set, but PANEL_OFF |
524 | * must still be run | 522 | * must still be run |
525 | */ | 523 | */ |
@@ -527,12 +525,8 @@ static void nv04_lvds_dpms(struct drm_encoder *encoder, int mode) | |||
527 | nv04_dfp_get_bound_head(dev, nv_encoder->dcb); | 525 | nv04_dfp_get_bound_head(dev, nv_encoder->dcb); |
528 | 526 | ||
529 | if (mode == DRM_MODE_DPMS_ON) { | 527 | if (mode == DRM_MODE_DPMS_ON) { |
530 | if (!nv_connector->native_mode) { | ||
531 | NV_ERROR(dev, "Not turning on LVDS without native mode\n"); | ||
532 | return; | ||
533 | } | ||
534 | call_lvds_script(dev, nv_encoder->dcb, head, | 528 | call_lvds_script(dev, nv_encoder->dcb, head, |
535 | LVDS_PANEL_ON, nv_connector->native_mode->clock); | 529 | LVDS_PANEL_ON, nv_encoder->mode.clock); |
536 | } else | 530 | } else |
537 | /* pxclk of 0 is fine for PANEL_OFF, and for a | 531 | /* pxclk of 0 is fine for PANEL_OFF, and for a |
538 | * disconnected LVDS encoder there is no native_mode | 532 | * disconnected LVDS encoder there is no native_mode |
diff --git a/drivers/gpu/drm/nouveau/nv40_graph.c b/drivers/gpu/drm/nouveau/nv40_graph.c index 8870d72388c8..18d30c2c1aa6 100644 --- a/drivers/gpu/drm/nouveau/nv40_graph.c +++ b/drivers/gpu/drm/nouveau/nv40_graph.c | |||
@@ -211,18 +211,32 @@ nv40_graph_set_tile_region(struct drm_device *dev, int i) | |||
211 | struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; | 211 | struct nouveau_tile_reg *tile = &dev_priv->tile.reg[i]; |
212 | 212 | ||
213 | switch (dev_priv->chipset) { | 213 | switch (dev_priv->chipset) { |
214 | case 0x40: | ||
215 | case 0x41: /* guess */ | ||
216 | case 0x42: | ||
217 | case 0x43: | ||
218 | case 0x45: /* guess */ | ||
219 | case 0x4e: | ||
220 | nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); | ||
221 | nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); | ||
222 | nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); | ||
223 | nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch); | ||
224 | nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); | ||
225 | nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); | ||
226 | break; | ||
214 | case 0x44: | 227 | case 0x44: |
215 | case 0x4a: | 228 | case 0x4a: |
216 | case 0x4e: | ||
217 | nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); | 229 | nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); |
218 | nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); | 230 | nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); |
219 | nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); | 231 | nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); |
220 | break; | 232 | break; |
221 | |||
222 | case 0x46: | 233 | case 0x46: |
223 | case 0x47: | 234 | case 0x47: |
224 | case 0x49: | 235 | case 0x49: |
225 | case 0x4b: | 236 | case 0x4b: |
237 | case 0x4c: | ||
238 | case 0x67: | ||
239 | default: | ||
226 | nv_wr32(dev, NV47_PGRAPH_TSIZE(i), tile->pitch); | 240 | nv_wr32(dev, NV47_PGRAPH_TSIZE(i), tile->pitch); |
227 | nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), tile->limit); | 241 | nv_wr32(dev, NV47_PGRAPH_TLIMIT(i), tile->limit); |
228 | nv_wr32(dev, NV47_PGRAPH_TILE(i), tile->addr); | 242 | nv_wr32(dev, NV47_PGRAPH_TILE(i), tile->addr); |
@@ -230,15 +244,6 @@ nv40_graph_set_tile_region(struct drm_device *dev, int i) | |||
230 | nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); | 244 | nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); |
231 | nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); | 245 | nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); |
232 | break; | 246 | break; |
233 | |||
234 | default: | ||
235 | nv_wr32(dev, NV20_PGRAPH_TSIZE(i), tile->pitch); | ||
236 | nv_wr32(dev, NV20_PGRAPH_TLIMIT(i), tile->limit); | ||
237 | nv_wr32(dev, NV20_PGRAPH_TILE(i), tile->addr); | ||
238 | nv_wr32(dev, NV40_PGRAPH_TSIZE1(i), tile->pitch); | ||
239 | nv_wr32(dev, NV40_PGRAPH_TLIMIT1(i), tile->limit); | ||
240 | nv_wr32(dev, NV40_PGRAPH_TILE1(i), tile->addr); | ||
241 | break; | ||
242 | } | 247 | } |
243 | } | 248 | } |
244 | 249 | ||
@@ -396,17 +401,20 @@ nv40_graph_init(struct drm_device *dev) | |||
396 | break; | 401 | break; |
397 | default: | 402 | default: |
398 | switch (dev_priv->chipset) { | 403 | switch (dev_priv->chipset) { |
399 | case 0x46: | 404 | case 0x41: |
400 | case 0x47: | 405 | case 0x42: |
401 | case 0x49: | 406 | case 0x43: |
402 | case 0x4b: | 407 | case 0x45: |
403 | nv_wr32(dev, 0x400DF0, nv_rd32(dev, NV04_PFB_CFG0)); | 408 | case 0x4e: |
404 | nv_wr32(dev, 0x400DF4, nv_rd32(dev, NV04_PFB_CFG1)); | 409 | case 0x44: |
405 | break; | 410 | case 0x4a: |
406 | default: | ||
407 | nv_wr32(dev, 0x4009F0, nv_rd32(dev, NV04_PFB_CFG0)); | 411 | nv_wr32(dev, 0x4009F0, nv_rd32(dev, NV04_PFB_CFG0)); |
408 | nv_wr32(dev, 0x4009F4, nv_rd32(dev, NV04_PFB_CFG1)); | 412 | nv_wr32(dev, 0x4009F4, nv_rd32(dev, NV04_PFB_CFG1)); |
409 | break; | 413 | break; |
414 | default: | ||
415 | nv_wr32(dev, 0x400DF0, nv_rd32(dev, NV04_PFB_CFG0)); | ||
416 | nv_wr32(dev, 0x400DF4, nv_rd32(dev, NV04_PFB_CFG1)); | ||
417 | break; | ||
410 | } | 418 | } |
411 | nv_wr32(dev, 0x4069F0, nv_rd32(dev, NV04_PFB_CFG0)); | 419 | nv_wr32(dev, 0x4069F0, nv_rd32(dev, NV04_PFB_CFG0)); |
412 | nv_wr32(dev, 0x4069F4, nv_rd32(dev, NV04_PFB_CFG1)); | 420 | nv_wr32(dev, 0x4069F4, nv_rd32(dev, NV04_PFB_CFG1)); |
diff --git a/drivers/gpu/drm/nouveau/nv50_evo.c b/drivers/gpu/drm/nouveau/nv50_evo.c index 14e24e906ee8..0ea090f4244a 100644 --- a/drivers/gpu/drm/nouveau/nv50_evo.c +++ b/drivers/gpu/drm/nouveau/nv50_evo.c | |||
@@ -283,8 +283,7 @@ nv50_evo_create(struct drm_device *dev) | |||
283 | nv50_evo_channel_del(&dev_priv->evo); | 283 | nv50_evo_channel_del(&dev_priv->evo); |
284 | return ret; | 284 | return ret; |
285 | } | 285 | } |
286 | } else | 286 | } else { |
287 | if (dev_priv->chipset != 0x50) { | ||
288 | ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19, | 287 | ret = nv50_evo_dmaobj_new(evo, 0x3d, NvEvoFB16, 0x70, 0x19, |
289 | 0, 0xffffffff, 0x00010000); | 288 | 0, 0xffffffff, 0x00010000); |
290 | if (ret) { | 289 | if (ret) { |
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c index 2d7ea75a09d4..37e21d2be95b 100644 --- a/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/drivers/gpu/drm/nouveau/nv50_graph.c | |||
@@ -256,6 +256,7 @@ nv50_graph_destroy_context(struct nouveau_channel *chan) | |||
256 | struct drm_device *dev = chan->dev; | 256 | struct drm_device *dev = chan->dev; |
257 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 257 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
258 | struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; | 258 | struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; |
259 | struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; | ||
259 | int i, hdr = (dev_priv->chipset == 0x50) ? 0x200 : 0x20; | 260 | int i, hdr = (dev_priv->chipset == 0x50) ? 0x200 : 0x20; |
260 | unsigned long flags; | 261 | unsigned long flags; |
261 | 262 | ||
@@ -265,6 +266,7 @@ nv50_graph_destroy_context(struct nouveau_channel *chan) | |||
265 | return; | 266 | return; |
266 | 267 | ||
267 | spin_lock_irqsave(&dev_priv->context_switch_lock, flags); | 268 | spin_lock_irqsave(&dev_priv->context_switch_lock, flags); |
269 | pfifo->reassign(dev, false); | ||
268 | pgraph->fifo_access(dev, false); | 270 | pgraph->fifo_access(dev, false); |
269 | 271 | ||
270 | if (pgraph->channel(dev) == chan) | 272 | if (pgraph->channel(dev) == chan) |
@@ -275,6 +277,7 @@ nv50_graph_destroy_context(struct nouveau_channel *chan) | |||
275 | dev_priv->engine.instmem.flush(dev); | 277 | dev_priv->engine.instmem.flush(dev); |
276 | 278 | ||
277 | pgraph->fifo_access(dev, true); | 279 | pgraph->fifo_access(dev, true); |
280 | pfifo->reassign(dev, true); | ||
278 | spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); | 281 | spin_unlock_irqrestore(&dev_priv->context_switch_lock, flags); |
279 | 282 | ||
280 | nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); | 283 | nouveau_gpuobj_ref(NULL, &chan->ramin_grctx); |
diff --git a/drivers/gpu/drm/nouveau/nv50_vm.c b/drivers/gpu/drm/nouveau/nv50_vm.c index 38e523e10995..459ff08241e5 100644 --- a/drivers/gpu/drm/nouveau/nv50_vm.c +++ b/drivers/gpu/drm/nouveau/nv50_vm.c | |||
@@ -45,11 +45,6 @@ nv50_vm_map_pgt(struct nouveau_gpuobj *pgd, u32 pde, | |||
45 | } | 45 | } |
46 | 46 | ||
47 | if (phys & 1) { | 47 | if (phys & 1) { |
48 | if (dev_priv->vram_sys_base) { | ||
49 | phys += dev_priv->vram_sys_base; | ||
50 | phys |= 0x30; | ||
51 | } | ||
52 | |||
53 | if (coverage <= 32 * 1024 * 1024) | 48 | if (coverage <= 32 * 1024 * 1024) |
54 | phys |= 0x60; | 49 | phys |= 0x60; |
55 | else if (coverage <= 64 * 1024 * 1024) | 50 | else if (coverage <= 64 * 1024 * 1024) |
diff --git a/drivers/gpu/drm/nouveau/nvc0_graph.c b/drivers/gpu/drm/nouveau/nvc0_graph.c index e6ea7d83187f..eb18a7e89f5b 100644 --- a/drivers/gpu/drm/nouveau/nvc0_graph.c +++ b/drivers/gpu/drm/nouveau/nvc0_graph.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "nvc0_graph.h" | 31 | #include "nvc0_graph.h" |
32 | 32 | ||
33 | static void nvc0_graph_isr(struct drm_device *); | 33 | static void nvc0_graph_isr(struct drm_device *); |
34 | static void nvc0_runk140_isr(struct drm_device *); | ||
34 | static int nvc0_graph_unload_context_to(struct drm_device *dev, u64 chan); | 35 | static int nvc0_graph_unload_context_to(struct drm_device *dev, u64 chan); |
35 | 36 | ||
36 | void | 37 | void |
@@ -281,6 +282,7 @@ nvc0_graph_destroy(struct drm_device *dev) | |||
281 | return; | 282 | return; |
282 | 283 | ||
283 | nouveau_irq_unregister(dev, 12); | 284 | nouveau_irq_unregister(dev, 12); |
285 | nouveau_irq_unregister(dev, 25); | ||
284 | 286 | ||
285 | nouveau_gpuobj_ref(NULL, &priv->unk4188b8); | 287 | nouveau_gpuobj_ref(NULL, &priv->unk4188b8); |
286 | nouveau_gpuobj_ref(NULL, &priv->unk4188b4); | 288 | nouveau_gpuobj_ref(NULL, &priv->unk4188b4); |
@@ -390,6 +392,7 @@ nvc0_graph_create(struct drm_device *dev) | |||
390 | } | 392 | } |
391 | 393 | ||
392 | nouveau_irq_register(dev, 12, nvc0_graph_isr); | 394 | nouveau_irq_register(dev, 12, nvc0_graph_isr); |
395 | nouveau_irq_register(dev, 25, nvc0_runk140_isr); | ||
393 | NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */ | 396 | NVOBJ_CLASS(dev, 0x902d, GR); /* 2D */ |
394 | NVOBJ_CLASS(dev, 0x9039, GR); /* M2MF */ | 397 | NVOBJ_CLASS(dev, 0x9039, GR); /* M2MF */ |
395 | NVOBJ_CLASS(dev, 0x9097, GR); /* 3D */ | 398 | NVOBJ_CLASS(dev, 0x9097, GR); /* 3D */ |
@@ -512,8 +515,8 @@ nvc0_graph_init_gpc_1(struct drm_device *dev) | |||
512 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x224), 0xc0000000); | 515 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x224), 0xc0000000); |
513 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x48c), 0xc0000000); | 516 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x48c), 0xc0000000); |
514 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x084), 0xc0000000); | 517 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x084), 0xc0000000); |
515 | nv_wr32(dev, TP_UNIT(gpc, tp, 0xe44), 0x001ffffe); | 518 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x644), 0x001ffffe); |
516 | nv_wr32(dev, TP_UNIT(gpc, tp, 0xe4c), 0x0000000f); | 519 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x64c), 0x0000000f); |
517 | } | 520 | } |
518 | nv_wr32(dev, GPC_UNIT(gpc, 0x2c90), 0xffffffff); | 521 | nv_wr32(dev, GPC_UNIT(gpc, 0x2c90), 0xffffffff); |
519 | nv_wr32(dev, GPC_UNIT(gpc, 0x2c94), 0xffffffff); | 522 | nv_wr32(dev, GPC_UNIT(gpc, 0x2c94), 0xffffffff); |
@@ -777,3 +780,19 @@ nvc0_graph_isr(struct drm_device *dev) | |||
777 | 780 | ||
778 | nv_wr32(dev, 0x400500, 0x00010001); | 781 | nv_wr32(dev, 0x400500, 0x00010001); |
779 | } | 782 | } |
783 | |||
784 | static void | ||
785 | nvc0_runk140_isr(struct drm_device *dev) | ||
786 | { | ||
787 | u32 units = nv_rd32(dev, 0x00017c) & 0x1f; | ||
788 | |||
789 | while (units) { | ||
790 | u32 unit = ffs(units) - 1; | ||
791 | u32 reg = 0x140000 + unit * 0x2000; | ||
792 | u32 st0 = nv_mask(dev, reg + 0x1020, 0, 0); | ||
793 | u32 st1 = nv_mask(dev, reg + 0x1420, 0, 0); | ||
794 | |||
795 | NV_INFO(dev, "PRUNK140: %d 0x%08x 0x%08x\n", unit, st0, st1); | ||
796 | units &= ~(1 << unit); | ||
797 | } | ||
798 | } | ||
diff --git a/drivers/gpu/drm/nouveau/nvc0_grctx.c b/drivers/gpu/drm/nouveau/nvc0_grctx.c index b9e68b2d30aa..f880ff776db8 100644 --- a/drivers/gpu/drm/nouveau/nvc0_grctx.c +++ b/drivers/gpu/drm/nouveau/nvc0_grctx.c | |||
@@ -1830,7 +1830,7 @@ nvc0_grctx_generate(struct nouveau_channel *chan) | |||
1830 | 1830 | ||
1831 | for (tp = 0, id = 0; tp < 4; tp++) { | 1831 | for (tp = 0, id = 0; tp < 4; tp++) { |
1832 | for (gpc = 0; gpc < priv->gpc_nr; gpc++) { | 1832 | for (gpc = 0; gpc < priv->gpc_nr; gpc++) { |
1833 | if (tp <= priv->tp_nr[gpc]) { | 1833 | if (tp < priv->tp_nr[gpc]) { |
1834 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x698), id); | 1834 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x698), id); |
1835 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x4e8), id); | 1835 | nv_wr32(dev, TP_UNIT(gpc, tp, 0x4e8), id); |
1836 | nv_wr32(dev, GPC_UNIT(gpc, 0x0c10 + tp * 4), id); | 1836 | nv_wr32(dev, GPC_UNIT(gpc, 0x0c10 + tp * 4), id); |