drm/radeon/cik: Fix encoding of number of banks in tiling configuration info
authorMichel Dänzer <michel.daenzer@amd.com>
Wed, 18 Sep 2013 13:39:41 +0000 (15:39 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 20 Sep 2013 21:32:58 +0000 (17:32 -0400)
There are multiple valid values, not just 0 or 1.  Required
to properly support 2D tiling in the userspace drivers.

Cc: stable@vger.kernel.org
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/cik.c

index c0714d72610bf7ef5a2927569251948fe2056e53..5e6802d8a59abd73738b54073ab10f3ab1b51b67 100644 (file)
@@ -2845,10 +2845,8 @@ static void cik_gpu_init(struct radeon_device *rdev)
                rdev->config.cik.tile_config |= (3 << 0);
                break;
        }
-       if ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT)
-               rdev->config.cik.tile_config |= 1 << 4;
-       else
-               rdev->config.cik.tile_config |= 0 << 4;
+       rdev->config.cik.tile_config |=
+               ((mc_arb_ramcfg & NOOFBANK_MASK) >> NOOFBANK_SHIFT) << 4;
        rdev->config.cik.tile_config |=
                ((gb_addr_config & PIPE_INTERLEAVE_SIZE_MASK) >> PIPE_INTERLEAVE_SIZE_SHIFT) << 8;
        rdev->config.cik.tile_config |=