Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[ 18/46] drm/radeon: fix bank tiling parameters on SI

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


gregkh at linuxfoundation

Aug 19, 2012, 8:58 PM

Post #1 of 1 (54 views)
Permalink
[ 18/46] drm/radeon: fix bank tiling parameters on SI

From: Greg KH <gregkh [at] linuxfoundation>

3.5-stable review patch. If anyone has any objections, please let me know.

------------------

From: Christian König <deathsimple [at] vodafone>

commit dca571a6a4edda1f61ba7ecb47431a22245490a3 upstream.

The sixteen bank case wasn't handled here, leading to GPU
crashes because of userspace miscalculation.

Signed-off-by: Christian König <deathsimple [at] vodafone>
Signed-off-by: Alex Deucher <alexander.deucher [at] amd>
Signed-off-by: Greg Kroah-Hartman <gregkh [at] linuxfoundation>

---
drivers/gpu/drm/radeon/si.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)

--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -1639,11 +1639,19 @@ static void si_gpu_init(struct radeon_de
/* XXX what about 12? */
rdev->config.si.tile_config |= (3 << 0);
break;
- }
- if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT)
- rdev->config.si.tile_config |= 1 << 4;
- else
+ }
+ switch ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) {
+ case 0: /* four banks */
rdev->config.si.tile_config |= 0 << 4;
+ break;
+ case 1: /* eight banks */
+ rdev->config.si.tile_config |= 1 << 4;
+ break;
+ case 2: /* sixteen banks */
+ default:
+ rdev->config.si.tile_config |= 2 << 4;
+ break;
+ }
rdev->config.si.tile_config |=
((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8;
rdev->config.si.tile_config |=


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.