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/amd/display: [FW Promotion] Release 0.1.12.0

Add dmub command to support LSDMA

Acked-by: ChiaHsuan Chung <chiahsuan.chung@amd.com>
Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Taimur Hassan and committed by
Alex Deucher
960d8c0f 56f61840

+156
+156
drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
··· 1516 1516 */ 1517 1517 DMUB_CMD__FUSED_IO = 89, 1518 1518 1519 + /** 1520 + * Command type used for all LSDMA commands. 1521 + */ 1522 + DMUB_CMD__LSDMA = 90, 1523 + 1519 1524 DMUB_CMD__VBIOS = 128, 1520 1525 }; 1521 1526 ··· 1929 1924 struct dmub_rb_cmd_fams2_flip { 1930 1925 struct dmub_cmd_header header; 1931 1926 struct dmub_fams2_flip_info flip_info; 1927 + }; 1928 + 1929 + struct dmub_cmd_lsdma_data { 1930 + union { 1931 + struct lsdma_init_data { 1932 + union dmub_addr gpu_addr_base; 1933 + uint32_t ring_size; 1934 + } init_data; 1935 + struct lsdma_tiled_copy_data { 1936 + uint32_t src_addr_lo; 1937 + uint32_t src_addr_hi; 1938 + uint32_t dst_addr_lo; 1939 + uint32_t dst_addr_hi; 1940 + 1941 + uint32_t src_x : 16; 1942 + uint32_t src_y : 16; 1943 + 1944 + uint32_t src_width : 16; 1945 + uint32_t src_height : 16; 1946 + 1947 + uint32_t dst_x : 16; 1948 + uint32_t dst_y : 16; 1949 + 1950 + uint32_t dst_width : 16; 1951 + uint32_t dst_height : 16; 1952 + 1953 + uint32_t rect_x : 16; 1954 + uint32_t rect_y : 16; 1955 + 1956 + uint32_t src_swizzle_mode : 5; 1957 + uint32_t src_mip_max : 5; 1958 + uint32_t src_mip_id : 5; 1959 + uint32_t dst_mip_max : 5; 1960 + uint32_t dst_swizzle_mode : 5; 1961 + uint32_t dst_mip_id : 5; 1962 + uint32_t tmz : 1; 1963 + uint32_t dcc : 1; 1964 + 1965 + uint32_t data_format : 6; 1966 + uint32_t padding1 : 4; 1967 + uint32_t dst_element_size : 3; 1968 + uint32_t num_type : 3; 1969 + uint32_t src_element_size : 3; 1970 + uint32_t write_compress : 2; 1971 + uint32_t cache_policy_dst : 2; 1972 + uint32_t cache_policy_src : 2; 1973 + uint32_t read_compress : 2; 1974 + uint32_t src_dim : 2; 1975 + uint32_t dst_dim : 2; 1976 + uint32_t max_uncom : 1; 1977 + 1978 + uint32_t max_com : 2; 1979 + uint32_t padding : 30; 1980 + } tiled_copy_data; 1981 + struct lsdma_linear_copy_data { 1982 + uint32_t count : 30; 1983 + uint32_t cache_policy_dst : 2; 1984 + 1985 + uint32_t tmz : 1; 1986 + uint32_t cache_policy_src : 2; 1987 + uint32_t padding : 29; 1988 + 1989 + uint32_t src_lo; 1990 + uint32_t src_hi; 1991 + uint32_t dst_lo; 1992 + uint32_t dst_hi; 1993 + } linear_copy_data; 1994 + struct lsdma_reg_write_data { 1995 + uint32_t reg_addr; 1996 + uint32_t reg_data; 1997 + } reg_write_data; 1998 + struct lsdma_pio_copy_data { 1999 + union { 2000 + struct { 2001 + uint32_t byte_count : 26; 2002 + uint32_t src_loc : 1; 2003 + uint32_t dst_loc : 1; 2004 + uint32_t src_addr_inc : 1; 2005 + uint32_t dst_addr_inc : 1; 2006 + uint32_t overlap_disable : 1; 2007 + uint32_t constant_fill : 1; 2008 + } fields; 2009 + uint32_t raw; 2010 + } packet; 2011 + uint32_t src_lo; 2012 + uint32_t src_hi; 2013 + uint32_t dst_lo; 2014 + uint32_t dst_hi; 2015 + } pio_copy_data; 2016 + struct lsdma_pio_constfill_data { 2017 + union { 2018 + struct { 2019 + uint32_t byte_count : 26; 2020 + uint32_t src_loc : 1; 2021 + uint32_t dst_loc : 1; 2022 + uint32_t src_addr_inc : 1; 2023 + uint32_t dst_addr_inc : 1; 2024 + uint32_t overlap_disable : 1; 2025 + uint32_t constant_fill : 1; 2026 + } fields; 2027 + uint32_t raw; 2028 + } packet; 2029 + uint32_t dst_lo; 2030 + uint32_t dst_hi; 2031 + uint32_t data; 2032 + } pio_constfill_data; 2033 + 2034 + uint32_t all[14]; 2035 + } u; 2036 + 2037 + }; 2038 + 2039 + struct dmub_rb_cmd_lsdma { 2040 + struct dmub_cmd_header header; 2041 + struct dmub_cmd_lsdma_data lsdma_data; 1932 2042 }; 1933 2043 1934 2044 struct dmub_optc_state_v2 { ··· 4573 4453 DMUB_CMD__ABM_GET_HISTOGRAM_DATA = 11, 4574 4454 }; 4575 4455 4456 + /** 4457 + * LSDMA command sub-types. 4458 + */ 4459 + enum dmub_cmd_lsdma_type { 4460 + /** 4461 + * Initialize parameters for LSDMA. 4462 + * Ring buffer is mapped to the ring buffer 4463 + */ 4464 + DMUB_CMD__LSDMA_INIT_CONFIG = 0, 4465 + /** 4466 + * LSDMA copies data from source to destination linearly 4467 + */ 4468 + DMUB_CMD__LSDMA_LINEAR_COPY = 1, 4469 + /** 4470 + * Send the tiled-to-tiled copy command 4471 + */ 4472 + DMUB_CMD__LSDMA_TILED_TO_TILED_COPY = 2, 4473 + /** 4474 + * Send the poll reg write command 4475 + */ 4476 + DMUB_CMD__LSDMA_POLL_REG_WRITE = 3, 4477 + /** 4478 + * Send the pio copy command 4479 + */ 4480 + DMUB_CMD__LSDMA_PIO_COPY = 4, 4481 + /** 4482 + * Send the pio constfill command 4483 + */ 4484 + DMUB_CMD__LSDMA_PIO_CONSTFILL = 5, 4485 + }; 4486 + 4576 4487 struct abm_ace_curve { 4577 4488 /** 4578 4489 * @offsets: ACE curve offsets. ··· 6124 5973 struct dmub_rb_cmd_fams2_flip fams2_flip; 6125 5974 6126 5975 struct dmub_rb_cmd_fused_io fused_io; 5976 + 5977 + /** 5978 + * Definition of a DMUB_CMD__LSDMA command. 5979 + */ 5980 + struct dmub_rb_cmd_lsdma lsdma; 6127 5981 }; 6128 5982 6129 5983 /**