mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 21:44:23 -04:00
drm/amdgpu: Add VCN logical to physical id mapping
Add mappings for logical to physical id for VCN/JPEG 4.0.3 v2: make local function static (Alex) Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Acked-by: Leo Liu <leo.liu@amd.com> Tested-by: James Zhu <James.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -82,6 +82,21 @@ static int8_t aqua_vanjaram_logical_to_dev_inst(struct amdgpu_device *adev,
|
||||
return dev_inst;
|
||||
}
|
||||
|
||||
static void aqua_vanjaram_populate_ip_map(struct amdgpu_device *adev,
|
||||
enum amd_hw_ip_block_type ip_block,
|
||||
uint32_t inst_mask)
|
||||
{
|
||||
int l = 0, i;
|
||||
|
||||
while (inst_mask) {
|
||||
i = ffs(inst_mask) - 1;
|
||||
adev->ip_map.dev_inst[ip_block][l++] = i;
|
||||
inst_mask &= ~(1 << i);
|
||||
}
|
||||
for (; l < HWIP_MAX_INSTANCE; l++)
|
||||
adev->ip_map.dev_inst[ip_block][l] = -1;
|
||||
}
|
||||
|
||||
void aqua_vanjaram_ip_map_init(struct amdgpu_device *adev)
|
||||
{
|
||||
int xcc_mask, sdma_mask;
|
||||
@@ -108,6 +123,9 @@ void aqua_vanjaram_ip_map_init(struct amdgpu_device *adev)
|
||||
for (; l < HWIP_MAX_INSTANCE; l++)
|
||||
adev->ip_map.dev_inst[SDMA0_HWIP][l] = -1;
|
||||
|
||||
/* This covers both VCN and JPEG, JPEG is only alias of VCN */
|
||||
aqua_vanjaram_populate_ip_map(adev, VCN_HWIP, adev->vcn.inst_mask);
|
||||
|
||||
adev->ip_map.logical_to_dev_inst = aqua_vanjaram_logical_to_dev_inst;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user