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

2011-11-10 Thread j . glisse
From: Konrad Rzeszutek Wilk With the exception that we do not handle the AGP case. We only deal with PCIe cards such as ATI ES1000 or HD3200 that have been detected to only do DMA up to 32-bits. V2 force dma32 if we fail to set bigger dma mask V3 Rebase on top of no memory account changes (where

[PATCH 13/13] drm/ttm: isolate dma data from ttm_tt V2

2011-11-10 Thread j . glisse
From: Jerome Glisse Move dma data to a superset ttm_dma_tt structure which herit 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 no memory account changes (where/when is my delorean when i need it ?) Signed-off-by: Jer

[PATCH 12/13] drm/nouveau: enable the ttm dma pool when swiotlb is active V3

2011-11-10 Thread j . glisse
From: Konrad Rzeszutek Wilk If the card is capable of more than 32-bit, then use the default TTM page pool code which allocates from anywhere in the memory. Note: If the 'ttm.no_dma' parameter is set, the override is ignored and the default TTM pool is used. V2 use pci_set_consistent_dma_mask V

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

2011-11-11 Thread j . glisse
So attached is updated serie of patch with fixes for swaping issue that also impacted memory accounting. Last patch fix memory accounting for radeon & nouveau. I think it's ready to go into drm-next, patchset is against linus tree as there is thing there not in next that conflict. (in radeon iirc)

[PATCH 01/14] swiotlb: Expose swiotlb_nr_tlb function to modules

2011-11-11 Thread j . glisse
From: Konrad Rzeszutek Wilk As a mechanism to detect whether SWIOTLB is enabled or not. We also fix the spelling - it was swioltb instead of swiotlb. CC: FUJITA Tomonori [v1: Ripped out swiotlb_enabled] Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/swiotlb-xen.c |2 +- include/linu

[PATCH 02/14] drm/ttm: remove userspace backed ttm object support

2011-11-11 Thread j . glisse
From: Jerome Glisse This was never use in none of the driver, properly using userspace page for bo would need more code (vma interaction mostly). Removing this dead code in preparation of ttm_tt & backend merge. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thoma

[PATCH 03/14] drm/ttm: remove split btw highmen and lowmem page

2011-11-11 Thread j . glisse
From: Jerome Glisse Split btw highmem and lowmem page was rendered useless by the pool code. Remove it. Note further cleanup would change the 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 o

[PATCH 04/14] drm/ttm: remove unused backend flags field

2011-11-11 Thread j . glisse
From: Jerome Glisse This field is not use by any of the driver just drop it. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/radeon/radeon_ttm.c |1 - include/drm/ttm/ttm_bo_driver.h |2 -- 2 files changed, 0 inser

[PATCH 05/14] drm/ttm: use ttm put pages function to properly restore cache attribute

2011-11-11 Thread j . glisse
From: Jerome Glisse On failure we need to make sure the page we free has wb cache attribute. Do this pas call the proper ttm page helper function. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/ttm/ttm_tt.c |5 - 1 fi

[PATCH 06/14] drm/ttm: test for dma_address array allocation failure

2011-11-11 Thread j . glisse
From: Jerome Glisse Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- 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/gpu/drm/ttm/ttm_tt.c index 90527a

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

2011-11-11 Thread j . glisse
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 --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 85 +- drivers/gpu/drm/ttm/ttm_tt.c | 36 +++

[PATCH 08/14] drm/ttm: merge ttm_backend and ttm_tt V5

2011-11-11 Thread j . glisse
From: Jerome Glisse ttm_backend will only exist with a ttm_tt, and ttm_tt will only be of interest when bound to a backend. Merge them to avoid code and data duplication. V2 Rebase on top of memory accounting overhaul V3 Rebase on top of more memory accounting changes V4 Rebase on top of no memo

[PATCH 09/14] drm/ttm: introduce callback for ttm_tt populate & unpopulate V4

2011-11-11 Thread j . glisse
From: Jerome Glisse Move the page allocation and freeing to driver callback and provide ttm code helper function for those. Most intrusive change, is the fact that we now only fully populate an object this simplify some of code designed around the page fault design. V2 Rebase on top of memory a

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

2011-11-11 Thread j . glisse
From: Konrad Rzeszutek Wilk In TTM world the pages for the graphic drivers are kept in three different pools: write combined, uncached, and cached (write-back). When the pages are used by the graphic driver the graphic adapter via its built in MMU (or AGP) programs these pages in. The programming

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

2011-11-11 Thread j . glisse
From: Konrad Rzeszutek Wilk With the exception that we do not handle the AGP case. We only deal with PCIe cards such as ATI ES1000 or HD3200 that have been detected to only do DMA up to 32-bits. V2 force dma32 if we fail to set bigger dma mask V3 Rebase on top of no memory account changes (where

[PATCH 12/14] drm/nouveau: enable the ttm dma pool when swiotlb is active V3

2011-11-11 Thread j . glisse
From: Konrad Rzeszutek Wilk If the card is capable of more than 32-bit, then use the default TTM page pool code which allocates from anywhere in the memory. Note: If the 'ttm.no_dma' parameter is set, the override is ignored and the default TTM pool is used. V2 use pci_set_consistent_dma_mask V

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

2011-11-11 Thread j . glisse
From: Jerome Glisse Move dma data to a superset ttm_dma_tt structure which herit 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 no memory account changes (where/when is my delorean when i need it ?) V3 Make sure page l

[PATCH 14/14] drm/ttm: simplify memory accounting for ttm user

2011-11-11 Thread j . glisse
From: Jerome Glisse Provide helper function to compute the kernel memory size needed for each buffer object. Move all the accounting inside ttm, simplifying driver and avoiding code duplication accross them. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_bo.c |6 +++-

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

2011-11-16 Thread j . glisse
Respin some of the patch with syntax/typo fix + patch 10 with proper memory accounting of page being free. Cheers, Jerome ___ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 01/14] swiotlb: Expose swiotlb_nr_tlb function to modules

2011-11-16 Thread j . glisse
From: Konrad Rzeszutek Wilk As a mechanism to detect whether SWIOTLB is enabled or not. We also fix the spelling - it was swioltb instead of swiotlb. CC: FUJITA Tomonori [v1: Ripped out swiotlb_enabled] Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/swiotlb-xen.c |2 +- include/linu

[PATCH 02/14] drm/ttm: remove userspace backed ttm object support

2011-11-16 Thread j . glisse
From: Jerome Glisse This was never use in none of the driver, properly using userspace page for bo would need more code (vma interaction mostly). Removing this dead code in preparation of ttm_tt & backend merge. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thoma

[PATCH 03/14] drm/ttm: remove split btw highmen and lowmem page

2011-11-16 Thread j . glisse
From: Jerome Glisse Split btw highmem and lowmem page was rendered useless by the pool code. Remove it. Note further cleanup would change the 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 o

[PATCH 04/14] drm/ttm: remove unused backend flags field

2011-11-16 Thread j . glisse
From: Jerome Glisse This field is not use by any of the driver just drop it. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/radeon/radeon_ttm.c |1 - include/drm/ttm/ttm_bo_driver.h |2 -- 2 files changed, 0 inser

[PATCH 05/14] drm/ttm: use ttm put pages function to properly restore cache attribute

2011-11-16 Thread j . glisse
From: Jerome Glisse On failure we need to make sure the page we free has wb cache attribute. Do this pas call the proper ttm page helper function. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/ttm/ttm_tt.c |5 - 1 fi

[PATCH 06/14] drm/ttm: test for dma_address array allocation failure

2011-11-16 Thread j . glisse
From: Jerome Glisse Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- 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/gpu/drm/ttm/ttm_tt.c index 90527a

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

2011-11-16 Thread j . glisse
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 --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 85 +- drivers/gpu/drm/ttm/ttm_tt.c | 36 +++

[PATCH 08/14] drm/ttm: merge ttm_backend and ttm_tt V5

2011-11-16 Thread j . glisse
From: Jerome Glisse ttm_backend will only exist with a ttm_tt, and ttm_tt will only be of interest when bound to a backend. Merge them to avoid code and data duplication. V2 Rebase on top of memory accounting overhaul V3 Rebase on top of more memory accounting changes V4 Rebase on top of no memo

[PATCH 09/14] drm/ttm: introduce callback for ttm_tt populate & unpopulate V4

2011-11-16 Thread j . glisse
From: Jerome Glisse Move the page allocation and freeing to driver callback and provide ttm code helper function for those. Most intrusive change, is the fact that we now only fully populate an object this simplify some of code designed around the page fault design. V2 Rebase on top of memory a

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

2011-11-16 Thread j . glisse
From: Konrad Rzeszutek Wilk In TTM world the pages for the graphic drivers are kept in three different pools: write combined, uncached, and cached (write-back). When the pages are used by the graphic driver the graphic adapter via its built in MMU (or AGP) programs these pages in. The programming

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

2011-11-16 Thread j . glisse
From: Konrad Rzeszutek Wilk With the exception that we do not handle the AGP case. We only deal with PCIe cards such as ATI ES1000 or HD3200 that have been detected to only do DMA up to 32-bits. V2 force dma32 if we fail to set bigger dma mask V3 Rebase on top of no memory account changes (where

[PATCH 12/14] drm/nouveau: enable the ttm dma pool when swiotlb is active V3

2011-11-16 Thread j . glisse
From: Konrad Rzeszutek Wilk If the card is capable of more than 32-bit, then use the default TTM page pool code which allocates from anywhere in the memory. Note: If the 'ttm.no_dma' parameter is set, the override is ignored and the default TTM pool is used. V2 use pci_set_consistent_dma_mask V

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

2011-11-16 Thread j . glisse
From: Jerome Glisse Move dma data to a superset ttm_dma_tt structure which herit 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 no memory account changes (where/when is my delorean when i need it ?) V3 Make sure page l

[PATCH 14/14] drm/ttm: simplify memory accounting for ttm user

2011-11-16 Thread j . glisse
From: Jerome Glisse Provide helper function to compute the kernel memory size needed for each buffer object. Move all the accounting inside ttm, simplifying driver and avoiding code duplication accross them. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_bo.c |6 +++-

[PATCH] drm/radeon: introduce a sub allocator and convert ib pool to it

2011-11-16 Thread j . glisse
From: Jerome Glisse Somewhat specializaed sub-allocator designed to perform sub-allocation for command buffer not only for current cs ioctl but for future command submission ioctl as well. Patch also convert current ib pool to use the sub allocator. Idea is that ib poll buffer can be share with o

[PATCH] drm/radeon: introduce a sub allocator and convert ib pool to it

2011-11-16 Thread j . glisse
From: Jerome Glisse Somewhat specializaed sub-allocator designed to perform sub-allocation for command buffer not only for current cs ioctl but for future command submission ioctl as well. Patch also convert current ib pool to use the sub allocator. Idea is that ib poll buffer can be share with o

[PATCH] drm/ttm: pass buffer object for bind/unbind callback

2011-11-17 Thread j . glisse
From: Jerome Glisse ttm_tt is always associated with a buffer object, pass it in bind/unbind callback to make life easier for driver. Main objective is for driver supporting virtual address space. For such driver each buffer object can be several virtual address space but ttm is unaware of this.

[PATCH] drm/ttm: callback move_notify any time bo placement change

2011-11-18 Thread j . glisse
From: Jerome Glisse Previously we were calling back move_notify in error path when the bo is returned to it's original position or when destroy the bo. When destroying the bo set the new mem placement as NULL when calling back in the driver. Updating nouveau to deal with NULL placement properly.

[PATCH] drm/ttm: callback move_notify any time bo placement change v2

2011-11-18 Thread j . glisse
From: Jerome Glisse Previously we were calling back move_notify in error path when the bo is returned to it's original position or when destroy the bo. When destroying the bo set the new mem placement as NULL when calling back in the driver. Updating nouveau to deal with NULL placement properly.

[PATCH] drm/ttm: callback move_notify any time bo placement change v3

2011-11-18 Thread j . glisse
From: Jerome Glisse Previously we were calling back move_notify in error path when the bo is returned to it's original position or when destroy the bo. When destroying the bo set the new mem placement as NULL when calling back in the driver. Updating nouveau to deal with NULL placement properly.

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

2011-11-18 Thread j . glisse
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 release we don't overfree. I wonder how i didn't run into this before. Patch are also at http://people.freedesktop.org/~glisse/ttmdma/ Cheers, Jero

[PATCH 01/14] swiotlb: Expose swiotlb_nr_tlb function to modules

2011-11-18 Thread j . glisse
From: Konrad Rzeszutek Wilk As a mechanism to detect whether SWIOTLB is enabled or not. We also fix the spelling - it was swioltb instead of swiotlb. CC: FUJITA Tomonori [v1: Ripped out swiotlb_enabled] Signed-off-by: Konrad Rzeszutek Wilk --- drivers/xen/swiotlb-xen.c |2 +- include/linu

[PATCH 02/14] drm/ttm: remove userspace backed ttm object support

2011-11-18 Thread j . glisse
From: Jerome Glisse This was never use in none of the driver, properly using userspace page for bo would need more code (vma interaction mostly). Removing this dead code in preparation of ttm_tt & backend merge. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thoma

[PATCH 03/14] drm/ttm: remove split btw highmen and lowmem page

2011-11-18 Thread j . glisse
From: Jerome Glisse Split btw highmem and lowmem page was rendered useless by the pool code. Remove it. Note further cleanup would change the 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 o

[PATCH 04/14] drm/ttm: remove unused backend flags field

2011-11-18 Thread j . glisse
From: Jerome Glisse This field is not use by any of the driver just drop it. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/radeon/radeon_ttm.c |1 - include/drm/ttm/ttm_bo_driver.h |2 -- 2 files changed, 0 inser

[PATCH 05/14] drm/ttm: use ttm put pages function to properly restore cache attribute

2011-11-18 Thread j . glisse
From: Jerome Glisse On failure we need to make sure the page we free has wb cache attribute. Do this pas call the proper ttm page helper function. Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- drivers/gpu/drm/ttm/ttm_tt.c |5 - 1 fi

[PATCH 06/14] drm/ttm: test for dma_address array allocation failure

2011-11-18 Thread j . glisse
From: Jerome Glisse Signed-off-by: Jerome Glisse Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Thomas Hellstrom --- 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/gpu/drm/ttm/ttm_tt.c index 90527a

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

2011-11-18 Thread j . glisse
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 --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 85 +- drivers/gpu/drm/ttm/ttm_tt.c | 36 +++

[PATCH 08/14] drm/ttm: merge ttm_backend and ttm_tt V5

2011-11-18 Thread j . glisse
From: Jerome Glisse ttm_backend will only exist with a ttm_tt, and ttm_tt will only be of interest when bound to a backend. Merge them to avoid code and data duplication. V2 Rebase on top of memory accounting overhaul V3 Rebase on top of more memory accounting changes V4 Rebase on top of no memo

[PATCH 09/14] drm/ttm: introduce callback for ttm_tt populate & unpopulate V4

2011-11-18 Thread j . glisse
From: Jerome Glisse Move the page allocation and freeing to driver callback and provide ttm code helper function for those. Most intrusive change, is the fact that we now only fully populate an object this simplify some of code designed around the page fault design. V2 Rebase on top of memory a

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

2011-11-18 Thread j . glisse
From: Konrad Rzeszutek Wilk In TTM world the pages for the graphic drivers are kept in three different pools: write combined, uncached, and cached (write-back). When the pages are used by the graphic driver the graphic adapter via its built in MMU (or AGP) programs these pages in. The programming

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

2011-11-18 Thread j . glisse
From: Konrad Rzeszutek Wilk With the exception that we do not handle the AGP case. We only deal with PCIe cards such as ATI ES1000 or HD3200 that have been detected to only do DMA up to 32-bits. V2 force dma32 if we fail to set bigger dma mask V3 Rebase on top of no memory account changes (where

[PATCH 12/14] drm/nouveau: enable the ttm dma pool when swiotlb is active V3

2011-11-18 Thread j . glisse
From: Konrad Rzeszutek Wilk If the card is capable of more than 32-bit, then use the default TTM page pool code which allocates from anywhere in the memory. Note: If the 'ttm.no_dma' parameter is set, the override is ignored and the default TTM pool is used. V2 use pci_set_consistent_dma_mask V

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

2011-11-18 Thread j . glisse
From: Jerome Glisse Move dma data to a superset ttm_dma_tt structure which herit 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 no memory account changes (where/when is my delorean when i need it ?) V3 Make sure page l

[PATCH 14/14] drm/ttm: simplify memory accounting for ttm user v2

2011-11-18 Thread j . glisse
From: Jerome Glisse Provide helper function to compute the kernel memory size needed for each buffer object. Move all the accounting inside ttm, simplifying driver and avoiding code duplication accross them. v2 fix accounting of ghost object, one would have thought that i would have run into

Make ib allocation size function of cs size

2011-12-05 Thread j . glisse
Two following patch are on top of http://cgit.freedesktop.org/~glisse/linux They make the ib allocation size a function of the cs size, this allow to avoid wasting pool space and avoid to trigger fence_wait in ib_get. I am still evaluating how much fence_wait we avoid with this. Cheers, Jerome _

[PATCH 1/2] drm/radeon: make ib size variable

2011-12-05 Thread j . glisse
From: Jerome Glisse This avoid to waste ib pool size and avoid a bunch of wait for previous ib to finish. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/r100.c |2 +- drivers/gpu/drm/radeon/r600.c |2 +- drivers/gpu/drm/radeon/r600_blit_kms.c | 16 +

[PATCH 2/2] drm/radeon: allocate semaphore from the ib pool

2011-12-05 Thread j . glisse
From: Jerome Glisse This allow to share the ib pool with semaphore and avoid having more bo around. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h | 67 - drivers/gpu/drm/radeon/radeon_device.c|2 +- drivers/gpu/drm/radeon/radeon_ring.c |

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

2012-01-05 Thread j . glisse
From: Jerome Glisse ttm might call the move notify with null new mem placement, properly handle this case inside nouveau move notify callback. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_bo.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dri

[PATCH] drm/radeon: silence out possible lock dependency warning

2012-01-24 Thread j . glisse
From: Jerome Glisse Silence out the lock dependency warning by moving bo allocation out of ib mutex protected section. Might lead to useless temporary allocation but it's not harmful as such things only happen at initialization. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_ri

[PATCH] drm/radeon/kms: add htile support to the cs checker

2012-02-10 Thread j . glisse
From: Jerome Glisse For 6xx+. Required for mesa to use htile support for HiZ/HiS. Userspace will check radeon version 2.14 with is bumped either by tiling patch or stream out patch. Signed-off-by: Pierre-Eric Pelloux-Prayer Signed-off-by: Alex Deucher Signed-off-by: Jerome Glisse --- driver

[PATCH] drm/radeon/kms: properly set accel working flag and bailout when false

2012-02-20 Thread j . glisse
From: Jerome Glisse If accel is not working many subsystem such as the ib pool might not be initialized properly that can lead to segfault inside kernel when cs ioctl is call with non working acceleration. To avoid this make sure the accel working flag is false when an error in GPU startup happen

[PATCH] drm/radeon/kms: add htile support to the cs checker v2

2012-02-22 Thread j . glisse
From: Jerome Glisse For 6xx+. Required for mesa to use htile support for HiZ/HiS. Userspace will check radeon version 2.14 with is bumped either by tiling patch or stream out patch. This patch only add support for htile relocation which should be enough for any userspace to implement the hyperz

[PATCH] drm/radeon/kms: add htile support to the cs checker v3

2012-03-21 Thread j . glisse
From: Jerome Glisse For 6xx+. Required for mesa to use htile support for HiZ/HiS. Userspace will check radeon version 2.14 with is bumped either by tiling patch or stream out patch. This patch only add support for htile relocation which should be enough for any userspace to implement the hyperz

[RFC] ttm merge move/move_notify/invalidate_caches callback

2012-04-05 Thread j . glisse
This was discussed previously : http://lists.freedesktop.org/archives/dri-devel/2012-January/018463.html The plat de resistance is in patch4, the first 3 are simplification that i believe can go as is. Idea is that driver needs to know when ever a bo move happen and instead of having 3 set of cal

[PATCH 1/4] drm/ttm: simplify ttm_bo_move_ttm

2012-04-05 Thread j . glisse
From: Jerome Glisse ttm_bo_move_ttm have no use to know if bo is evicted or to know if it shouldn't wait (as the function never wait anyway) Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_bo.c |4 ++-- drivers/gpu/drm/radeon/radeon_ttm.c |4 ++-- drivers/gpu/drm/ttm/

[PATCH 2/4] drm/ttm: simplify ttm_bo_move_accel_cleanup remove useless arg

2012-04-05 Thread j . glisse
From: Jerome Glisse ttm_bo_move_accel_cleanup have no use to know if it can wait on reserve or wait on gpu as there is no such wait in this helper. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_bo.c |3 +-- drivers/gpu/drm/radeon/radeon_ttm.c |3 +-- drivers/gpu/drm

[PATCH 3/4] drm/ttm: simplify ttm_bo_move_memcpy remove useless arg

2012-04-05 Thread j . glisse
From: Jerome Glisse ttm_bo_move_memcpy have no use to know if it can wait on reserve or wait on gpu as there is no such wait in this helper. Doesn't care either to know if it's an eviction, memcpy is not a GPU pipelineable case. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouveau_

[PATCH 4/4] drm/ttm: move bo move logic inside driver to avoid callback

2012-04-05 Thread j . glisse
From: Jerome Glisse Move buffer object move logic inside driver callback so we don't have complex move_notify and cache_invalidate callback in error path. This simplify driver at the expense of some code duplication among drivers. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/nouveau/nouvea

[PATCH] radeon: fix r600/agp when vram is after AGP (v3)

2012-04-17 Thread j . glisse
From: Jerome Glisse If AGP is placed in the middle, the size_af is off-by-one, it results in VRAM being placed at 0x7fff instead of 0x800. v2: fix the vram_start setup. v3: also fix r7xx & newer ASIC Reported-by: russiane39 on #radeon Signed-off-by: Dave Airlie Signed-off-by: Jerome G

Reworking of GPU reset logic + dumping

2012-04-25 Thread j . glisse
Patches also available at: http://people.freedesktop.org/~glisse/debug/ So it's the Christian series minus all the debugfs related to ring/ib/mc. The last patch add a new blob dumping facilities that dump everythings (pm4, relocs table, bo content). It's just a proof of concept to show what i mean

[PATCH 01/24] drm/radeon: remove fence/ring/ib debugfs files

2012-04-25 Thread j . glisse
From: Jerome Glisse Those file never were really helpfull in debuging. Signed-off-by: Jerome Glisse --- drivers/gpu/drm/radeon/r100.c | 186 - drivers/gpu/drm/radeon/r300.c | 50 - drivers/gpu/drm/radeon/r420.c | 45

[PATCH 02/24] drm/radeon: make radeon_gpu_is_lockup a per ring function

2012-04-25 Thread j . glisse
From: Christian König Different rings have different criteria to test if they are stuck. v2: rebased on current drm-next Signed-off-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon.h |4 +- drivers/gpu/drm/radeon/radeon_asic.c | 44

[PATCH 03/24] drm/radeon: replace gpu_lockup with ring->ready flag

2012-04-25 Thread j . glisse
From: Christian König It makes no sense at all to have more than one flag. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/r100.c |1 - drivers/gpu/drm/radeon/r300.c |1 - drivers/gpu/drm/radeon/radeon.h|1 - drivers/gp

[PATCH 04/24] drm/radeon: use central function for IB testing

2012-04-25 Thread j . glisse
From: Christian König Removing all the different error messages and having just one standard behaviour over all chipset generations. Signed-off-by: Christian König Reviewed-by: Alex Deucher --- drivers/gpu/drm/radeon/evergreen.c |7 ++- drivers/gpu/drm/radeon/ni.c |7 ++

[PATCH 05/24] drm/radeon: rework gpu lockup detection and processing

2012-04-25 Thread j . glisse
From: Christian König Previusly multiple rings could trigger multiple GPU resets at the same time. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h |3 +- drivers/gpu/drm/radeon/radeon_fence.c | 150 + 2 files changed, 77 insertions(

[PATCH 06/24] drm/radeon: fix a critical bug in the SA code

2012-04-25 Thread j . glisse
From: Christian König Aligning offset can make it bigger than tmp->offset leading to an overrun bug in the following subtraction. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_sa.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/rade

[PATCH 07/24] drm/radeon: add proper locking to the SA v2

2012-04-25 Thread j . glisse
From: Christian König Make the suballocator self containing to locking. v2: split the bugfix into a seperate patch. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h|1 + drivers/gpu/drm/radeon/radeon_sa.c | 17 +++-- 2 files changed, 12 insertions(+), 6

[PATCH 08/24] drm/radeon: add biggest hole tracking and wakequeue to the sa v4

2012-04-25 Thread j . glisse
From: Christian König With that in place clients are automatically blocking until their memory request can be handled. v2: block only if the memory request can't be satisfied in the first try, the first version actually lacked a night of sleep. v3: make blocking optional, update comment

[PATCH 09/24] drm/radeon: simplify semaphore handling

2012-04-25 Thread j . glisse
From: Christian König Directly use the suballocator to get small chunks of memory. It's equally fast and doesn't crash when we encounter a GPU reset. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/evergreen.c|1 - drivers/gpu/drm/radeon/ni.c |1 - drive

[PATCH 10/24] drm/radeon: return -ENOENT in fence_wait_next v2

2012-04-25 Thread j . glisse
From: Christian König We should signal the caller that we haven't waited at all. v2: only change fence_wait_next not fence_wait_last. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_fence.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/

[PATCH 11/24] drm/radeon: rename fence_wait_last to fence_wait_empty

2012-04-25 Thread j . glisse
From: Christian König As discussed with Michel that name better describes the behavior of this function. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h|2 +- drivers/gpu/drm/radeon/radeon_device.c |2 +- drivers/gpu/drm/radeon/radeon_fence.c |4 ++-- 3

[PATCH 12/24] drm/radeon: rip out the ib pool v2

2012-04-25 Thread j . glisse
From: Christian König It isn't necessary any more and the suballocator seems to perform even better. v2: drop debugfs Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h | 22 +--- drivers/gpu/drm/radeon/radeon_device.c|1 - drivers/gpu/drm/radeon/radeon_fen

[PATCH 13/24] drm/radeon: fix a bug with the ring syncing code

2012-04-25 Thread j . glisse
From: Christian König Rings need to lock in order, otherwise the ring subsystem can deadlock. v2: fix error handling and number of locked doublewords. v3: stop creating unneeded semaphores. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h |4 ++ drivers/gpu/drm

[PATCH 14/24] drm/radeon: rework recursive gpu reset handling

2012-04-25 Thread j . glisse
From: Christian König Instead of all this humpy pumpy with recursive mutex (which also fixes only halve of the problem) move the actual gpu reset out of the fence code, return -EDEADLK and then reset the gpu in the calling ioctl function. v2: Split removal of radeon_mutex into separate patch.

[PATCH 15/24] drm/radeon: remove recursive mutex implementation

2012-04-25 Thread j . glisse
From: Christian König Not needed anymore. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h| 44 +--- drivers/gpu/drm/radeon/radeon_cs.c | 10 +++--- drivers/gpu/drm/radeon/radeon_device.c |2 +- drivers/gpu/drm/radeon/radeon_gar

[PATCH 16/24] drm/radeon: move lockup detection code into radeon_ring.c v2

2012-04-25 Thread j . glisse
From: Jerome Glisse It isn't chipset specific, so it makes no sense to have that inside r100.c. v2: rebase on debugfs removal Signed-off-by: Christian König --- drivers/gpu/drm/radeon/evergreen.c |5 +-- drivers/gpu/drm/radeon/ni.c |5 +-- drivers/gpu/drm/radeon/r100.c

[PATCH 17/24] drm/radeon: make lockup timeout a module param

2012-04-25 Thread j . glisse
From: Christian König Don't hard code the 10 seconds timeout. Compute jobs can run much longer. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h |1 + drivers/gpu/drm/radeon/radeon_drv.c |4 drivers/gpu/drm/radeon/radeon_ring.c |2 +- 3 files changed, 6

[PATCH 18/24] drm/radeon: unlock the ring mutex while waiting for the next fence

2012-04-25 Thread j . glisse
From: Christian König Fixing just another deadlock problem with gpu reset tests. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_ring.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/rade

[PATCH 19/24] drm/radeon: make forcing ring activity a common function

2012-04-25 Thread j . glisse
From: Christian König Nothing chipset or ring specific with it, so also move it to radon_ring. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/evergreen.c | 10 +- drivers/gpu/drm/radeon/ni.c | 11 +-- drivers/gpu/drm/radeon/r100.c| 10 +--

[PATCH 20/24] drm/radeon: remove r300_gpu_is_lockup

2012-04-25 Thread j . glisse
From: Christian König Since it is now identical to r100_gpu_is_lockup. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/r300.c| 14 -- drivers/gpu/drm/radeon/radeon_asic.c | 16 drivers/gpu/drm/radeon/radeon_asic.h |1 - 3 files changed, 8

[PATCH 21/24] drm/radeon: remove cayman_gpu_is_lockup

2012-04-25 Thread j . glisse
From: Christian König Since it is now identical to evergreen_gpu_is_lockup. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/ni.c | 19 --- drivers/gpu/drm/radeon/radeon_asic.c | 12 ++-- drivers/gpu/drm/radeon/radeon_asic.h |1 - 3 files chang

[PATCH 22/24] drm/radeon: extend ring debugfs files with fence info c2

2012-04-25 Thread j . glisse
From: Christian König That should aid in debugging multi ring lockups. v2 rebase on top of debugfs removal Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h |1 + drivers/gpu/drm/radeon/radeon_fence.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff

[PATCH 23/24] drm/radeon: keep the cs relocs inside the ib

2012-04-25 Thread j . glisse
From: Christian König Free them wenn the ib is freed, another step to better debugging. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon.h |3 +++ drivers/gpu/drm/radeon/radeon_cs.c | 14 -- drivers/gpu/drm/radeon/radeon_ring.c |3 +++ 3 files chang

[PATCH 24/24] drm/radeon: add faulty command buffer dump facilities

2012-04-25 Thread j . glisse
From: Jerome Glisse This add a command buffer dumping facilities, that will dump command buffer and all associated bo that most likely triggered a lockup. Idea is that we go through unsignaled fence and we dump the ib of the oldest unsignaled fence. Dumping is a 2 step process on lockup detectio

Include request for reset-rework branch v2

2012-05-01 Thread j . glisse
So it's pretty much the same patchset except for patch 7 (use mutex instead of spinlock) and 9 & 10 which correspond to previous patch 9 split in two and the sa allocation being simplified. The patchset can be found at : http://people.freedesktop.org/~glisse/reset/ Cheers, Jerome Glisse ___

[PATCH 01/27] drm/radeon: make radeon_gpu_is_lockup a per ring function

2012-05-01 Thread j . glisse
From: Christian König Different rings have different criteria to test if they are stuck. v2: rebased on current drm-next Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h |4 +- drivers/gpu/drm/radeon/radeon_asi

[PATCH 02/27] drm/radeon: replace gpu_lockup with ring->ready flag

2012-05-01 Thread j . glisse
From: Christian König It makes no sense at all to have more than one flag. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Jerome Glisse --- drivers/gpu/drm/radeon/r100.c |1 - drivers/gpu/drm/radeon/r300.c |1 - drivers/gpu/drm/radeon/radeon.h

[PATCH 03/27] drm/radeon: register ring debugfs handlers on init

2012-05-01 Thread j . glisse
From: Christian König Just register the debugfs files on init instead of checking the chipset type multiple times. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon_ring.c | 31 +++ 1 files chan

[PATCH 04/27] drm/radeon: use central function for IB testing

2012-05-01 Thread j . glisse
From: Christian König Removing all the different error messages and having just one standard behaviour over all chipset generations. Signed-off-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Jerome Glisse --- drivers/gpu/drm/radeon/evergreen.c |7 ++- drivers/gpu/drm/ra

[PATCH 05/27] drm/radeon: rework gpu lockup detection and processing

2012-05-01 Thread j . glisse
From: Christian König Previusly multiple rings could trigger multiple GPU resets at the same time. Signed-off-by: Christian König Reviewed-by: Jerome Glisse --- drivers/gpu/drm/radeon/radeon.h |3 +- drivers/gpu/drm/radeon/radeon_fence.c | 150 + 2 f

<    1   2   3   4   >