aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-03-20 23:57:40 -0400
committerBen Skeggs <bskeggs@redhat.com>2012-03-22 03:17:50 -0400
commit664695ae6f8b2b72aa5820aa20f4d65016cb3fd0 (patch)
tree38d731bc4028424e65844160ff87571776208d5e /drivers/gpu/drm/nouveau
parent48aca13f0167ae78c28c6b48d82a157a6692eecb (diff)
drm/nouveau: inform userspace of new kernel subchannel requirements
All available subchannels are now available for userspace to do with as it pleases on NVC0+. On all earlier chipsets, the kernel still uses a software object on subc 0 to implement the page flip completion method. I hope to find some decent way of addressing this too, but it's a tad tricker prior to fermi. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_channel.c15
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_dma.h4
2 files changed, 6 insertions, 13 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
index 337e228629ed..44e6416d4a33 100644
--- a/drivers/gpu/drm/nouveau/nouveau_channel.c
+++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
@@ -436,18 +436,11 @@ nouveau_ioctl_fifo_alloc(struct drm_device *dev, void *data,
436 } 436 }
437 437
438 if (dev_priv->card_type < NV_C0) { 438 if (dev_priv->card_type < NV_C0) {
439 init->subchan[0].handle = NvM2MF; 439 init->subchan[0].handle = NvSw;
440 if (dev_priv->card_type < NV_50) 440 init->subchan[0].grclass = NV_SW;
441 init->subchan[0].grclass = 0x0039;
442 else
443 init->subchan[0].grclass = 0x5039;
444 init->subchan[1].handle = NvSw;
445 init->subchan[1].grclass = NV_SW;
446 init->nr_subchan = 2;
447 } else {
448 init->subchan[0].handle = 0x9039;
449 init->subchan[0].grclass = 0x9039;
450 init->nr_subchan = 1; 441 init->nr_subchan = 1;
442 } else {
443 init->nr_subchan = 0;
451 } 444 }
452 445
453 /* Named memory object area */ 446 /* Named memory object area */
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.h b/drivers/gpu/drm/nouveau/nouveau_dma.h
index 23d4edf992b7..bcf0fd9e313e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dma.h
+++ b/drivers/gpu/drm/nouveau/nouveau_dma.h
@@ -48,8 +48,8 @@ void nv50_dma_push(struct nouveau_channel *, struct nouveau_bo *,
48 48
49/* Hardcoded object assignments to subchannels (subchannel id). */ 49/* Hardcoded object assignments to subchannels (subchannel id). */
50enum { 50enum {
51 NvSubM2MF = 0, 51 NvSubSw = 0,
52 NvSubSw = 1, 52 NvSubM2MF = 1,
53 NvSub2D = 2, 53 NvSub2D = 2,
54 NvSubCtxSurf2D = 2, 54 NvSubCtxSurf2D = 2,
55 NvSubGdiRect = 3, 55 NvSubGdiRect = 3,