diff options
| author | Tom St Denis <tom.stdenis@amd.com> | 2016-08-09 17:13:21 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2016-08-10 21:05:08 +0300 |
| commit | 61cb8cef526d238de2ff278d9e562a6239d8f98a (patch) | |
| tree | be9f2be7b713ac186dbda7a84b60b0250079ab2b /include/uapi/linux | |
| parent | 5003f2785a20d9caf4040d9d9039644f6ee41892 (diff) | |
| download | linux-61cb8cef526d238de2ff278d9e562a6239d8f98a.tar.xz | |
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 <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 'include/uapi/linux')
0 files changed, 0 insertions, 0 deletions
