diff options
| author | Tom St Denis <[email protected]> | 2016-08-09 14:13:21 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2016-08-10 18:05:08 +0000 |
| commit | 61cb8cef526d238de2ff278d9e562a6239d8f98a (patch) | |
| tree | be9f2be7b713ac186dbda7a84b60b0250079ab2b /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | |
| parent | drm/amd/amdgpu: Simplify various gfx v8 functions (diff) | |
| download | kernel-61cb8cef526d238de2ff278d9e562a6239d8f98a.tar.gz kernel-61cb8cef526d238de2ff278d9e562a6239d8f98a.zip | |
drm/amd/amdgpu: Simplify bitfield operations in gfx v8
This patch introduces a new macro WREG32_FIELD which is used
to write to a register with a new value in a field. It's designed
to replace the pattern:
tmp = RREG32(mmFoo);
tmp &= ~REG__FIELD_MASK;
tmp |= new_value << REG__FIELD__SHIFT;
WREG32(mmFoo, tmp)
with:
WREG32_FIELD(Foo, FIELD, new_value);
Unlike WREG32_P() it understands offsets/masks and doesn't
require the caller to shift the value (or mask properly).
It's applied where suitable in the gfx_v8_0.c driver to start
with.
Signed-off-by: Tom St Denis <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
0 files changed, 0 insertions, 0 deletions
