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: enable virtual dce on SI

Add the proper IP module when requested.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+136 -4
+136 -4
drivers/gpu/drm/amd/amdgpu/si.c
··· 39 39 #include "si_dma.h" 40 40 #include "dce_v6_0.h" 41 41 #include "si.h" 42 + #include "dce_virtual.h" 42 43 43 44 static const u32 tahiti_golden_registers[] = 44 45 { ··· 1898 1897 }; 1899 1898 1900 1899 1900 + static const struct amdgpu_ip_block_version verde_ip_blocks_vd[] = 1901 + { 1902 + { 1903 + .type = AMD_IP_BLOCK_TYPE_COMMON, 1904 + .major = 1, 1905 + .minor = 0, 1906 + .rev = 0, 1907 + .funcs = &si_common_ip_funcs, 1908 + }, 1909 + { 1910 + .type = AMD_IP_BLOCK_TYPE_GMC, 1911 + .major = 6, 1912 + .minor = 0, 1913 + .rev = 0, 1914 + .funcs = &gmc_v6_0_ip_funcs, 1915 + }, 1916 + { 1917 + .type = AMD_IP_BLOCK_TYPE_IH, 1918 + .major = 1, 1919 + .minor = 0, 1920 + .rev = 0, 1921 + .funcs = &si_ih_ip_funcs, 1922 + }, 1923 + { 1924 + .type = AMD_IP_BLOCK_TYPE_SMC, 1925 + .major = 6, 1926 + .minor = 0, 1927 + .rev = 0, 1928 + .funcs = &amdgpu_pp_ip_funcs, 1929 + }, 1930 + { 1931 + .type = AMD_IP_BLOCK_TYPE_DCE, 1932 + .major = 6, 1933 + .minor = 0, 1934 + .rev = 0, 1935 + .funcs = &dce_virtual_ip_funcs, 1936 + }, 1937 + { 1938 + .type = AMD_IP_BLOCK_TYPE_GFX, 1939 + .major = 6, 1940 + .minor = 0, 1941 + .rev = 0, 1942 + .funcs = &gfx_v6_0_ip_funcs, 1943 + }, 1944 + { 1945 + .type = AMD_IP_BLOCK_TYPE_SDMA, 1946 + .major = 1, 1947 + .minor = 0, 1948 + .rev = 0, 1949 + .funcs = &si_dma_ip_funcs, 1950 + }, 1951 + /* { 1952 + .type = AMD_IP_BLOCK_TYPE_UVD, 1953 + .major = 3, 1954 + .minor = 1, 1955 + .rev = 0, 1956 + .funcs = &si_null_ip_funcs, 1957 + }, 1958 + { 1959 + .type = AMD_IP_BLOCK_TYPE_VCE, 1960 + .major = 1, 1961 + .minor = 0, 1962 + .rev = 0, 1963 + .funcs = &si_null_ip_funcs, 1964 + }, 1965 + */ 1966 + }; 1967 + 1901 1968 static const struct amdgpu_ip_block_version hainan_ip_blocks[] = 1902 1969 { 1903 1970 { ··· 2012 1943 }, 2013 1944 }; 2014 1945 1946 + static const struct amdgpu_ip_block_version hainan_ip_blocks_vd[] = 1947 + { 1948 + { 1949 + .type = AMD_IP_BLOCK_TYPE_COMMON, 1950 + .major = 1, 1951 + .minor = 0, 1952 + .rev = 0, 1953 + .funcs = &si_common_ip_funcs, 1954 + }, 1955 + { 1956 + .type = AMD_IP_BLOCK_TYPE_GMC, 1957 + .major = 6, 1958 + .minor = 0, 1959 + .rev = 0, 1960 + .funcs = &gmc_v6_0_ip_funcs, 1961 + }, 1962 + { 1963 + .type = AMD_IP_BLOCK_TYPE_IH, 1964 + .major = 1, 1965 + .minor = 0, 1966 + .rev = 0, 1967 + .funcs = &si_ih_ip_funcs, 1968 + }, 1969 + { 1970 + .type = AMD_IP_BLOCK_TYPE_SMC, 1971 + .major = 6, 1972 + .minor = 0, 1973 + .rev = 0, 1974 + .funcs = &amdgpu_pp_ip_funcs, 1975 + }, 1976 + { 1977 + .type = AMD_IP_BLOCK_TYPE_DCE, 1978 + .major = 1, 1979 + .minor = 0, 1980 + .rev = 0, 1981 + .funcs = &dce_virtual_ip_funcs, 1982 + }, 1983 + { 1984 + .type = AMD_IP_BLOCK_TYPE_GFX, 1985 + .major = 6, 1986 + .minor = 0, 1987 + .rev = 0, 1988 + .funcs = &gfx_v6_0_ip_funcs, 1989 + }, 1990 + { 1991 + .type = AMD_IP_BLOCK_TYPE_SDMA, 1992 + .major = 1, 1993 + .minor = 0, 1994 + .rev = 0, 1995 + .funcs = &si_dma_ip_funcs, 1996 + }, 1997 + }; 1998 + 2015 1999 int si_set_ip_blocks(struct amdgpu_device *adev) 2016 2000 { 2017 2001 switch (adev->asic_type) { ··· 2072 1950 case CHIP_TAHITI: 2073 1951 case CHIP_PITCAIRN: 2074 1952 case CHIP_OLAND: 2075 - adev->ip_blocks = verde_ip_blocks; 2076 - adev->num_ip_blocks = ARRAY_SIZE(verde_ip_blocks); 1953 + if (adev->enable_virtual_display) { 1954 + adev->ip_blocks = verde_ip_blocks_vd; 1955 + adev->num_ip_blocks = ARRAY_SIZE(verde_ip_blocks_vd); 1956 + } else { 1957 + adev->ip_blocks = verde_ip_blocks; 1958 + adev->num_ip_blocks = ARRAY_SIZE(verde_ip_blocks); 1959 + } 2077 1960 break; 2078 1961 case CHIP_HAINAN: 2079 - adev->ip_blocks = hainan_ip_blocks; 2080 - adev->num_ip_blocks = ARRAY_SIZE(hainan_ip_blocks); 1962 + if (adev->enable_virtual_display) { 1963 + adev->ip_blocks = hainan_ip_blocks_vd; 1964 + adev->num_ip_blocks = ARRAY_SIZE(hainan_ip_blocks_vd); 1965 + } else { 1966 + adev->ip_blocks = hainan_ip_blocks; 1967 + adev->num_ip_blocks = ARRAY_SIZE(hainan_ip_blocks); 1968 + } 2081 1969 break; 2082 1970 default: 2083 1971 BUG();