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_5 ip dump

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

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
bc62abe1 0eea81ee

+33 -1
+33 -1
drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c
··· 1926 1926 } 1927 1927 } 1928 1928 1929 + static void vcn_v2_5_print_ip_state(void *handle, struct drm_printer *p) 1930 + { 1931 + struct amdgpu_device *adev = (struct amdgpu_device *)handle; 1932 + int i, j; 1933 + uint32_t reg_count = ARRAY_SIZE(vcn_reg_list_2_5); 1934 + uint32_t inst_off, is_powered; 1935 + 1936 + if (!adev->vcn.ip_dump) 1937 + return; 1938 + 1939 + drm_printf(p, "num_instances:%d\n", adev->vcn.num_vcn_inst); 1940 + for (i = 0; i < adev->vcn.num_vcn_inst; i++) { 1941 + if (adev->vcn.harvest_config & (1 << i)) { 1942 + drm_printf(p, "\nHarvested Instance:VCN%d Skipping dump\n", i); 1943 + continue; 1944 + } 1945 + 1946 + inst_off = i * reg_count; 1947 + is_powered = (adev->vcn.ip_dump[inst_off] & 1948 + UVD_POWER_STATUS__UVD_POWER_STATUS_MASK) != 1; 1949 + 1950 + if (is_powered) { 1951 + drm_printf(p, "\nActive Instance:VCN%d\n", i); 1952 + for (j = 0; j < reg_count; j++) 1953 + drm_printf(p, "%-50s \t 0x%08x\n", vcn_reg_list_2_5[j].reg_name, 1954 + adev->vcn.ip_dump[inst_off + j]); 1955 + } else { 1956 + drm_printf(p, "\nInactive Instance:VCN%d\n", i); 1957 + } 1958 + } 1959 + } 1960 + 1929 1961 static void vcn_v2_5_dump_ip_state(void *handle) 1930 1962 { 1931 1963 struct amdgpu_device *adev = (struct amdgpu_device *)handle; ··· 2005 1973 .set_clockgating_state = vcn_v2_5_set_clockgating_state, 2006 1974 .set_powergating_state = vcn_v2_5_set_powergating_state, 2007 1975 .dump_ip_state = vcn_v2_5_dump_ip_state, 2008 - .print_ip_state = NULL, 1976 + .print_ip_state = vcn_v2_5_print_ip_state, 2009 1977 }; 2010 1978 2011 1979 static const struct amd_ip_funcs vcn_v2_6_ip_funcs = {