linux/drivers/gpu/drm/amd
Tom St Denis 61cb8cef52 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>
2016-08-10 14:05:08 -04:00
..
acp drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU 2016-05-25 09:44:15 -04:00
amdgpu drm/amd/amdgpu: Simplify bitfield operations in gfx v8 2016-08-10 14:05:08 -04:00
amdkfd drm/amdkfd: destroy mutex if process creation fails 2016-07-03 08:05:45 +03:00
include drm/amdgpu: add amdgpu soft reset 2016-08-08 11:32:05 -04:00
powerplay drm/amd/powerplay: change structure variable name. 2016-08-08 11:33:27 -04:00
scheduler drm/amd: fix deadlock of job_list_lock V2 2016-07-29 14:37:06 -04:00