Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu/vpe: add multi instance VPE support

Add support for multi instance VPE processing.

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lang Yu and committed by
Alex Deucher
709ef39f 79698b14

+13
+9
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
··· 1320 1320 } 1321 1321 } 1322 1322 1323 + if (le16_to_cpu(ip->hw_id) == VPE_HWID) { 1324 + if (adev->vpe.num_instances < AMDGPU_MAX_VPE_INSTANCES) 1325 + adev->vpe.num_instances++; 1326 + else 1327 + dev_err(adev->dev, "Too many VPE instances: %d vs %d\n", 1328 + adev->vpe.num_instances + 1, 1329 + AMDGPU_MAX_VPE_INSTANCES); 1330 + } 1331 + 1323 1332 if (le16_to_cpu(ip->hw_id) == UMC_HWID) { 1324 1333 adev->gmc.num_umc++; 1325 1334 adev->umc.node_inst_num++;
+4
drivers/gpu/drm/amd/amdgpu/amdgpu_vpe.h
··· 27 27 #include "amdgpu_irq.h" 28 28 #include "vpe_6_1_fw_if.h" 29 29 30 + #define AMDGPU_MAX_VPE_INSTANCES 2 31 + 30 32 struct amdgpu_vpe; 31 33 32 34 struct vpe_funcs { ··· 76 74 uint32_t *cmdbuf_cpu_addr; 77 75 struct delayed_work idle_work; 78 76 bool context_started; 77 + 78 + uint32_t num_instances; 79 79 }; 80 80 81 81 int amdgpu_vpe_psp_update_sram(struct amdgpu_device *adev);