mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
drm/amdgpu: convert IP version array to include instances
Allow us to query instances versions more cleanly. Instancing support is not consistent unfortunately. SDMA is a good example. Sienna cichlid has 4 total SDMA instances, each enumerated separately (HWIDs 42, 43, 68, 69). Arcturus has 8 total SDMA instances, but they are enumerated as multiple instances of the same HWIDs (4x HWID 42, 4x HWID 43). UMC is another example. On most chips there are multiple instances with the same HWID. This allows us to support both forms. v2: rebase v3: clarify instancing support Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -99,7 +99,7 @@ static int vcn_v3_0_early_init(void *handle)
|
||||
/* both instances are harvested, disable the block */
|
||||
return -ENOENT;
|
||||
|
||||
if (adev->ip_versions[UVD_HWIP] == IP_VERSION(3, 0, 33))
|
||||
if (adev->ip_versions[UVD_HWIP][0] == IP_VERSION(3, 0, 33))
|
||||
adev->vcn.num_enc_rings = 0;
|
||||
else
|
||||
adev->vcn.num_enc_rings = 2;
|
||||
@@ -1259,7 +1259,7 @@ static int vcn_v3_0_start(struct amdgpu_device *adev)
|
||||
fw_shared->rb.wptr = lower_32_bits(ring->wptr);
|
||||
fw_shared->multi_queue.decode_queue_mode &= cpu_to_le32(~FW_QUEUE_RING_RESET);
|
||||
|
||||
if (adev->ip_versions[UVD_HWIP] != IP_VERSION(3, 0, 33)) {
|
||||
if (adev->ip_versions[UVD_HWIP][0] != IP_VERSION(3, 0, 33)) {
|
||||
fw_shared->multi_queue.encode_generalpurpose_queue_mode |= cpu_to_le32(FW_QUEUE_RING_RESET);
|
||||
ring = &adev->vcn.inst[i].ring_enc[0];
|
||||
WREG32_SOC15(VCN, i, mmUVD_RB_RPTR, lower_32_bits(ring->wptr));
|
||||
@@ -1631,7 +1631,7 @@ static int vcn_v3_0_pause_dpg_mode(struct amdgpu_device *adev,
|
||||
UVD_POWER_STATUS__STALL_DPG_POWER_UP_MASK,
|
||||
~UVD_POWER_STATUS__STALL_DPG_POWER_UP_MASK);
|
||||
|
||||
if (adev->ip_versions[UVD_HWIP] != IP_VERSION(3, 0, 33)) {
|
||||
if (adev->ip_versions[UVD_HWIP][0] != IP_VERSION(3, 0, 33)) {
|
||||
/* Restore */
|
||||
fw_shared = adev->vcn.inst[inst_idx].fw_shared_cpu_addr;
|
||||
fw_shared->multi_queue.encode_generalpurpose_queue_mode |= cpu_to_le32(FW_QUEUE_RING_RESET);
|
||||
|
||||
Reference in New Issue
Block a user