aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
index e02044086445..2d846ef1c033 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h
@@ -30,4 +30,17 @@ void amdgpu_gfx_scratch_free(struct amdgpu_device *adev, uint32_t reg);
30void amdgpu_gfx_parse_disable_cu(unsigned *mask, unsigned max_se, 30void amdgpu_gfx_parse_disable_cu(unsigned *mask, unsigned max_se,
31 unsigned max_sh); 31 unsigned max_sh);
32 32
33/**
34 * amdgpu_gfx_create_bitmask - create a bitmask
35 *
36 * @bit_width: length of the mask
37 *
38 * create a variable length bit mask.
39 * Returns the bitmask.
40 */
41static inline u32 amdgpu_gfx_create_bitmask(u32 bit_width)
42{
43 return (u32)((1ULL << bit_width) - 1);
44}
45
33#endif 46#endif