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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Use the right struct for VCN v5.0.1

VCN IP versions >= 5.0 uses VCN5 fw shared struct.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
6e094020 049e5bf3

+6 -6
+6 -6
drivers/gpu/drm/amd/amdgpu/vcn_v5_0_1.c
··· 153 153 154 154 if (drm_dev_enter(adev_to_drm(adev), &idx)) { 155 155 for (i = 0; i < adev->vcn.num_vcn_inst; i++) { 156 - volatile struct amdgpu_vcn4_fw_shared *fw_shared; 156 + volatile struct amdgpu_vcn5_fw_shared *fw_shared; 157 157 158 158 fw_shared = adev->vcn.inst[i].fw_shared.cpu_addr; 159 159 fw_shared->present_flag_0 = 0; ··· 351 351 upper_32_bits(adev->vcn.inst[inst].fw_shared.gpu_addr)); 352 352 WREG32_SOC15(VCN, vcn_inst, regUVD_VCPU_NONCACHE_OFFSET0, 0); 353 353 WREG32_SOC15(VCN, vcn_inst, regUVD_VCPU_NONCACHE_SIZE0, 354 - AMDGPU_GPU_PAGE_ALIGN(sizeof(struct amdgpu_vcn4_fw_shared))); 354 + AMDGPU_GPU_PAGE_ALIGN(sizeof(struct amdgpu_vcn5_fw_shared))); 355 355 } 356 356 357 357 /** ··· 461 461 VCN, 0, regUVD_VCPU_NONCACHE_OFFSET0), 0, 0, indirect); 462 462 WREG32_SOC24_DPG_MODE(inst_idx, SOC24_DPG_MODE_OFFSET( 463 463 VCN, 0, regUVD_VCPU_NONCACHE_SIZE0), 464 - AMDGPU_GPU_PAGE_ALIGN(sizeof(struct amdgpu_vcn4_fw_shared)), 0, indirect); 464 + AMDGPU_GPU_PAGE_ALIGN(sizeof(struct amdgpu_vcn5_fw_shared)), 0, indirect); 465 465 466 466 /* VCN global tiling registers */ 467 467 WREG32_SOC24_DPG_MODE(inst_idx, SOC24_DPG_MODE_OFFSET( ··· 503 503 { 504 504 struct amdgpu_device *adev = vinst->adev; 505 505 int inst_idx = vinst->inst; 506 - volatile struct amdgpu_vcn4_fw_shared *fw_shared = 506 + volatile struct amdgpu_vcn5_fw_shared *fw_shared = 507 507 adev->vcn.inst[inst_idx].fw_shared.cpu_addr; 508 508 struct amdgpu_ring *ring; 509 509 int vcn_inst; ··· 612 612 { 613 613 struct amdgpu_device *adev = vinst->adev; 614 614 int i = vinst->inst; 615 - volatile struct amdgpu_vcn4_fw_shared *fw_shared; 615 + volatile struct amdgpu_vcn5_fw_shared *fw_shared; 616 616 struct amdgpu_ring *ring; 617 617 uint32_t tmp; 618 618 int j, k, r, vcn_inst; ··· 790 790 { 791 791 struct amdgpu_device *adev = vinst->adev; 792 792 int i = vinst->inst; 793 - volatile struct amdgpu_vcn4_fw_shared *fw_shared; 793 + volatile struct amdgpu_vcn5_fw_shared *fw_shared; 794 794 uint32_t tmp; 795 795 int r = 0, vcn_inst; 796 796