Commit 1b592d00 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/vcn: remove manual instance setting

Handled by IP discovery now.
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fe323f03
...@@ -66,7 +66,6 @@ static int vcn_v1_0_early_init(void *handle) ...@@ -66,7 +66,6 @@ static int vcn_v1_0_early_init(void *handle)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
adev->vcn.num_vcn_inst = 1;
adev->vcn.num_enc_rings = 2; adev->vcn.num_enc_rings = 2;
vcn_v1_0_set_dec_ring_funcs(adev); vcn_v1_0_set_dec_ring_funcs(adev);
......
...@@ -69,7 +69,6 @@ static int vcn_v2_0_early_init(void *handle) ...@@ -69,7 +69,6 @@ static int vcn_v2_0_early_init(void *handle)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
adev->vcn.num_vcn_inst = 1;
if (amdgpu_sriov_vf(adev)) if (amdgpu_sriov_vf(adev))
adev->vcn.num_enc_rings = 1; adev->vcn.num_enc_rings = 1;
else else
......
...@@ -83,7 +83,7 @@ static int vcn_v2_5_early_init(void *handle) ...@@ -83,7 +83,7 @@ static int vcn_v2_5_early_init(void *handle)
} else { } else {
u32 harvest; u32 harvest;
int i; int i;
adev->vcn.num_vcn_inst = VCN25_MAX_HW_INSTANCES_ARCTURUS;
for (i = 0; i < adev->vcn.num_vcn_inst; i++) { for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING); harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING);
if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK) if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
......
...@@ -98,7 +98,6 @@ static int vcn_v3_0_early_init(void *handle) ...@@ -98,7 +98,6 @@ static int vcn_v3_0_early_init(void *handle)
if (adev->ip_versions[UVD_HWIP] == IP_VERSION(3, 0, 0)) { if (adev->ip_versions[UVD_HWIP] == IP_VERSION(3, 0, 0)) {
u32 harvest; u32 harvest;
adev->vcn.num_vcn_inst = VCN_INSTANCES_SIENNA_CICHLID;
for (i = 0; i < adev->vcn.num_vcn_inst; i++) { for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING); harvest = RREG32_SOC15(VCN, i, mmCC_UVD_HARVESTING);
if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK) if (harvest & CC_UVD_HARVESTING__UVD_DISABLE_MASK)
...@@ -109,8 +108,7 @@ static int vcn_v3_0_early_init(void *handle) ...@@ -109,8 +108,7 @@ static int vcn_v3_0_early_init(void *handle)
AMDGPU_VCN_HARVEST_VCN1)) AMDGPU_VCN_HARVEST_VCN1))
/* both instances are harvested, disable the block */ /* both instances are harvested, disable the block */
return -ENOENT; return -ENOENT;
} else }
adev->vcn.num_vcn_inst = 1;
if (adev->ip_versions[UVD_HWIP] == IP_VERSION(3, 0, 33)) if (adev->ip_versions[UVD_HWIP] == IP_VERSION(3, 0, 33))
adev->vcn.num_enc_rings = 0; adev->vcn.num_enc_rings = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment