drm/amdgpu/sriov refine vcn_v2_5_early_init func
refine the assignment for vcn.num_vcn_inst, vcn.harvest_config, vcn.num_enc_rings in VF Signed-off-by: Jack Zhang <Jack.Zhang1@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -74,6 +74,12 @@ static int amdgpu_ih_clientid_vcns[] = {
|
|||||||
static int vcn_v2_5_early_init(void *handle)
|
static int vcn_v2_5_early_init(void *handle)
|
||||||
{
|
{
|
||||||
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
|
||||||
|
|
||||||
|
if (amdgpu_sriov_vf(adev)) {
|
||||||
|
adev->vcn.num_vcn_inst = 2;
|
||||||
|
adev->vcn.harvest_config = 0;
|
||||||
|
adev->vcn.num_enc_rings = 1;
|
||||||
|
} else {
|
||||||
if (adev->asic_type == CHIP_ARCTURUS) {
|
if (adev->asic_type == CHIP_ARCTURUS) {
|
||||||
u32 harvest;
|
u32 harvest;
|
||||||
int i;
|
int i;
|
||||||
@@ -92,11 +98,6 @@ static int vcn_v2_5_early_init(void *handle)
|
|||||||
} else
|
} else
|
||||||
adev->vcn.num_vcn_inst = 1;
|
adev->vcn.num_vcn_inst = 1;
|
||||||
|
|
||||||
if (amdgpu_sriov_vf(adev)) {
|
|
||||||
adev->vcn.num_vcn_inst = 2;
|
|
||||||
adev->vcn.harvest_config = 0;
|
|
||||||
adev->vcn.num_enc_rings = 1;
|
|
||||||
} else {
|
|
||||||
adev->vcn.num_enc_rings = 2;
|
adev->vcn.num_enc_rings = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user