[Nouveau] (no subject)
Hi On NV_40 on driver is sent instructions from NVE0 series not right I inspected register 9012c with nvtools and appear instructions to start unneeded engines NVE0_CHANNEL_IND_ENGINE_PPP NVE0_CHANNEL_IND_ENGINE_BSP NVE0_CHANNEL_IND_ENGINE_ENC I put one barrier but not start dri. Index: master_local/drivers/gpu/drm/nouveau/nouveau_abi16.c === --- master_local.orig/drivers/gpu/drm/nouveau/nouveau_abi16.c 2014-08-01 00:51:43.0 +0300 +++ master_local/drivers/gpu/drm/nouveau/nouveau_abi16.c 2014-09-13 17:16:19.881489054 +0300 @@ -252,7 +252,12 @@ device = nv_device(abi16-device); imem = nouveau_instmem(device); pfb= nouveau_fb(device); - + printk(KERN_INFO fb_ctxdma_handle %x\n, init-fb_ctxdma_handle); + printk(KERN_INFO tt_ctxdma_handle %x\n, init-tt_ctxdma_handle); + printk(KERN_INFO channel %x\n, init-channel); + printk(KERN_INFO pushbuf_domains %x\n, init-pushbuf_domains); + printk(KERN_INFO notifier_handle %x\n, init-notifier_handle); + printk(KERN_INFO nr_subchan %x\n, init-nr_subchan); /* hack to allow channel engine type specification on kepler */ if (device-card_type = NV_E0) { if (init-fb_ctxdma_handle != ~0) @@ -265,6 +270,18 @@ if (init-fb_ctxdma_handle == NVE0_CHANNEL_IND_ENGINE_GR) init-tt_ctxdma_handle = 1; } + + if (device-card_type NV_50) { + if (init-fb_ctxdma_handle = 0x0008) + return nouveau_abi16_put(abi16, -EINVAL); + + if (init-fb_ctxdma_handle = 0x0004) + return nouveau_abi16_put(abi16, -EINVAL); + + if (init-fb_ctxdma_handle = 0x0040) + return nouveau_abi16_put(abi16, -EINVAL); + } + if (init-fb_ctxdma_handle == ~0 || init-tt_ctxdma_handle == ~0) return nouveau_abi16_put(abi16, -EINVAL); ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] (no subject)
___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] Extend reserved memory on 0xfc000000
Hi This patch correct on usb keyboard acces on number when enter via Ctrl + Alt + F12 on vt after Xorg running.Without this patch when enter on vt vas unable to use numbers from NumLock an only numbers from main keyboard. nouveau [ DEVICE][:01:00.0] BOOT0 : 0x046f00a3 nouveau [ DEVICE][:01:00.0] Chipset: G72 (NV46) nouveau [ DEVICE][:01:00.0] Family : NV40 nouveau [ VBIOS][:01:00.0] checking PRAMIN for image... nouveau [ VBIOS][:01:00.0] ... appears to be valid nouveau [ VBIOS][:01:00.0] using image from PRAMIN nouveau [ VBIOS][:01:00.0] BIT signature found nouveau [ VBIOS][:01:00.0] version 05.72.22.43.00Index: master_local/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c === --- master_local.orig/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c 2014-08-27 19:01:53.0 +0300 +++ master_local/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c 2014-09-08 11:51:40.397537299 +0300 @@ -64,14 +64,14 @@ bar = 2; else bar = 3; - + printk(KERN_INFO resource start is %x\n, pci_resource_start(pdev, bar)); priv-iomem = ioremap(pci_resource_start(pdev, bar), pci_resource_len(pdev, bar)); if (!priv-iomem) { nv_error(priv, unable to map PRAMIN BAR\n); return -EFAULT; } - + /* PRAMIN aperture maps over the end of vram, reserve enough space * to fit graphics contexts for every channel, the magics come * from engine/graph/nv40.c @@ -90,11 +90,12 @@ ret = nouveau_mm_init(priv-heap, 0, priv-base.reserved, 1); if (ret) - return ret; + return ret; /* 0x0-0x1: reserve for probable vbios image */ ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x1, 0, 0, -priv-vbios); +priv-vbios); + if (ret) return ret; @@ -102,7 +103,7 @@ ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0, priv-ramht); if (ret) - return ret; + return ret; /* 0x18000-0x18200: reserve for RAMRO * 0x18200-0x2: padding @@ -114,11 +115,12 @@ /* 0x2-0x21000: reserve for RAMFC * 0x21000-0x4: padding and some unknown crap + * 0x5 is good for keyboard */ - ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x2, 0, + ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x5, 0, NVOBJ_FLAG_ZERO_ALLOC, priv-ramfc); if (ret) - return ret; + return ret; return 0; } ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] Extend reserved memory on 0xfc000000
Hi This patch correct on usb keyboard acces on number when enter via Ctrl + Alt + F12 on vt after Xorg running.Without this patch when enter on vt vas unable to use numbers from NumLock an only numbers from main keyboard. nouveau [ DEVICE][:01:00.0] BOOT0 : 0x046f00a3 nouveau [ DEVICE][:01:00.0] Chipset: G72 (NV46) nouveau [ DEVICE][:01:00.0] Family : NV40 nouveau [ VBIOS][:01:00.0] checking PRAMIN for image... nouveau [ VBIOS][:01:00.0] ... appears to be valid nouveau [ VBIOS][:01:00.0] using image from PRAMIN nouveau [ VBIOS][:01:00.0] BIT signature found nouveau [ VBIOS][:01:00.0] version 05.72.22.43.00Index: master_local/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c === --- master_local.orig/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c 2014-08-27 19:01:53.0 +0300 +++ master_local/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c 2014-09-08 11:51:40.397537299 +0300 @@ -64,14 +64,14 @@ bar = 2; else bar = 3; - + printk(KERN_INFO resource start is %x\n, pci_resource_start(pdev, bar)); priv-iomem = ioremap(pci_resource_start(pdev, bar), pci_resource_len(pdev, bar)); if (!priv-iomem) { nv_error(priv, unable to map PRAMIN BAR\n); return -EFAULT; } - + /* PRAMIN aperture maps over the end of vram, reserve enough space * to fit graphics contexts for every channel, the magics come * from engine/graph/nv40.c @@ -90,11 +90,12 @@ ret = nouveau_mm_init(priv-heap, 0, priv-base.reserved, 1); if (ret) - return ret; + return ret; /* 0x0-0x1: reserve for probable vbios image */ ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x1, 0, 0, -priv-vbios); +priv-vbios); + if (ret) return ret; @@ -102,7 +103,7 @@ ret = nouveau_ramht_new(nv_object(priv), NULL, 0x08000, 0, priv-ramht); if (ret) - return ret; + return ret; /* 0x18000-0x18200: reserve for RAMRO * 0x18200-0x2: padding @@ -114,11 +115,12 @@ /* 0x2-0x21000: reserve for RAMFC * 0x21000-0x4: padding and some unknown crap + * 0x5 is good for keyboard */ - ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x2, 0, + ret = nouveau_gpuobj_new(nv_object(priv), NULL, 0x5, 0, NVOBJ_FLAG_ZERO_ALLOC, priv-ramfc); if (ret) - return ret; + return ret; return 0; } ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] nouveau memory leaks
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.0 +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 0x); + 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 0x); + } 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 Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau