summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2016-09-01 13:31:35 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-09-02 11:32:35 -0400
commit142333dbb9fbecf0e6693ac4545676f36225ee89 (patch)
tree7b95d63ff1c1ea5533ae4cc75cd92d6f918abff0 /drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
parentdeca1d1f16eebfa0d070eed50a221e01cf716ee0 (diff)
downloadlinux-142333dbb9fbecf0e6693ac4545676f36225ee89.tar.bz2
drm/amd/amdgpu: Simplify mask creation in gfx6
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
index 1f1b6190e641..65695544435b 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
@@ -911,13 +911,7 @@ static void gfx_v6_0_select_se_sh(struct amdgpu_device *adev, u32 se_num,
static u32 gfx_v6_0_create_bitmask(u32 bit_width)
{
- u32 i, mask = 0;
-
- for (i = 0; i < bit_width; i++) {
- mask <<= 1;
- mask |= 1;
- }
- return mask;
+ return (u32)(((u64)1 << bit_width) - 1);
}
static u32 gfx_v6_0_get_rb_disabled(struct amdgpu_device *adev,