amdgpu/vce3: Simplify vce_v3_0_soft_reset()
LOC reduction and simplification. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
Родитель
92988e604b
Коммит
af18b0f7fb
|
@ -558,17 +558,10 @@ static int vce_v3_0_soft_reset(void *handle)
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||||
u32 mask = 0;
|
u32 mask = 0;
|
||||||
int idx;
|
|
||||||
|
|
||||||
for (idx = 0; idx < 2; ++idx) {
|
mask |= (adev->vce.harvest_config & (1<<0)) ? 0 : SRBM_SOFT_RESET__SOFT_RESET_VCE0_MASK;
|
||||||
if (adev->vce.harvest_config & (1 << idx))
|
mask |= (adev->vce.harvest_config & (1<<1)) ? 0 : SRBM_SOFT_RESET__SOFT_RESET_VCE1_MASK;
|
||||||
continue;
|
|
||||||
|
|
||||||
if (idx == 0)
|
|
||||||
mask |= SRBM_SOFT_RESET__SOFT_RESET_VCE0_MASK;
|
|
||||||
else
|
|
||||||
mask |= SRBM_SOFT_RESET__SOFT_RESET_VCE1_MASK;
|
|
||||||
}
|
|
||||||
WREG32_P(mmSRBM_SOFT_RESET, mask,
|
WREG32_P(mmSRBM_SOFT_RESET, mask,
|
||||||
~(SRBM_SOFT_RESET__SOFT_RESET_VCE0_MASK |
|
~(SRBM_SOFT_RESET__SOFT_RESET_VCE0_MASK |
|
||||||
SRBM_SOFT_RESET__SOFT_RESET_VCE1_MASK));
|
SRBM_SOFT_RESET__SOFT_RESET_VCE1_MASK));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче