amdgpu/vce3: Cleanup harvest config function.
Basic LOC reduction. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
e1de741529
commit
1dab5f067e
|
@ -314,14 +314,11 @@ static int vce_v3_0_start(struct amdgpu_device *adev)
|
||||||
static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
|
static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
|
||||||
{
|
{
|
||||||
u32 tmp;
|
u32 tmp;
|
||||||
unsigned ret;
|
|
||||||
|
|
||||||
/* Fiji, Stoney are single pipe */
|
/* Fiji, Stoney are single pipe */
|
||||||
if ((adev->asic_type == CHIP_FIJI) ||
|
if ((adev->asic_type == CHIP_FIJI) ||
|
||||||
(adev->asic_type == CHIP_STONEY)){
|
(adev->asic_type == CHIP_STONEY))
|
||||||
ret = AMDGPU_VCE_HARVEST_VCE1;
|
return AMDGPU_VCE_HARVEST_VCE1;
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Tonga and CZ are dual or single pipe */
|
/* Tonga and CZ are dual or single pipe */
|
||||||
if (adev->flags & AMD_IS_APU)
|
if (adev->flags & AMD_IS_APU)
|
||||||
|
@ -335,19 +332,14 @@ static unsigned vce_v3_0_get_harvest_config(struct amdgpu_device *adev)
|
||||||
|
|
||||||
switch (tmp) {
|
switch (tmp) {
|
||||||
case 1:
|
case 1:
|
||||||
ret = AMDGPU_VCE_HARVEST_VCE0;
|
return AMDGPU_VCE_HARVEST_VCE0;
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
ret = AMDGPU_VCE_HARVEST_VCE1;
|
return AMDGPU_VCE_HARVEST_VCE1;
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
ret = AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
|
return AMDGPU_VCE_HARVEST_VCE0 | AMDGPU_VCE_HARVEST_VCE1;
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
ret = 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int vce_v3_0_early_init(void *handle)
|
static int vce_v3_0_early_init(void *handle)
|
||||||
|
|
Loading…
Reference in New Issue