]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/vce1: Stop using amdgpu_vce_resume
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 13 May 2026 20:04:14 +0000 (22:04 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 May 2026 16:10:53 +0000 (12:10 -0400)
The VCE1 firmware works slightly differently and is already
loaded by vce_v1_0_load_fw(). It doesn't actually need to
call amdgpu_vce_resume().

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 33d8951405e2dd81ac61edebc680e2dfb6b4fc9f)

drivers/gpu/drm/amd/amdgpu/vce_v1_0.c

index 32ee6452f95d346d0c1c981af13e9864b95c5ede..93253db5e2de4ce9e40d9f85976edf76563f34c1 100644 (file)
@@ -178,7 +178,7 @@ static void vce_v1_0_init_cg(struct amdgpu_device *adev)
 }
 
 /**
- * vce_v1_0_load_fw_signature - load firmware signature into VCPU BO
+ * vce_v1_0_load_fw() - load firmware signature into VCPU BO
  *
  * @adev: amdgpu_device pointer
  *
@@ -186,7 +186,7 @@ static void vce_v1_0_init_cg(struct amdgpu_device *adev)
  * This function finds the signature appropriate for the current
  * ASIC and writes that into the VCPU BO.
  */
-static int vce_v1_0_load_fw_signature(struct amdgpu_device *adev)
+static int vce_v1_0_load_fw(struct amdgpu_device *adev)
 {
        const struct common_firmware_header *hdr;
        struct vce_v1_0_fw_signature *sign;
@@ -232,6 +232,8 @@ static int vce_v1_0_load_fw_signature(struct amdgpu_device *adev)
                return -EINVAL;
        }
 
+       memset_io(&cpu_addr[0], 0, amdgpu_bo_size(adev->vce.vcpu_bo));
+
        cpu_addr += (256 - 64) / 4;
        memcpy_toio(&cpu_addr[0], &sign->val[i].nonce[0], 16);
        cpu_addr[4] = cpu_to_le32(le32_to_cpu(sign->length) + 64);
@@ -592,10 +594,7 @@ static int vce_v1_0_sw_init(struct amdgpu_ip_block *ip_block)
        if (r)
                return r;
 
-       r = amdgpu_vce_resume(adev);
-       if (r)
-               return r;
-       r = vce_v1_0_load_fw_signature(adev);
+       r = vce_v1_0_load_fw(adev);
        if (r)
                return r;
        r = vce_v1_0_ensure_vcpu_bo_32bit_addr(adev);
@@ -714,10 +713,7 @@ static int vce_v1_0_resume(struct amdgpu_ip_block *ip_block)
        struct amdgpu_device *adev = ip_block->adev;
        int r;
 
-       r = amdgpu_vce_resume(adev);
-       if (r)
-               return r;
-       r = vce_v1_0_load_fw_signature(adev);
+       r = vce_v1_0_load_fw(adev);
        if (r)
                return r;
        r = vce_v1_0_ensure_vcpu_bo_32bit_addr(adev);