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: add print support for vcn_v2_0 ip dump

Add support for logging the registers in devcoredump
buffer for vcn_v2_0.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Acked-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Sunil Khatri and committed by
Alex Deucher
b910cacb 2239aaa2

+33 -1
+33 -1
drivers/gpu/drm/amd/amdgpu/vcn_v2_0.c
··· 2034 2034 return vcn_v2_0_start_mmsch(adev, &adev->virt.mm_table); 2035 2035 } 2036 2036 2037 + static void vcn_v2_0_print_ip_state(void *handle, struct drm_printer *p) 2038 + { 2039 + struct amdgpu_device *adev = (struct amdgpu_device *)handle; 2040 + int i, j; 2041 + uint32_t reg_count = ARRAY_SIZE(vcn_reg_list_2_0); 2042 + uint32_t inst_off, is_powered; 2043 + 2044 + if (!adev->vcn.ip_dump) 2045 + return; 2046 + 2047 + drm_printf(p, "num_instances:%d\n", adev->vcn.num_vcn_inst); 2048 + for (i = 0; i < adev->vcn.num_vcn_inst; i++) { 2049 + if (adev->vcn.harvest_config & (1 << i)) { 2050 + drm_printf(p, "\nHarvested Instance:VCN%d Skipping dump\n", i); 2051 + continue; 2052 + } 2053 + 2054 + inst_off = i * reg_count; 2055 + is_powered = (adev->vcn.ip_dump[inst_off] & 2056 + UVD_POWER_STATUS__UVD_POWER_STATUS_MASK) != 1; 2057 + 2058 + if (is_powered) { 2059 + drm_printf(p, "\nActive Instance:VCN%d\n", i); 2060 + for (j = 0; j < reg_count; j++) 2061 + drm_printf(p, "%-50s \t 0x%08x\n", vcn_reg_list_2_0[j].reg_name, 2062 + adev->vcn.ip_dump[inst_off + j]); 2063 + } else { 2064 + drm_printf(p, "\nInactive Instance:VCN%d\n", i); 2065 + } 2066 + } 2067 + } 2068 + 2037 2069 static void vcn_v2_0_dump_ip_state(void *handle) 2038 2070 { 2039 2071 struct amdgpu_device *adev = (struct amdgpu_device *)handle; ··· 2113 2081 .set_clockgating_state = vcn_v2_0_set_clockgating_state, 2114 2082 .set_powergating_state = vcn_v2_0_set_powergating_state, 2115 2083 .dump_ip_state = vcn_v2_0_dump_ip_state, 2116 - .print_ip_state = NULL, 2084 + .print_ip_state = vcn_v2_0_print_ip_state, 2117 2085 }; 2118 2086 2119 2087 static const struct amdgpu_ring_funcs vcn_v2_0_dec_ring_vm_funcs = {