summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-01-07 20:16:28 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-02-27 23:52:32 +0300
commitc51aa7923e28f30519a16bf89ed3c4f27460835c (patch)
treeedc8825f596a93a2b918197745e409f78560ecbe /drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
parent31a37dfc8f0be35b3668a3e5092d8788b94b6607 (diff)
downloadlinux-c51aa7923e28f30519a16bf89ed3c4f27460835c.tar.xz
drm/amdgpu/vcn: optimize firmware storage
If each instance uses the same fw image, only store one copy in the driver. Acked-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
index 0aac132a56d3..ba603b2246e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
@@ -114,6 +114,9 @@ static int vcn_v4_0_5_early_init(struct amdgpu_ip_block *ip_block)
struct amdgpu_device *adev = ip_block->adev;
int i, r;
+ if (amdgpu_ip_version(adev, UVD_HWIP, 0) == IP_VERSION(4, 0, 6))
+ adev->vcn.per_inst_fw = true;
+
for (i = 0; i < adev->vcn.num_vcn_inst; ++i)
/* re-use enc ring as unified ring */
adev->vcn.inst[i].num_enc_rings = 1;