All of lore.kernel.org
 help / color / mirror / Atom feed
* nouveau memory leaks
@ 2014-09-04 12:37 asd
       [not found] ` <20140904153749.19fd78ca-jrA/B3VWHiL2D7C+UIOg5A@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: asd @ 2014-09-04 12:37 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

[-- Attachment #1: Type: text/plain, Size: 86 bytes --]

Hi
For NV40 attach one patch which leave unused  second channel used on
NV50 and more.

[-- Attachment #2: nouveau_chan_fix.patch --]
[-- Type: text/x-patch, Size: 2138 bytes --]

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);

[-- Attachment #3: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: nouveau memory leaks
       [not found] ` <20140904153749.19fd78ca-jrA/B3VWHiL2D7C+UIOg5A@public.gmane.org>
@ 2014-09-04 13:59   ` Ilia Mirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Ilia Mirkin @ 2014-09-04 13:59 UTC (permalink / raw)
  To: asd; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On Thu, Sep 4, 2014 at 8:37 AM, asd <asd-jrA/B3VWHiL2D7C+UIOg5A@public.gmane.org> wrote:
> Hi
> For NV40 attach one patch which leave unused  second channel used on
> NV50 and more.

What exactly are you saying is being leaked? What problem is your
patch trying to solve?

  -ilia

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-04 13:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 12:37 nouveau memory leaks asd
     [not found] ` <20140904153749.19fd78ca-jrA/B3VWHiL2D7C+UIOg5A@public.gmane.org>
2014-09-04 13:59   ` Ilia Mirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.