Hi
For NV40 attach one patch which leave unused second channel used on
NV50 and more.
Index: master_local/drivers/gpu/drm/nouveau/nouveau_chan.c
===================================================================
--- master_local.orig/drivers/gpu/drm/nouveau/nouveau_chan.c 2014-08-29 17:03:06.000000000 +0300
+++ master_local/drivers/gpu/drm/nouveau/nouveau_chan.c 2014-09-04 11:44:53.862385947 +0300
@@ -131,8 +131,13 @@
* pushbuf lives in, this is because the GEM code requires that
* we be able to call out to other (indirect) push buffers
*/
- chan->push.vma.offset = chan->push.buffer->bo.offset;
- chan->push.handle = NVDRM_PUSH | (handle & 0xffff);
+ if (device->card_type == NV_40) {
+ chan->push.vma.offset = chan->push.buffer->bo.offset;
+ chan->push.handle = NVDRM_PUSH;
+ } else {
+ chan->push.vma.offset = chan->push.buffer->bo.offset;
+ chan->push.handle = NVDRM_PUSH | (handle & 0xffff);
+ }
if (device->card_type >= NV_50) {
ret = nouveau_bo_vma_add(chan->push.buffer, client->vm,
@@ -190,6 +195,7 @@
u32 parent, u32 handle, u32 engine,
struct nouveau_channel **pchan)
{
+ struct nouveau_device *device = nv_device(drm->device);
static const u16 oclasses[] = { NVE0_CHANNEL_IND_CLASS,
NVC0_CHANNEL_IND_CLASS,
NV84_CHANNEL_IND_CLASS,
@@ -199,6 +205,9 @@
struct nve0_channel_ind_class args;
struct nouveau_channel *chan;
int ret;
+ /* NV_40 working with ind channel? */
+ if (device->card_type == NV_40)
+ return -EPERM;
/* allocate dma push buffer */
ret = nouveau_channel_prep(drm, cli, parent, handle, 0x12000, &chan);
Index: master_local/drivers/gpu/drm/nouveau/nouveau_drm.c
===================================================================
--- master_local.orig/drivers/gpu/drm/nouveau/nouveau_drm.c 2014-09-03 15:22:11.738698637 +0300
+++ master_local/drivers/gpu/drm/nouveau/nouveau_drm.c 2014-09-04 10:57:08.685701955 +0300
@@ -171,6 +171,7 @@
if (device->chipset >= 0xa3 &&
device->chipset != 0xaa &&
device->chipset != 0xac) {
+ printk(KERN_INFO "create unneeded channel");
ret = nouveau_channel_new(drm, &drm->client, NVDRM_DEVICE,
NVDRM_CHAN + 1, NvDmaFB, NvDmaTT,
&drm->cechan);
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau