Re: [Mesa-dev] [PATCH 3/3] winsys/radeon: disable virtual address space by default

2012-09-06 Thread Marek Olšák
On Fri, Aug 31, 2012 at 7:08 AM, Michel Dänzer mic...@daenzer.net wrote:
 On Don, 2012-08-30 at 17:35 +0200, Marek Olšák wrote:
 This fixes hangs on Cayman.

 Note that at least some of those hangs are due to pre-existing
 out-of-bounds memory access bugs which happen not to cause any serious
 problems without virtual address space. Enabling it can help pinpoint
 those bugs using the virtual memory protection fault address.

I tried to allocate twice as much memory for every r600g resource and
it still hung. I am out of ideas and I see no easy way to debug that,
because the soft reset just doesn't work. I don't even remember when
the soft reset worked last time. It's been so long.

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] winsys/radeon: disable virtual address space by default

2012-09-06 Thread Christian König

On 06.09.2012 17:42, Marek Olšák wrote:

On Fri, Aug 31, 2012 at 7:08 AM, Michel Dänzer mic...@daenzer.net wrote:

On Don, 2012-08-30 at 17:35 +0200, Marek Olšák wrote:

This fixes hangs on Cayman.

Note that at least some of those hangs are due to pre-existing
out-of-bounds memory access bugs which happen not to cause any serious
problems without virtual address space. Enabling it can help pinpoint
those bugs using the virtual memory protection fault address.

I tried to allocate twice as much memory for every r600g resource and
it still hung. I am out of ideas and I see no easy way to debug that,
because the soft reset just doesn't work. I don't even remember when
the soft reset worked last time. It's been so long.
Currently working on that and already have a patch that instead of 
locking the GPU hard just redirects every invalid memory access to the 
dummy page and prints a nice warning into the syslog that userspace is 
doing something nasty.


Seems to work allot better than just hanging everything on the first 
sign of problems.


Give me a day or two to sort that out,
Christian.




Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 3/3] winsys/radeon: disable virtual address space by default

2012-08-30 Thread Marek Olšák
This fixes hangs on Cayman. We should have this patch in stable branches,
but it would be better to have it in master as well for Cayman to be usable.
---
 src/gallium/winsys/radeon/drm/radeon_drm_winsys.c |3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c 
b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index c03dd04..f4999ed 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -303,6 +303,9 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
   ws-info.r600_ib_vm_max_size))
 ws-info.r600_virtual_address = FALSE;
 }
+/* Remove this line once the virtual address space feature is fixed. */
+if (!debug_get_bool_option(RADEON_VA, FALSE))
+ws-info.r600_virtual_address = FALSE;
 }
 
 /* Get max pipes, this is only needed for compute shaders.  All evergreen+
-- 
1.7.9.5

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] winsys/radeon: disable virtual address space by default

2012-08-30 Thread Alex Deucher
On Thu, Aug 30, 2012 at 11:35 AM, Marek Olšák mar...@gmail.com wrote:
 This fixes hangs on Cayman. We should have this patch in stable branches,
 but it would be better to have it in master as well for Cayman to be usable.

There is no VM support in the stable branches, only master so no need
to backport this.  This needs to be on by default for SI chips as they
are VM only.  With those changes, I'm fine with turning it off by
default on cayman for mesa 9.0.

Alex

 ---
  src/gallium/winsys/radeon/drm/radeon_drm_winsys.c |3 +++
  1 file changed, 3 insertions(+)

 diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c 
 b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
 index c03dd04..f4999ed 100644
 --- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
 +++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
 @@ -303,6 +303,9 @@ static boolean do_winsys_init(struct radeon_drm_winsys 
 *ws)
ws-info.r600_ib_vm_max_size))
  ws-info.r600_virtual_address = FALSE;
  }
 +/* Remove this line once the virtual address space feature is fixed. 
 */
 +if (!debug_get_bool_option(RADEON_VA, FALSE))
 +ws-info.r600_virtual_address = FALSE;
  }

  /* Get max pipes, this is only needed for compute shaders.  All 
 evergreen+
 --
 1.7.9.5

 ___
 mesa-dev mailing list
 mesa-dev@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 3/3] winsys/radeon: disable virtual address space by default

2012-08-30 Thread Michel Dänzer
On Don, 2012-08-30 at 17:35 +0200, Marek Olšák wrote: 
 This fixes hangs on Cayman.

Note that at least some of those hangs are due to pre-existing
out-of-bounds memory access bugs which happen not to cause any serious
problems without virtual address space. Enabling it can help pinpoint
those bugs using the virtual memory protection fault address.

I agree it's probably still better to disable it by default at this
point though.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev