Re: [PATCH 5/8] drm/ttm: convert page allocation to use page ptr array instead of list V2

2011-11-03 Thread Konrad Rzeszutek Wilk
On Wed, Nov 02, 2011 at 07:37:52PM -0400, j.gli...@gmail.com wrote: > From: Jerome Glisse > > Use the ttm_tt page ptr array for page allocation, move the list to > array unwinding into the page allocation functions. > > V2 split the fix to use ttm put page as a separate fix > properly fill pages

Re: [PATCH 6/8] drm/ttm: test for dma_address array allocation failure

2011-11-03 Thread Konrad Rzeszutek Wilk
On Wed, Nov 02, 2011 at 07:37:53PM -0400, j.gli...@gmail.com wrote: > From: Jerome Glisse > > Signed-off-by: Jerome Glisse Reviewed-by-me. > --- > drivers/gpu/drm/ttm/ttm_tt.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers

Re: [PATCH] agp: Enable all supported rates for graphic cards

2011-11-07 Thread Konrad Rzeszutek Wilk
On Sun, Nov 06, 2011 at 04:03:21PM +0100, Tormod Volden wrote: > From: Tormod Volden > > Some cards report that they support only 4x, in which case they > should support 2x and 1x as well, according to the AGP spec. Have you tested it on other hardware besides your KN133? > > Otherwise a reque

Re: [PATCH 07/11] drm/ttm: merge ttm_backend and ttm_tt

2011-11-07 Thread Konrad Rzeszutek Wilk
them. Reviewed-by: Konrad Rzeszutek Wilk > > Signed-off-by: Jerome Glisse > --- > drivers/gpu/drm/nouveau/nouveau_bo.c| 14 ++- > drivers/gpu/drm/nouveau/nouveau_drv.h |5 +- > drivers/gpu/drm/nouveau/nouveau_sgdma.c | 188 -- > driver

Re: [PATCH 08/11] drm/ttm: introduce callback for ttm_tt populate & unpopulate

2011-11-07 Thread Konrad Rzeszutek Wilk
pulate an object this simplify some of code designed around > the page fault design. Reviewed-by: Konrad Rzeszutek Wilk > > Signed-off-by: Jerome Glisse > --- > drivers/gpu/drm/nouveau/nouveau_bo.c |3 + > drivers/gpu/drm/radeon/radeon_ttm.c|2 + > dri

Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator

2011-11-07 Thread Konrad Rzeszutek Wilk
On Thu, Nov 03, 2011 at 07:39:04PM -0400, j.gli...@gmail.com wrote: > Hi, > > So updated patchset, only patch 5 seen change since last set. > Last 3 patch are from your patchset, modified on top of mine. Yup, and I've tested it on my radeon box. Going to test it on the nvidia and some of the 32-b

Re: [PATCH 02/12] drm/ttm: remove split btw highmen and lowmem page

2011-11-08 Thread Konrad Rzeszutek Wilk
;ttm page allocation helper to actualy take an array instead > >of relying on list this could drasticly reduce the number of > >function call in the common case of allocation whole buffer. > > > >Signed-off-by: Jerome Glisse > >Reviewed-by: Konrad Rzeszutek Wilk >

Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator [FULL]

2011-11-08 Thread Konrad Rzeszutek Wilk
one patch (thought I think the 'dma_bits = 32' part can easily be moved to the "drm/radeon/kms: Enable the TTM DMA pool if swiotlb is on" patch. >From 0a96588b9e0793952548f0c4dd7aac7c243c1bed Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Thu, 25 Aug 2011 16:18:4

Re: [PATCH 13/14] drm/ttm: isolate dma data from ttm_tt V3

2011-11-15 Thread Konrad Rzeszutek Wilk
On Fri, Nov 11, 2011 at 05:47:48PM -0500, j.gli...@gmail.com wrote: > From: Jerome Glisse > > Move dma data to a superset ttm_dma_tt structure which herit inherit > from ttm_tt. This allow driver that don't use dma functionalities > to not have to waste memory for it. > > V2 Rebase on top of n

Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-16 Thread Konrad Rzeszutek Wilk
On Mon, Nov 14, 2011 at 01:54:27PM -0500, Jerome Glisse wrote: > On Mon, Nov 14, 2011 at 05:06:42PM +0100, Thomas Hellstrom wrote: > > On 11/14/2011 05:02 PM, Jerome Glisse wrote: > > >On Mon, Nov 14, 2011 at 9:49 AM, Thomas Hellstrom > > >wrote: > > >>On 11/11/2011 11:47 PM, j.gli...@gmail.com w

Re: [PATCH 11/14] drm/radeon/kms: enable the ttm dma pool if swiotlb is on V3

2011-11-16 Thread Konrad Rzeszutek Wilk
> +#ifdef CONFIG_SWIOTLB > + if (swiotlb_nr_tbl()) { > + return ttm_dma_populate(ttm, rdev->dev); > + } > +#endif .. > +#ifdef CONFIG_SWIOTLB > + if (swiotlb_nr_tbl()) { > + ttm_dma_unpopulate(ttm, rdev->dev); > + return; > + } > +#endif > +#ifde

Re: [PATCH 10/14] drm/ttm: provide dma aware ttm page pool code V8

2011-11-16 Thread Konrad Rzeszutek Wilk
> +int ttm_dma_populate(struct ttm_tt *ttm, struct device *dev) > +{ .. snip.. > + for (i = 0; i < ttm->num_pages; ++i) { > + ret = ttm_dma_pool_get_pages(pool, ttm, i); > + if (ret != 0) { > + ttm_dma_unpopulate(ttm, dev); > + re

Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V5

2011-11-16 Thread Konrad Rzeszutek Wilk
> > which I think was your V4 posting (or earlier) (the last patch is something > > I added > > to toggle it off/on to test). > > You have to allocate like a million of gem object to trigger it. > Which I certainly did not, but I did find an accounting error in the rebased v5 version of the TTM

Re: [PATCH 13/14] drm/ttm: isolate dma data from ttm_tt V3

2011-11-16 Thread Konrad Rzeszutek Wilk
> >> -int ttm_dma_populate(struct ttm_tt *ttm, struct device *dev); > >> -extern void ttm_dma_unpopulate(struct ttm_tt *ttm, struct device *dev); > >> +int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev); > >> +extern void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct devic

Re: [PATCH 13/14] drm/ttm: isolate dma data from ttm_tt V4

2011-11-17 Thread Konrad Rzeszutek Wilk
Rebase on top of no memory account changes (where/when is my >delorean when i need it ?) > V3 Make sure page list is initialized empty > V4 typo/syntax fixes > > Signed-off-by: Jerome Glisse > Reviewed-by: Thomas Hellstrom Reviewed-by: Konrad Rzeszutek Wilk > --- >

Re: [PATCH 07/14] drm/ttm: page allocation use page array instead of list

2011-11-17 Thread Konrad Rzeszutek Wilk
On Wed, Nov 16, 2011 at 11:57:31AM -0500, j.gli...@gmail.com wrote: > From: Jerome Glisse > > Use the ttm_tt pages array for pages allocations, move the list > unwinding into the page allocation functions. > > Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk

Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V6

2011-11-17 Thread Konrad Rzeszutek Wilk
On Wed, Nov 16, 2011 at 11:57:24AM -0500, j.gli...@gmail.com wrote: > Respin some of the patch with syntax/typo fix + patch 10 with proper > memory accounting of page being free. Ran it yesterday all day and as well today using the TTM DMA (so SWIOTLB is on) and had no trouble. This is with a Rade

Re: 3.2-rc2+: Reported regressions from 3.0 and 3.1

2011-11-22 Thread Konrad Rzeszutek Wilk
> Subject: Regression in 3.1 causes Xen to use wrong idle routine > Submitter : Stefan Bader > Date : 2011-10-26 10:24 > Message-ID : 4ea7dfd1.9060...@canonical.com > References : http://marc.info/?l=linux-acpi&m=131962467924564&w=2 The patch mentioned in http://mid.gmane.org/2015

Re: 3.2-rc2+: Reported regressions from 3.0 and 3.1

2011-11-29 Thread Konrad Rzeszutek Wilk
On Tue, Nov 22, 2011 at 08:54:12AM -0500, Konrad Rzeszutek Wilk wrote: > > Subject: Regression in 3.1 causes Xen to use wrong idle routine > > Submitter : Stefan Bader > > Date : 2011-10-26 10:24 > > Message-ID : 4ea7dfd1.9060...@canonical.com > > Referenc

Re: 3.2-rc2+: Reported regressions from 3.0 and 3.1

2011-11-29 Thread Konrad Rzeszutek Wilk
On Tue, Nov 29, 2011 at 07:34:28PM +0100, Borislav Petkov wrote: > On Tue, Nov 29, 2011 at 01:04:14PM -0500, Konrad Rzeszutek Wilk wrote: > > This patch: > > > > commit d91ee5863b71e8c90eaf6035bff3078a85e2e7b5 > > Author: Len Brown > > Date: Fri Apr 1 18:28:3

Re: 3.2-rc2+: Reported regressions from 3.0 and 3.1

2011-11-30 Thread Konrad Rzeszutek Wilk
On Tue, Nov 29, 2011 at 07:34:28PM +0100, Borislav Petkov wrote: > On Tue, Nov 29, 2011 at 01:04:14PM -0500, Konrad Rzeszutek Wilk wrote: > > This patch: Borislav, Thanks for your review comments. How does this patch look? I believe I touched upon all of the things you mentione

Re: ttm: merge ttm_backend & ttm_tt, introduce ttm dma allocator V7

2011-12-03 Thread Konrad Rzeszutek Wilk
On Fri, Nov 18, 2011 at 08:08:36PM -0500, Jerome Glisse wrote: > On Fri, Nov 18, 2011 at 08:04:47PM -0500, j.glisse at gmail.com wrote: > > Important fix to patch 14, fix accounting of ghost bo. When creating a > > ghost bo we don't account it, so set its acc_size to 0 so that when > > ghost is rel

Re: [RFC v2 1/2] dma-buf: Introduce dma buffer sharing mechanism

2011-12-03 Thread Konrad Rzeszutek Wilk
On Fri, Dec 02, 2011 at 02:27:31PM +0530, Sumit Semwal wrote: > This is the first step in defining a dma buffer sharing mechanism. > > A new buffer object dma_buf is added, with operations and API to allow easy > sharing of this buffer object across devices. > > The framework allows: > - differen

Re: 3.2-rc2+: Reported regressions from 3.0 and 3.1

2011-12-03 Thread Konrad Rzeszutek Wilk
> >From what I can see, you get the following callchain: > > start_kernel > |-> setup_arch > |-> x86_init.oem.arch_setup = xen_arch_setup > > |-> check_bugs > |-> identify_boot_cpu > |-> identify_cpu > |-> select_idle_routine > > > so xen_arch_set

Re: [patch] drm/ttm: fix condition (and vs or)

2011-12-08 Thread Konrad Rzeszutek Wilk
On Thu, Dec 08, 2011 at 10:34:00AM -0500, Jerome Glisse wrote: > On Thu, Dec 08, 2011 at 09:50:54AM +0300, Dan Carpenter wrote: > > The "if (!p && !p->dev)" condition isn't right because || was intended > > instead of &&. But actually, "p" is the list cursor and so it's always Duh! > > non-NULL a

Re: ttm dma allocator issue ?

2011-12-12 Thread Konrad Rzeszutek Wilk
On Fri, Dec 09, 2011 at 09:25:43PM -0500, Jerome Glisse wrote: > Hi Konrad i stumble on this after a long period of test : > > Dec 9 12:00:37 homer kernel: [ cut here ] > Dec 9 12:00:37 homer kernel: WARNING: at lib/dma-debug.c:894 > check_unmap+0x262/0x7e0() > Dec 9 12:

Re: ttm dma allocator issue ?

2011-12-12 Thread Konrad Rzeszutek Wilk
> > Any ideas ? > > The only way to do that would be to modify the 'struct dma_page' vaddr and dma > variables from what they had in __ttm_dma_alloc_page. But I am not seeing any > willfull modifications. We do pass in to dma_free_coherent the _same_ values! > > > Hm, it might be worth adding in

[PATCH] fixes to drm-next - TTM DMA code (v1)

2011-12-12 Thread Konrad Rzeszutek Wilk
Jerome pointed me to some accounting error in the DMA API debugging code and while I can't figure it out yet, I did notice some extreme slowness - which is due to the nouveau driver calling the unpopulate (now that unbind + unpopulate are squashed) quite a lot (this is using Gnome Shell - I think G

[PATCH 1/3] drm/ttm/dma: Only call set_pages_array_wb when the page is not in WB pool.

2011-12-12 Thread Konrad Rzeszutek Wilk
sys_ioctl system_call_fastpath __GI___ioctl and after this patch all of that disappears. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a

[PATCH 3/3] drm/ttm/dma: Optimize when free-ing the recycled page pool.

2011-12-12 Thread Konrad Rzeszutek Wilk
rebasing. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index e57aa24..156ddcd 100644 --- a/drivers

[PATCH 2/3] drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page.

2011-12-12 Thread Konrad Rzeszutek Wilk
using a different value for the amount of pages to shrink. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm

crash with "drm/ttm: callback move_notify any time bo placement change v4" patch

2011-12-12 Thread Konrad Rzeszutek Wilk
Hey, When I use the drm-next tree without the patch it works fine. (albeit slowly - but I posted the patches for that). With the patch mentioned I get this: 00:0d.0 VGA compatible controller: nVidia Corporation C61 [GeForce 6150SE nForce 430] (rev a2) sh-4.1# cd :00:0d.0 sh-4.1# cd driver

Re: ttm dma allocator issue ?

2011-12-12 Thread Konrad Rzeszutek Wilk
On Mon, Dec 12, 2011 at 12:37:43PM -0500, Konrad Rzeszutek Wilk wrote: > > > Any ideas ? > > > > The only way to do that would be to modify the 'struct dma_page' vaddr and > > dma > > variables from what they had in __ttm_dma_alloc_page. But I am not

Re: [PATCH] fixes to drm-next - TTM DMA code (v1)

2011-12-13 Thread Konrad Rzeszutek Wilk
On Tue, Dec 13, 2011 at 05:23:30PM +0100, Thomas Hellstrom wrote: > On 12/13/2011 05:07 PM, Jerome Glisse wrote: > >On Mon, Dec 12, 2011 at 03:09:26PM -0500, Konrad Rzeszutek Wilk wrote: > >>Jerome pointed me to some accounting error in the DMA API debugging code and > >

Re: [RFC v3 1/2] dma-buf: Introduce dma buffer sharing mechanism

2011-12-20 Thread Konrad Rzeszutek Wilk
On Mon, Dec 19, 2011 at 02:03:30PM +0530, Sumit Semwal wrote: > This is the first step in defining a dma buffer sharing mechanism. > > A new buffer object dma_buf is added, with operations and API to allow easy > sharing of this buffer object across devices. > > The framework allows: > - differen

Re: [PATCH] fixes to drm-next - TTM DMA code (v1)

2011-12-20 Thread Konrad Rzeszutek Wilk
On Mon, Dec 19, 2011 at 08:51:15PM +0100, Thomas Hellstrom wrote: > On 12/13/2011 05:40 PM, Konrad Rzeszutek Wilk wrote: > >On Tue, Dec 13, 2011 at 05:23:30PM +0100, Thomas Hellstrom wrote: > >>On 12/13/2011 05:07 PM, Jerome Glisse wrote: > >>>On Mon, Dec 12, 20

Re: [PATCH 2/3] drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page.

2011-12-21 Thread Konrad Rzeszutek Wilk
On Wed, Dec 21, 2011 at 10:17:36AM -0500, Jerome Glisse wrote: > On Mon, Dec 12, 2011 at 3:09 PM, Konrad Rzeszutek Wilk > wrote: > > The code to figure out how many pages to shrink the pool > > ends up capping the 'count' at _manager->options.max_size - which is OK.

Re: [RFC v3 1/2] dma-buf: Introduce dma buffer sharing mechanism

2012-01-03 Thread Konrad Rzeszutek Wilk
On Fri, Dec 23, 2011 at 03:22:35PM +0530, Semwal, Sumit wrote: > Hi Konrad, > > On Tue, Dec 20, 2011 at 10:06 PM, Konrad Rzeszutek Wilk > wrote: > > On Mon, Dec 19, 2011 at 02:03:30PM +0530, Sumit Semwal wrote: > >> This is the first step in defining a dma buffer sha

Re: TTM and AGP conflicts

2012-01-03 Thread Konrad Rzeszutek Wilk
On Tue, Jan 03, 2012 at 05:43:40PM -0500, Jerome Glisse wrote: > On Fri, Dec 23, 2011 at 01:19:43AM +, James Simmons wrote: > > > > > > Hi! > > > > > > > >        I updated the openchrome tree and while testing on the AGP system > > > > discovered some interesting problems with the new TTM cha

[PATCH 3/3] Revert "drm/ttm: callback move_notify any time bo placement change v4"

2012-01-04 Thread Konrad Rzeszutek Wilk
xc0 [nouveau] RSP CR2: ---[ end trace b57ad98adec9841d ]--- Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/nouveau/nouveau_bo.c |4 ++-- drivers/gpu/drm/ttm/ttm_bo.c |9 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/driv

[PATCH 2/3] drm/ttm/dma: Fix accounting error when calling ttm_mem_global_free_page and don't try to free freed pages.

2012-01-04 Thread Konrad Rzeszutek Wilk
tm_page_alloc.c does it). This reintroduces the code that was lost during rebasing. Reviewed-by: Jerome Glisse Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --gi

[PATCH 1/3] drm/ttm/dma: Only call set_pages_array_wb when the page is not in WB pool.

2012-01-04 Thread Konrad Rzeszutek Wilk
system_call_fastpath __GI___ioctl and after this patch all of that disappears. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b

[PATCH] fixes to drm-next - ttm code (v2) found when using nouveau.

2012-01-04 Thread Konrad Rzeszutek Wilk
When I was debugging some DMA API accounting error (which were found to be with the DMA API debug code), I encountered a couple of issues: 1). Doing "unbind" on the PCI device would crash the kernel _only_ with the nouveau driver. The readon worked fine. This was due to: "drm/ttm: callb

Re: [PATCH] drm/nouveau: fix ttm move notify callback

2012-01-05 Thread Konrad Rzeszutek Wilk
On Thu, Jan 05, 2012 at 01:31:55PM -0500, j.gli...@gmail.com wrote: > From: Jerome Glisse > > ttm might call the move notify with null new mem placement, > properly handle this case inside nouveau move notify callback. Let me give this a spin tonight on both PCIe and AGP hardware. Um, were you

Re: merge window closed

2012-01-05 Thread Konrad Rzeszutek Wilk
On Thu, Jan 05, 2012 at 10:48:10AM +, Dave Airlie wrote: > Hi > > So Linus has released, so really whats in -next is really it > > I've two things outstanding, > the TTM/AGP fixes, from Jerome/Konrad, guys please cross-review asap, OK, so the two I posted: drm/ttm/dma: Fix accounting error

Re: TTM and AGP conflicts

2012-01-05 Thread Konrad Rzeszutek Wilk
On Tue, Jan 03, 2012 at 05:59:33PM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Jan 03, 2012 at 05:43:40PM -0500, Jerome Glisse wrote: > > On Fri, Dec 23, 2011 at 01:19:43AM +, James Simmons wrote: > > > > > > > > Hi! > > > > > > > > &

Re: [PATCH] drm/nouveau: fix ttm move notify callback

2012-01-06 Thread Konrad Rzeszutek Wilk
On Thu, Jan 05, 2012 at 09:14:10PM -0500, Konrad Rzeszutek Wilk wrote: > On Fri, Jan 06, 2012 at 07:53:13AM +1000, Ben Skeggs wrote: > > On Thu, 2012-01-05 at 13:31 -0500, j.gli...@gmail.com wrote: > > > From: Jerome Glisse > > > > > > ttm might call the mov

Re: [PATCH] drm/nouveau: fix ttm move notify callback

2012-01-06 Thread Konrad Rzeszutek Wilk
On Fri, Jan 06, 2012 at 11:51:03AM -0500, Jerome Glisse wrote: > On Fri, Jan 6, 2012 at 9:57 AM, Konrad Rzeszutek Wilk > wrote: > > On Thu, Jan 05, 2012 at 09:14:10PM -0500, Konrad Rzeszutek Wilk wrote: > >> On Fri, Jan 06, 2012 at 07:53:13AM +1000, Ben Skeggs wrote: > &g

Re: [PATCH] drm/nouveau: fix ttm move notify callback

2012-01-06 Thread Konrad Rzeszutek Wilk
> Still having difficulty to reproduce can you reproduce with the attached > printk debuging patch and provide the log (only few printk preceding the > oops or segfault are interesting). http://darnok.org/vga/move_notify-v212.log > > Cheers, > Jerome > >From 862e2cc6d35d85404ed24d24c5a5c49c5ef4

Re: TTM and AGP conflicts

2012-01-09 Thread Konrad Rzeszutek Wilk
On Mon, Jan 09, 2012 at 10:07:02AM +0100, Thomas Hellstrom wrote: > On 01/06/2012 04:51 PM, James Simmons wrote: > You can achieve what you want by either adding a new domain so you would > have > system, vram, agp, pcidma and object can be bound to one and only one. Or > you > >>

Re: [PATCH] drm/nouveau: fix ttm move notify callback

2012-01-10 Thread Konrad Rzeszutek Wilk
On Tue, Jan 10, 2012 at 01:46:05PM +1000, Ben Skeggs wrote: > On Fri, 2012-01-06 at 16:00 -0500, Jerome Glisse wrote: > > On Fri, Jan 06, 2012 at 02:52:49PM -0500, Konrad Rzeszutek Wilk wrote: > > > > Still having difficulty to reproduce can you reproduce with the attached &g

Re: [RFC] Future TTM DMA direction

2012-01-10 Thread Konrad Rzeszutek Wilk
On Mon, Jan 09, 2012 at 10:37:28AM +0100, Thomas Hellstrom wrote: > Hi! > > When TTM was originally written, it was assumed that GPU apertures > could address pages directly, and that the CPU could access those > pages without explicit synchronization. The process of binding a > page to a GPU tran

[PATCH] ttm/dma: Remove the WARN() which is not useful.

2012-01-12 Thread Konrad Rzeszutek Wilk
00_ib_fini+0x19/0x20 [radeon] [] evergreen_init+0x1ee/0x2d0 [radeon] The big WARN() has nothing to do with the culprit - which is that the firmware was not loaded. So lets remove the WARN() from the TTM DMA code. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dm

[PATCH] minor fix for 3.3-rc0 in TTM DMA code.

2012-01-12 Thread Konrad Rzeszutek Wilk
Please put [PATCH] ttm/dma: Remove the WARN() which is not useful. in your 3.3-rc0 branch. It is a minor fix, but quite .. um annoying and it masks the real issue. Thanks! ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedes

Re: [PATCH] dma-buf: Use EXPORT_SYMBOL

2012-01-20 Thread Konrad Rzeszutek Wilk
On Fri, Jan 20, 2012 at 10:04:57AM -0800, Robert Morell wrote: > On Wed, Jan 18, 2012 at 01:10:04AM -0800, Semwal, Sumit wrote: > > On Wed, Jan 18, 2012 at 5:38 AM, Robert Morell wrote: > > > EXPORT_SYMBOL_GPL is intended to be used for "an internal implementation > > > issue, and not really an in

Re: [next] Null pointer dereference in nouveau_vm_map_sg

2012-01-22 Thread Konrad Rzeszutek Wilk
On Tue, Jan 17, 2012 at 12:57:50AM +0100, Martin Nyhus wrote: > On Monday 16. January 2012 21:30:59 Jerome Glisse wrote: > > On Sun, Jan 15, 2012 at 10:31:08PM +0100, Martin Nyhus wrote: > > > In some cases mem will be null in nouveau_vm_map_sg, resulting in a crash > > > at drivers/gpu/drm/nouveau

Re: [PATCH] drm/nouveau: fix ttm move notify callback

2012-01-24 Thread Konrad Rzeszutek Wilk
On Tue, Jan 10, 2012 at 01:46:05PM +1000, Ben Skeggs wrote: > On Fri, 2012-01-06 at 16:00 -0500, Jerome Glisse wrote: > > On Fri, Jan 06, 2012 at 02:52:49PM -0500, Konrad Rzeszutek Wilk wrote: > > > > Still having difficulty to reproduce can you reproduce with the attached &g

Re: Why do flush page cache twice when change TT's cache attribute

2012-03-20 Thread Konrad Rzeszutek Wilk
On Tue, Mar 20, 2012 at 10:15:02AM +0800, Scott Fang wrote: > Can I do the optimization like: > > if (ttm->caching_state == tt_cached) > -drm_clflush_pages(ttm->pages, ttm->num_pages); > +for (i = 0; i < ttm->num_pages; ++i) > + if (PageHighMem(ttm->pages[i])) > +

Re: Linux 3.4-rc4

2012-04-22 Thread Konrad Rzeszutek Wilk
On Sun, Apr 22, 2012 at 08:05:54PM -0400, Nick Bowler wrote: > On 2012-04-22 12:40 -0400, Nick Bowler wrote: > > On 2012-04-21 21:51 -0700, Linus Torvalds wrote: > > > Nick, I realize you had trouble with a bisection already, but it might > > > really be worth trying again. Do a > > > > > > gi

Re: Linux 3.4-rc4

2012-04-24 Thread Konrad Rzeszutek Wilk
On Mon, Apr 23, 2012 at 09:03:45PM -0400, Nick Bowler wrote: > On 2012-04-22 22:45 -0400, Konrad Rzeszutek Wilk wrote: > > On Sun, Apr 22, 2012 at 08:05:54PM -0400, Nick Bowler wrote: > > > Following up on the above, the commit which introduces the panics during >

Re: [PATCH 1/2] ttm: add prime sharing support to TTM

2012-05-04 Thread Konrad Rzeszutek Wilk
On Fri, May 04, 2012 at 02:46:54PM +0100, Dave Airlie wrote: > From: Dave Airlie > > This adds the ability for ttm common code to take an SG table > and use it as the backing for a slave TTM object. I took a look at both patches from the perspective of the TTM DMA pool code and it looks fine (th

Re: [PATCH -fixes] drm/ttm: Fix buffer object metadata accounting regression v2

2012-06-12 Thread Konrad Rzeszutek Wilk
with an illegal size. This is also fixed with this commit. > > v2: Fixed an error path and removed an unused variable. > > Signed-off-by: Thomas Hellstrom > Cc: Jerome Glisse > Cc: sta...@vger.kernel.org Reviewed-by: Konrad Rzeszutek Wilk > --- > drivers/gpu/drm/ttm/ttm_b

Re: about_radeon_dma

2012-06-13 Thread Konrad Rzeszutek Wilk
On Wed, Jun 13, 2012 at 09:44:19AM +0800, llittle了了 wrote: > > HI,all > Now, my lab is using radeon_ati card。And, I need ati_card dma > function。But, I do not clear that how the ati card know the dma address which > alloced by kernel?? By using the PCI API. > > Can any kernel dri

Re: nouveau shuts the machine down with v3.9-rc1 (temperature (72 C) hit the 'shutdown' threshold).

2013-03-04 Thread Konrad Rzeszutek Wilk
On Mon, Mar 04, 2013 at 08:21:48PM +0100, Martin Peres wrote: > Hi Konrad, > > On 04/03/2013 19:40, Konrad Rzeszutek Wilk wrote:> After git merge > ab7826595e9ec51a51f622c5fc91e2f59440481a > > (Merge tag 'mfd-3.9-1' of > git://git.kernel.org/pub/scm/linux/kernel/

Re: nouveau shuts the machine down with v3.9-rc1 (temperature (72 C) hit the 'shutdown' threshold).

2013-03-11 Thread Konrad Rzeszutek Wilk
> With that I am still getting the issues (even with an insance delay of 100 > seconds). > Here is the serial log with various runs. Any thoughts? > [ 13.523878] initcall init_sg+0x0/0x1000 [sg] returned 0 after 5355 usecs > ^G^G[ 13.621376] nouveau [ PTHERM][:00:0d.0] programmed thresh

Re: [REGRESSION] system does not resume from ram due to commit "drm/nv50/fifo: prevent races between clients updating playlists"

2013-05-31 Thread Konrad Rzeszutek Wilk
On Tue, May 28, 2013 at 08:55:29PM +0200, Sven Joachim wrote: > On 2013-05-26 23:09 +0200, Maarten Maathuis wrote: > > > My NV96 does not resume from suspend to ram (the screen stays black, magic > > sysrq keys do work) with the current linus git kernel, i bisected it to the > > following commit.

Re: [REGRESSION] system does not resume from ram due to commit "drm/nv50/fifo: prevent races between clients updating playlists"

2013-06-04 Thread Konrad Rzeszutek Wilk
On Mon, Jun 03, 2013 at 03:50:50PM +1000, Ben Skeggs wrote: > On Fri, May 31, 2013 at 11:05 PM, Konrad Rzeszutek Wilk < > konrad.w...@oracle.com> wrote: > > > On Tue, May 28, 2013 at 08:55:29PM +0200, Sven Joachim wrote: > > > On 2013-05-26 23:09 +0200, Maarten Ma

Re: [RPC 0/21] DRM: Add VIA DRM driver

2013-06-10 Thread Konrad Rzeszutek Wilk
tutorial on how to use different mailers. The "Setup your tools" has a nice tutorial on .gitconfig setup. If you would like to use me as test subject and send emails to me before the mailing list please do. I usually have this in my .gitconfig file: [konrad@build-external ~]$ more .gitcon

Re: [PATCH 0/3] fbdev no more!

2013-06-17 Thread Konrad Rzeszutek Wilk
On Sun, Jun 16, 2013 at 04:57:17PM +0200, Daniel Vetter wrote: > Hi all, > > So I've taken a look again at the locking mess in our fbdev support and cried. > Fixing up the console_lock mess around the fbdev notifier will be real work, > semanatically the fbdev layer does lots of stupid things (lik

i915 mapping large (3MB) scatter list, hitting limits on certain IOMMUs that can only map contingous regions up to 2MB.

2013-06-21 Thread Konrad Rzeszutek Wilk
I am wondering is if there are some fallbacks when the underlaying IOMMU can't deal with a request for contingous regions that are more than 2MB? Thanks. >From a681a4adb4738c32cb1acdf6f5161bf877816b01 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Fri, 21 Jun 2013 11:17:55 -

Regression introduced by 90797e6d1ec0dfde6ba62a48b9ee3803887d6ed4 ("drm/i915: create compact dma scatter lists for gem objects") Was:Re: i915 mapping large (3MB) scatter list, hitting limits on certa

2013-06-21 Thread Konrad Rzeszutek Wilk
On Fri, Jun 21, 2013 at 03:28:28PM -0400, Konrad Rzeszutek Wilk wrote: > Hey, CC-ing Imre, Imre, your patch 90797e6d1ec0dfde6ba62a48b9ee3803887d6ed4 ("drm/i915: create compact dma scatter lists for gem objects") is the cause of the regression. If I revert your patch it boots fin

Re: Regression introduced by 90797e6d1ec0dfde6ba62a48b9ee3803887d6ed4 ("drm/i915: create compact dma scatter lists for gem objects") Was:Re: i915 mapping large (3MB) scatter list, hitting limits on ce

2013-06-24 Thread Konrad Rzeszutek Wilk
On Sat, Jun 22, 2013 at 03:22:59PM +0100, Chris Wilson wrote: > On Fri, Jun 21, 2013 at 10:03:43PM -0400, Konrad Rzeszutek Wilk wrote: > > On Fri, Jun 21, 2013 at 03:28:28PM -0400, Konrad Rzeszutek Wilk wrote: > > > Hey, > > > > CC-ing I

[PATCH] drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.

2013-06-24 Thread Konrad Rzeszutek Wilk
.get_pages' and the i915_gem_gtt_prepare_object to retry with smaller max gap of the amount of PFNs that can be combined together - but with this issue discovered during rc7 that might be too risky. Reported-and-Tested-by: Konrad Rzeszutek Wilk CC: Chris Wilson CC: Imre Deak CC: Daniel Vett

[PATCH] Bootup regression of v3.10-rc6 + SWIOTLB + Intel 4000.

2013-06-24 Thread Konrad Rzeszutek Wilk
Hey Dave, Chris, Imre, Attached is a fix that makes v3.10-rc6 boot on Intel HD 4000 when SWIOTLB bounce buffer is in usage. The SWIOTLB can only handle up to 512KB swath of memory to create bounce buffers for and Imre's patch made it possible to provide more than to the DMA API which caused it to

Re: [PATCH] drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.

2013-06-24 Thread Konrad Rzeszutek Wilk
On Mon, Jun 24, 2013 at 07:09:12PM +0200, Daniel Vetter wrote: > On Mon, Jun 24, 2013 at 11:47:48AM -0400, Konrad Rzeszutek Wilk wrote: > > Git commit 90797e6d1ec0dfde6ba62a48b9ee3803887d6ed4 > > ("drm/i915: create compact dma scatter lists for gem objects") makes > >

Re: [PATCH] drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.

2013-06-24 Thread Konrad Rzeszutek Wilk
On Mon, Jun 24, 2013 at 08:26:18PM +0200, Daniel Vetter wrote: > On Mon, Jun 24, 2013 at 7:32 PM, Konrad Rzeszutek Wilk > wrote: > > On Mon, Jun 24, 2013 at 07:09:12PM +0200, Daniel Vetter wrote: > >> On Mon, Jun 24, 2013 at 11:47:48AM -0400, Konrad Rzeszutek Wilk wro

Re: [PATCH] drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.

2013-06-24 Thread Konrad Rzeszutek Wilk
Dave Airlie wrote: >On Tue, Jun 25, 2013 at 4:34 AM, Konrad Rzeszutek Wilk > wrote: >> On Mon, Jun 24, 2013 at 08:26:18PM +0200, Daniel Vetter wrote: >>> On Mon, Jun 24, 2013 at 7:32 PM, Konrad Rzeszutek Wilk >>> wrote: >>> > On Mon, Jun 24, 201

Re: i915 mapping large (3MB) scatter list, hitting limits on certain IOMMUs that can only map contingous regions up to 2MB.

2013-06-25 Thread Konrad Rzeszutek Wilk
On Tue, Jun 25, 2013 at 11:03:01AM -0400, Jerome Glisse wrote: > On Fri, Jun 21, 2013 at 3:28 PM, Konrad Rzeszutek Wilk > wrote: > > Hey, > > > > I am using an ThinkPad X230 with an Intel HD 4000. With a stock Fedora 18 > > (3.9.6) I can get it to boot and work just

Re: [PATCH] drm/i915: make compact dma scatter lists creation work with SWIOTLB backend.

2013-06-26 Thread Konrad Rzeszutek Wilk
> >>Dave. > > > > Hey Dave > > Of course I will investigate. > > > > The SWIOTLB is unfortunately used because it is a fallback (and I am the > > maintainer of it) and if a real IOMMU is activated it can be mitigated > > differently. When you say 'passed through' you mean in terms of an IOMMU >

Re: drm-next status (or: drm-openchrome will not be in 3.11)

2013-06-30 Thread Konrad Rzeszutek Wilk
James Simmons wrote: > >> Am Freitag, 28. Juni 2013, 13:31:50 schrieb Dave Airlie: >> > Okay drm-next is pretty big, possibly the biggest ever. >> > >> > Outstanding things I know about, and will merge, if they arrive >soon: >> > exynos -next >> > nouveau -next >> > >> > Big things I've merged:

Re: [PATCH] drm/prime: remove cargo-cult locking from map_sg helper

2013-07-10 Thread Konrad Rzeszutek Wilk
> So after a bit of irc chatting with Maarten this seems to be more > involved. The above check is to cache the dma mapping, but the > implementation is bogus in tons of ways: > - If direction changes we don't bother with unmaping and freeing the > mapping, but simply leak it. > - This will break i

Re: FAILED: patch "[PATCH] drm/i915: make compact dma scatter lists creation work with" failed to apply to 3.10-stable tree

2013-07-24 Thread Konrad Rzeszutek Wilk
ncluding the original git commit > id to . > > thanks, > > greg k-h > > -- original commit in Linus's tree -- > > >From 1625e7e549c50fb57a1e1ab1cb0f5735c84c9029 Mon Sep 17 00:00:00 2001 > From: Konrad Rzeszutek Wilk > Da

Re: [PATCH] cleanup: Add 'struct dev' in the TTM layer to be passed in for DMA API calls.

2011-03-31 Thread Konrad Rzeszutek Wilk
> >I can start this next week if you guys are comfortable with this idea. > > > > > > Konrad, > > 1) A couple of questions first. Where are the memory pools going to > end up in this design. Could you draft an API? How is page > accounting going to be taken care of? How do we differentiate > betw

Re: WARNING: at drivers/gpu/drm/ttm/ttm_page_alloc.c:758 .. [GIT PULL] stable/ttm.pci-api-rc2 for 2.6.39-rc2

2011-04-06 Thread Konrad Rzeszutek Wilk
On Wed, Apr 06, 2011 at 11:13:59AM +0200, Thomas Hellstrom wrote: > Dave, Konrad > > I think we need to back out this change as soon as possible. I will > follow up the discussion with Konrad on how we should attempt to > handle vm passthrough as soon as things settle down a bit over here. Ok. I

Re: [PATCH] cleanup: Add 'struct dev' in the TTM layer to be passed in for DMA API calls.

2011-04-08 Thread Konrad Rzeszutek Wilk
On Fri, Apr 08, 2011 at 04:57:14PM +0200, Thomas Hellstrom wrote: > Konrad, > > Sorry for waiting so long to answer. Workload is quite heavy ATM. > Please see inline. OK. Thank you for taking a look... some questions before you depart on vacation. > > 1). Get in the patch that passed in 'struct

Re: suspend/resume stopped working

2011-04-11 Thread Konrad Rzeszutek Wilk
On Tue, Apr 12, 2011 at 12:02:28AM +0300, Sergey Senozhatsky wrote: > Hello, > Aborting (Ctrl-Brake) suspend to disk process (s2disk) brakes drm/radeon. Can you try to revert 69a07f0b117a40fcc1a479358d8e1f41793617f2 just to see if that is the culprit. > Please see the logs below: > > [..] > [ 1

Re: [PATCH] drm/radeon/kms: clean up gart dummy page handling

2011-04-12 Thread Konrad Rzeszutek Wilk
the > dummy page on their own. So to do Konrad's patch one > better, just remove the allocation and freeing of the > dummy page in the r6xx, 7xx, evergreen, and ni code and > allocate and free in the gart_init/fini() functions for > all asics. > > Cc: Konrad Rzeszutek

Re: [PATCH] drm/radeon/nouveau: fix build regression on alpha due to Xen changes.

2011-05-09 Thread Konrad Rzeszutek Wilk
ost of this anyways properly. Yes, just need to find the time :-) > > Signed-off-by: Dave Airlie > Cc: Konrad Rzeszutek Wilk Acked-by: Konrad Rzeszutek Wilk Thanks for sending this patch out! > --- > drivers/gpu/drm/nouveau/nouveau_sgdma.c |3 ++- > drivers/gpu

[PATCH] ttm: Fix spelling mistakes and remove unused #ifdef

2011-06-07 Thread Konrad Rzeszutek Wilk
. and some comments to make it easier to understand. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 14 +++--- include/drm/ttm/ttm_bo_api.h |3 --- include/drm/ttm/ttm_bo_driver.h |6 +++--- include/drm/ttm/ttm_memory.h

[PATCH] fix spelling mistakes and clear up some wording.

2011-06-07 Thread Konrad Rzeszutek Wilk
While working on the DMA pool concept in the TTM code I re-read everything once more to make sure I was not missing anything. Whilst doing that I found some spelling mistakes and some wording that could be improved a bit. So fixed it up and please consider this patch for 3.1. _

[PATCH] ttm: Do not increment the amount of pages in a pool by the current amount

2011-06-08 Thread Konrad Rzeszutek Wilk
.instead increment it by the count of pages that we want to splice into the pool list. In other words we were incrementing the pool->npages by the wrong amount. This bug was observed from code inspection. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc.c |

[PATCH] bugfix and cleanup patches in the TTM code for 3.1.

2011-06-08 Thread Konrad Rzeszutek Wilk
The bug-fix "ttm: Do not increment the amount of pages in a pool by the current amount" I never observed, but found while looking at the code. The cleanup patch: "ttm: Fix spelling mistakes and remove unused #ifdef", I had posted earlier and Randy Dunlap graciously added some extra cleanups - whi

[PATCH] ttm: Fix spelling mistakes and remove unused #ifdef

2011-06-08 Thread Konrad Rzeszutek Wilk
. and some comments to make it easier to understand. Ackedby: Randy Dunlap [v2: Added some more updates from Randy Dunlap] Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 16 include/drm/ttm/ttm_bo_api.h |3 --- include/drm/ttm

Re: [PATCH] bugfix and cleanup patches in the TTM code for 3.1.

2011-06-08 Thread Konrad Rzeszutek Wilk
> > > The bug-fix "ttm: Do not increment the amount of pages in a pool by the > > > current amount" > > > I never observed, but found while looking at the code. The cleanup patch: > > > "ttm: Fix spelling mistakes and remove unused #ifdef", I had posted > > > earlier and Randy > > > Dunlap gracio

[PATCH 3/6] ttm: Pass in 'struct device' to TTM so it can do DMA API on behalf of device.

2011-08-24 Thread Konrad Rzeszutek Wilk
We want to pass in the 'struct device' to the TTM layer so that the TTM DMA pool code (if enabled) can use it. The DMA API code needs the 'struct device' to do the DMA API operations. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/nouveau/nouveau_mem.c |3

[PATCH 5/6] ttm: Provide a DMA aware TTM page pool code.

2011-08-24 Thread Konrad Rzeszutek Wilk
; then there are the DMA32 variants which are: write-combined dma32, uncached dma32, and cached dma32. Currently this code only gets activated when any variant of the SWIOTLB IOMMU code is running (Intel without VT-d, AMD without GART, IBM Calgary and Xen PV with PCI devices). Signed-off-by: Ko

[RFC PATCH] TTM DMA pool v1

2011-08-24 Thread Konrad Rzeszutek Wilk
Way back in January this patchset: http://lists.freedesktop.org/archives/dri-devel/2011-January/006905.html was merged in, but pieces of it had to be reverted b/c they did not work properly under PowerPC, ARM, and when swapping out pages to disk. After a bit of discussion on the mailing list http:

[PATCH 1/6] ttm/radeon/nouveau: Check the DMA address from TTM against known value.

2011-08-24 Thread Konrad Rzeszutek Wilk
t use pci_dma_mapping_error as that is IOMMU specific (some check for a specific physical address, some for ranges, some just do a check against zero). Also update the comments in the header about the true state of that parameter. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/no

[PATCH 2/6] ttm: Introduce ttm_page_alloc_func structure.

2011-08-24 Thread Konrad Rzeszutek Wilk
ode). Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_memory.c |3 ++ drivers/gpu/drm/ttm/ttm_page_alloc.c | 58 include/drm/ttm/ttm_page_alloc.h | 60 ++ 3 files changed, 113 insertions(+), 8 deleti

[PATCH 6/6] ttm: Add 'no_dma' parameter to turn the TTM DMA pool off during runtime.

2011-08-24 Thread Konrad Rzeszutek Wilk
The TTM DMA only gets turned on when the SWIOTLB is enabled - but we might also want to turn it off when SWIOTLB is on to use the non-DMA TTM pool code. In the future this parameter can be removed. Signed-off-by: Konrad Rzeszutek Wilk --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c |4

<    1   2   3   4   5   6   >