diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-12-30 21:10:49 -0500 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-12-30 21:11:50 -0500 |
commit | ec9c0883ea3aa90d6c6d6b16a64d0986f40baff0 (patch) | |
tree | 1f325cb3da686587cfc927386042bdd939867b36 /drivers/gpu/drm/nouveau/nvc0_fifo.c | |
parent | 2a55c9a7ff2a863f05a9b9c8519ef81737d4a3ef (diff) |
drm/nvc0/pfifo: support for chipsets with only one PSUBFIFO (0xc1)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvc0_fifo.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_fifo.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fifo.c b/drivers/gpu/drm/nouveau/nvc0_fifo.c index 82a4ded5dae8..e6f92c541dba 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fifo.c +++ b/drivers/gpu/drm/nouveau/nvc0_fifo.c | |||
@@ -33,6 +33,7 @@ struct nvc0_fifo_priv { | |||
33 | struct nouveau_gpuobj *playlist[2]; | 33 | struct nouveau_gpuobj *playlist[2]; |
34 | int cur_playlist; | 34 | int cur_playlist; |
35 | struct nouveau_vma user_vma; | 35 | struct nouveau_vma user_vma; |
36 | int spoon_nr; | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | struct nvc0_fifo_chan { | 39 | struct nvc0_fifo_chan { |
@@ -324,13 +325,18 @@ nvc0_fifo_init(struct drm_device *dev) | |||
324 | nv_wr32(dev, 0x000204, 0xffffffff); | 325 | nv_wr32(dev, 0x000204, 0xffffffff); |
325 | nv_wr32(dev, 0x002204, 0xffffffff); | 326 | nv_wr32(dev, 0x002204, 0xffffffff); |
326 | 327 | ||
328 | priv->spoon_nr = hweight32(nv_rd32(dev, 0x002204)); | ||
329 | NV_DEBUG(dev, "PFIFO: %d subfifo(s)\n", priv->spoon_nr); | ||
330 | |||
327 | /* assign engines to subfifos */ | 331 | /* assign engines to subfifos */ |
328 | nv_wr32(dev, 0x002208, ~(1 << 0)); /* PGRAPH */ | 332 | if (priv->spoon_nr >= 3) { |
329 | nv_wr32(dev, 0x00220c, ~(1 << 1)); /* PVP */ | 333 | nv_wr32(dev, 0x002208, ~(1 << 0)); /* PGRAPH */ |
330 | nv_wr32(dev, 0x002210, ~(1 << 1)); /* PPP */ | 334 | nv_wr32(dev, 0x00220c, ~(1 << 1)); /* PVP */ |
331 | nv_wr32(dev, 0x002214, ~(1 << 1)); /* PBSP */ | 335 | nv_wr32(dev, 0x002210, ~(1 << 1)); /* PPP */ |
332 | nv_wr32(dev, 0x002218, ~(1 << 2)); /* PCE0 */ | 336 | nv_wr32(dev, 0x002214, ~(1 << 1)); /* PBSP */ |
333 | nv_wr32(dev, 0x00221c, ~(1 << 1)); /* PCE1 */ | 337 | nv_wr32(dev, 0x002218, ~(1 << 2)); /* PCE0 */ |
338 | nv_wr32(dev, 0x00221c, ~(1 << 1)); /* PCE1 */ | ||
339 | } | ||
334 | 340 | ||
335 | /* PSUBFIFO[n] */ | 341 | /* PSUBFIFO[n] */ |
336 | for (i = 0; i < 3; i++) { | 342 | for (i = 0; i < 3; i++) { |