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>
}
}
+ if (le16_to_cpu(ip->hw_id) == VPE_HWID) {
+ if (adev->vpe.num_instances < AMDGPU_MAX_VPE_INSTANCES)
+ adev->vpe.num_instances++;
+ else
+ dev_err(adev->dev, "Too many VPE instances: %d vs %d\n",
+ adev->vpe.num_instances + 1,
+ AMDGPU_MAX_VPE_INSTANCES);
+ }
+
if (le16_to_cpu(ip->hw_id) == UMC_HWID) {
adev->gmc.num_umc++;
adev->umc.node_inst_num++;
#include "amdgpu_irq.h"
#include "vpe_6_1_fw_if.h"
+#define AMDGPU_MAX_VPE_INSTANCES 2
+
struct amdgpu_vpe;
struct vpe_funcs {
uint32_t *cmdbuf_cpu_addr;
struct delayed_work idle_work;
bool context_started;
+
+ uint32_t num_instances;
};
int amdgpu_vpe_psp_update_sram(struct amdgpu_device *adev);