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

drm/amd/display: Remove DCE12 guards

Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+16 -175
-2
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 1987 1987 case CHIP_POLARIS12: 1988 1988 case CHIP_TONGA: 1989 1989 case CHIP_FIJI: 1990 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1991 1990 case CHIP_VEGA10: 1992 - #endif 1993 1991 #if defined(CONFIG_DRM_AMD_DC_PRE_VEGA) 1994 1992 return amdgpu_dc != 0; 1995 1993 #else
-7
drivers/gpu/drm/amd/display/Kconfig
··· 17 17 by default. This includes Polaris, Carrizo, Tonga, Bonaire, 18 18 and Hawaii. 19 19 20 - config DRM_AMD_DC_DCE12_0 21 - bool "Vega10 family" 22 - depends on DRM_AMD_DC 23 - help 24 - Choose this option if you want to have 25 - VG family for display engine. 26 - 27 20 config DEBUG_KERNEL_DC 28 21 bool "Enable kgdb break in DC" 29 22 depends on DRM_AMD_DC
-4
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 1123 1123 case CHIP_POLARIS11: 1124 1124 case CHIP_POLARIS10: 1125 1125 case CHIP_POLARIS12: 1126 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1127 1126 case CHIP_VEGA10: 1128 - #endif 1129 1127 if (dce110_register_irq_handlers(dm->adev)) { 1130 1128 DRM_ERROR("DM: Failed to initialize IRQ\n"); 1131 1129 return -1; ··· 1390 1392 adev->mode_info.num_hpd = 6; 1391 1393 adev->mode_info.num_dig = 6; 1392 1394 break; 1393 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1394 1395 case CHIP_VEGA10: 1395 1396 adev->mode_info.num_crtc = 6; 1396 1397 adev->mode_info.num_hpd = 6; 1397 1398 adev->mode_info.num_dig = 6; 1398 1399 break; 1399 - #endif 1400 1400 default: 1401 1401 DRM_ERROR("Usupported ASIC type: 0x%X\n", adev->asic_type); 1402 1402 return -EINVAL;
-2
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_services.c
··· 402 402 return false; 403 403 } 404 404 405 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 406 405 bool dm_pp_notify_wm_clock_changes_soc15( 407 406 const struct dc_context *ctx, 408 407 struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges) ··· 409 410 /* TODO: to be implemented */ 410 411 return false; 411 412 } 412 - #endif 413 413 414 414 bool dm_pp_apply_power_level_change_request( 415 415 const struct dc_context *ctx,
-2
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_types.c
··· 523 523 surface->tiling_info.gfx8.pipe_config = 524 524 AMDGPU_TILING_GET(tiling_flags, PIPE_CONFIG); 525 525 526 - #if defined (CONFIG_DRM_AMD_DC_DCE12_0) 527 526 if (adev->asic_type == CHIP_VEGA10) { 528 527 /* Fill GFX9 params */ 529 528 surface->tiling_info.gfx9.num_pipes = ··· 539 540 AMDGPU_TILING_GET(tiling_flags, SWIZZLE_MODE); 540 541 surface->tiling_info.gfx9.shaderEnable = 1; 541 542 } 542 - #endif 543 543 544 544 545 545 surface->plane_size.grph.surface_size.x = 0;
-3
drivers/gpu/drm/amd/display/dc/Makefile
··· 4 4 5 5 DC_LIBS = basics bios calcs dce gpio i2caux irq virtual 6 6 7 - ifdef CONFIG_DRM_AMD_DC_DCE12_0 8 7 DC_LIBS += dce120 9 - endif 10 - 11 8 DC_LIBS += dce112 12 9 DC_LIBS += dce110 13 10 DC_LIBS += dce100
-4
drivers/gpu/drm/amd/display/dc/bios/Makefile
··· 4 4 5 5 BIOS = bios_parser.o bios_parser_interface.o bios_parser_helper.o command_table.o command_table_helper.o 6 6 7 - ifdef CONFIG_DRM_AMD_DC_DCE12_0 8 7 BIOS += command_table2.o command_table_helper2.o bios_parser2.o 9 - endif 10 8 11 9 AMD_DAL_BIOS = $(addprefix $(AMDDALPATH)/dc/bios/,$(BIOS)) 12 10 ··· 24 26 25 27 AMD_DISPLAY_FILES += $(AMDDALPATH)/dc/bios/dce112/command_table_helper_dce112.o 26 28 27 - ifdef CONFIG_DRM_AMD_DC_DCE12_0 28 29 AMD_DISPLAY_FILES += $(AMDDALPATH)/dc/bios/dce112/command_table_helper2_dce112.o 29 - endif
+1 -9
drivers/gpu/drm/amd/display/dc/bios/bios_parser_interface.c
··· 29 29 #include "bios_parser_interface.h" 30 30 #include "bios_parser.h" 31 31 32 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 33 32 #include "bios_parser2.h" 34 - #endif 35 33 36 34 37 35 struct dc_bios *dal_bios_parser_create( ··· 38 40 { 39 41 struct dc_bios *bios = NULL; 40 42 41 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 42 43 bios = firmware_parser_create(init, dce_version); 43 44 45 + /* Fall back to old bios parser for older asics */ 44 46 if (bios == NULL) 45 - /* TODO: remove dce_version from bios_parser. 46 - * cannot remove today because dal enum to bp enum translation is dce specific 47 - */ 48 47 bios = bios_parser_create(init, dce_version); 49 - #else 50 - bios = bios_parser_create(init, dce_version); 51 - #endif 52 48 53 49 return bios; 54 50 }
-2
drivers/gpu/drm/amd/display/dc/bios/command_table_helper2.c
··· 53 53 case DCE_VERSION_11_2: 54 54 *h = dal_cmd_tbl_helper_dce112_get_table2(); 55 55 return true; 56 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 57 56 case DCE_VERSION_12_0: 58 57 *h = dal_cmd_tbl_helper_dce112_get_table2(); 59 58 return true; 60 - #endif 61 59 62 60 default: 63 61 /* Unsupported DCE */
-4
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
··· 50 50 return BW_CALCS_VERSION_POLARIS11; 51 51 return BW_CALCS_VERSION_INVALID; 52 52 53 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 54 53 case FAMILY_AI: 55 54 return BW_CALCS_VERSION_VEGA10; 56 - #endif 57 55 58 56 default: 59 57 return BW_CALCS_VERSION_INVALID; ··· 2433 2435 dceip.scatter_gather_pte_request_rows_in_tiling_mode = 2; 2434 2436 dceip.mcifwr_all_surfaces_burst_time = bw_int_to_fixed(0); 2435 2437 break; 2436 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 2437 2438 case BW_CALCS_VERSION_VEGA10: 2438 2439 vbios.memory_type = bw_def_hbm; 2439 2440 vbios.dram_channel_width_in_bits = 128; ··· 2543 2546 dceip.scatter_gather_pte_request_rows_in_tiling_mode = 2; 2544 2547 dceip.mcifwr_all_surfaces_burst_time = bw_int_to_fixed(0); 2545 2548 break; 2546 - #endif 2547 2549 default: 2548 2550 break; 2549 2551 }
-2
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 1815 1815 } 1816 1816 } 1817 1817 1818 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1819 1818 bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data) 1820 1819 { 1821 1820 int i; ··· 1841 1842 return true; 1842 1843 1843 1844 } 1844 - #endif 1845 1845
+1 -5
drivers/gpu/drm/amd/display/dc/core/dc_debug.c
··· 142 142 surface->rotation, 143 143 surface->stereo_format); 144 144 145 - #if defined (CONFIG_DRM_AMD_DC_DCE12_0) 146 145 SURFACE_TRACE("surface->tiling_info.gfx9.swizzle = %d;\n", 147 146 surface->tiling_info.gfx9.swizzle); 148 - #endif 149 147 150 148 SURFACE_TRACE("\n"); 151 149 } ··· 226 228 update->plane_info->tiling_info.gfx8.array_mode, 227 229 update->plane_info->visible); 228 230 229 - #if defined (CONFIG_DRM_AMD_DC_DCE12_0) 230 - SURFACE_TRACE("surface->tiling_info.gfx9.swizzle = %d;\n", 231 + SURFACE_TRACE("surface->tiling_info.gfx9.swizzle = %d;\n", 231 232 update->plane_info->tiling_info.gfx9.swizzle); 232 - #endif 233 233 } 234 234 235 235 if (update->scaling_info) {
-2
drivers/gpu/drm/amd/display/dc/core/dc_link.c
··· 1217 1217 pipe_ctx->dis_clk->funcs->set_min_clocks_state( 1218 1218 pipe_ctx->dis_clk, DM_PP_CLOCKS_STATE_NOMINAL); 1219 1219 } else { 1220 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1221 1220 uint32_t dp_phyclk_in_khz; 1222 1221 const struct clocks_value clocks_value = 1223 1222 pipe_ctx->dis_clk->cur_clocks_value; ··· 1234 1235 false, 1235 1236 true); 1236 1237 } 1237 - #endif 1238 1238 } 1239 1239 } 1240 1240
-6
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
··· 39 39 #include "dce100/dce100_resource.h" 40 40 #include "dce110/dce110_resource.h" 41 41 #include "dce112/dce112_resource.h" 42 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 43 42 #include "dce120/dce120_resource.h" 44 - #endif 45 43 46 44 enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id) 47 45 { ··· 66 68 dc_version = DCE_VERSION_11_2; 67 69 } 68 70 break; 69 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 70 71 case FAMILY_AI: 71 72 dc_version = DCE_VERSION_12_0; 72 73 break; 73 - #endif 74 74 default: 75 75 dc_version = DCE_VERSION_UNKNOWN; 76 76 break; ··· 101 105 res_pool = dce112_create_resource_pool( 102 106 num_virtual_links, dc); 103 107 break; 104 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 105 108 case DCE_VERSION_12_0: 106 109 res_pool = dce120_create_resource_pool( 107 110 num_virtual_links, dc); 108 111 break; 109 - #endif 110 112 default: 111 113 break; 112 114 }
-8
drivers/gpu/drm/amd/display/dc/dc.h
··· 55 55 struct dc_dcc_surface_param { 56 56 enum surface_pixel_format format; 57 57 struct dc_size surface_size; 58 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 59 58 enum swizzle_mode_values swizzle_mode; 60 - #endif 61 59 enum dc_scan_direction scan; 62 60 }; 63 61 ··· 144 146 bool disable_stutter; 145 147 bool disable_dcc; 146 148 bool disable_dfs_bypass; 147 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 148 149 bool disable_pplib_clock_request; 149 - #endif 150 150 bool disable_clock_gate; 151 151 bool disable_dmcu; 152 152 bool force_abm_enable; ··· 159 163 struct dc_debug debug; 160 164 }; 161 165 162 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 163 166 enum frame_buffer_mode { 164 167 FRAME_BUFFER_MODE_LOCAL_ONLY = 0, 165 168 FRAME_BUFFER_MODE_ZFB_ONLY, ··· 173 178 uint64_t zfb_size_in_byte; 174 179 enum frame_buffer_mode fb_mode; 175 180 }; 176 - #endif 177 181 178 182 struct dc_init_data { 179 183 struct hw_asic_id asic_id; ··· 194 200 195 201 void dc_destroy(struct dc **dc); 196 202 197 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 198 203 bool dc_init_dchub(struct dc *dc, struct dchub_init_data *dh_data); 199 - #endif 200 204 201 205 /******************************************************************************* 202 206 * Surface Interfaces
-4
drivers/gpu/drm/amd/display/dc/dc_hw_types.h
··· 259 259 DC_ADDR_SURF_MICRO_TILING_NON_DISPLAY = 0x1, 260 260 }; 261 261 262 - #if defined (CONFIG_DRM_AMD_DC_DCE12_0) 263 262 enum swizzle_mode_values { 264 263 DC_SW_LINEAR = 0, 265 264 DC_SW_256B_S = 1, ··· 286 287 DC_SW_VAR_R_X = 31, 287 288 DC_SW_MAX 288 289 }; 289 - #endif 290 290 291 291 union dc_tiling_info { 292 292 ··· 351 353 enum array_mode_values array_mode; 352 354 } gfx8; 353 355 354 - #if defined (CONFIG_DRM_AMD_DC_DCE12_0) 355 356 struct { 356 357 unsigned int num_pipes; 357 358 unsigned int num_banks; ··· 365 368 bool rb_aligned; 366 369 bool pipe_aligned; 367 370 } gfx9; 368 - #endif 369 371 }; 370 372 371 373 /* Rotation angle */
-4
drivers/gpu/drm/amd/display/dc/dce/dce_clock_source.c
··· 585 585 pll_settings, pix_clk_params); 586 586 break; 587 587 case DCE_VERSION_11_2: 588 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 589 588 case DCE_VERSION_12_0: 590 - #endif 591 589 dce112_get_pix_clk_dividers_helper(clk_src, 592 590 pll_settings, pix_clk_params); 593 591 break; ··· 869 871 870 872 break; 871 873 case DCE_VERSION_11_2: 872 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 873 874 case DCE_VERSION_12_0: 874 - #endif 875 875 if (clock_source->id != CLOCK_SOURCE_ID_DP_DTO) { 876 876 bp_pc_params.flags.SET_GENLOCK_REF_DIV_SRC = 877 877 pll_settings->use_external_clk;
-6
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.c
··· 80 80 /*ClocksStatePerformance*/ 81 81 { .display_clk_khz = 1132000, .pixel_clk_khz = 600000 } }; 82 82 83 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 84 83 static struct state_dependent_clocks dce120_max_clks_by_state[] = { 85 84 /*ClocksStateInvalid - should not be used*/ 86 85 { .display_clk_khz = 0, .pixel_clk_khz = 0 }, ··· 91 92 { .display_clk_khz = 670000, .pixel_clk_khz = 600000 }, 92 93 /*ClocksStatePerformance*/ 93 94 { .display_clk_khz = 1133000, .pixel_clk_khz = 600000 } }; 94 - #endif 95 95 96 96 /* Starting point for each divider range.*/ 97 97 enum dce_divider_range_start { ··· 495 497 } 496 498 } 497 499 498 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 499 500 static bool dce_apply_clock_voltage_request( 500 501 struct display_clock *clk, 501 502 enum dm_pp_clock_type clocks_type, ··· 589 592 .apply_clock_voltage_request = dce_apply_clock_voltage_request, 590 593 .set_clock = dce112_set_clock 591 594 }; 592 - #endif 593 595 594 596 static const struct display_clock_funcs dce112_funcs = { 595 597 .get_dp_ref_clk_frequency = dce_clocks_get_dp_ref_freq, ··· 730 734 return &clk_dce->base; 731 735 } 732 736 733 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 734 737 struct display_clock *dce120_disp_clk_create( 735 738 struct dc_context *ctx, 736 739 const struct dce_disp_clk_registers *regs, ··· 765 770 766 771 return &clk_dce->base; 767 772 } 768 - #endif 769 773 770 774 void dce_disp_clk_destroy(struct display_clock **disp_clk) 771 775 {
-6
drivers/gpu/drm/amd/display/dc/dce/dce_clocks.h
··· 45 45 CLK_SF(MASTER_COMM_CMD_REG, MASTER_COMM_CMD_REG_BYTE0, mask_sh), \ 46 46 CLK_SF(MASTER_COMM_CNTL_REG, MASTER_COMM_INTERRUPT, mask_sh) 47 47 48 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 49 48 #define CLK_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh) \ 50 49 CLK_SF(DCCG_DFS_DPREFCLK_CNTL, DPREFCLK_SRC_SEL, mask_sh), \ 51 50 CLK_SF(DCCG_DFS_DENTIST_DISPCLK_CNTL, DENTIST_DPREFCLK_WDIVIDER, mask_sh), \ 52 51 CLK_SF(DCCG_DFS_MASTER_COMM_CMD_REG, MASTER_COMM_CMD_REG_BYTE0, mask_sh), \ 53 52 CLK_SF(DCCG_DFS_MASTER_COMM_CNTL_REG, MASTER_COMM_INTERRUPT, mask_sh) 54 - #endif 55 53 56 54 #define CLK_REG_FIELD_LIST(type) \ 57 55 type DPREFCLK_SRC_SEL; \ ··· 124 126 int gpu_pll_ss_divider; 125 127 126 128 127 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 128 129 /* max disp_clk from PPLIB for max validation display clock*/ 129 130 int max_displ_clk_in_khz; 130 - #endif 131 131 }; 132 132 133 133 ··· 147 151 const struct dce_disp_clk_shift *clk_shift, 148 152 const struct dce_disp_clk_mask *clk_mask); 149 153 150 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 151 154 struct display_clock *dce120_disp_clk_create( 152 155 struct dc_context *ctx, 153 156 const struct dce_disp_clk_registers *regs, 154 157 const struct dce_disp_clk_shift *clk_shift, 155 158 const struct dce_disp_clk_mask *clk_mask); 156 - #endif 157 159 158 160 void dce_disp_clk_destroy(struct display_clock **disp_clk); 159 161
-2
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h
··· 186 186 HWSEQ_DCE10_MASK_SH_LIST(mask_sh),\ 187 187 HWSEQ_PHYPLL_MASK_SH_LIST(mask_sh, CRTC0_) 188 188 189 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 190 189 #define HWSEQ_DCE12_MASK_SH_LIST(mask_sh)\ 191 190 HWSEQ_DCEF_MASK_SH_LIST(mask_sh, DCFE0_DCFE_),\ 192 191 HWSEQ_BLND_MASK_SH_LIST(mask_sh, BLND0_BLND_),\ 193 192 HWSEQ_PIXEL_RATE_MASK_SH_LIST(mask_sh, CRTC0_),\ 194 193 HWSEQ_PHYPLL_MASK_SH_LIST(mask_sh, CRTC0_) 195 - #endif 196 194 197 195 #define HWSEQ_REG_FIED_LIST(type) \ 198 196 type DCFE_CLOCK_ENABLE; \
+2 -6
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.c
··· 187 187 REG_UPDATE(DPG_PIPE_NB_PSTATE_CHANGE_CONTROL, 188 188 NB_PSTATE_CHANGE_WATERMARK, nbp_wm); 189 189 } 190 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 190 + 191 191 if (REG(DPG_PIPE_LOW_POWER_CONTROL)) { 192 192 REG_UPDATE(DPG_WATERMARK_MASK_CONTROL, 193 193 PSTATE_CHANGE_WATERMARK_MASK, wm_select); ··· 200 200 REG_UPDATE(DPG_PIPE_LOW_POWER_CONTROL, 201 201 PSTATE_CHANGE_WATERMARK, nbp_wm); 202 202 } 203 - #endif 204 203 } 205 204 206 205 static void program_stutter_watermark(struct mem_input *mi, ··· 209 210 REG_UPDATE(DPG_WATERMARK_MASK_CONTROL, 210 211 STUTTER_EXIT_SELF_REFRESH_WATERMARK_MASK, wm_select); 211 212 212 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 213 213 if (REG(DPG_PIPE_STUTTER_CONTROL2)) 214 214 REG_UPDATE(DPG_PIPE_STUTTER_CONTROL2, 215 215 STUTTER_EXIT_SELF_REFRESH_WATERMARK, stutter_mark); 216 216 else 217 - #endif 218 217 REG_UPDATE(DPG_PIPE_STUTTER_CONTROL, 219 218 STUTTER_EXIT_SELF_REFRESH_WATERMARK, stutter_mark); 220 219 } ··· 251 254 static void program_tiling(struct mem_input *mi, 252 255 const union dc_tiling_info *info) 253 256 { 254 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 255 257 if (mi->masks->GRPH_SW_MODE) { /* GFX9 */ 256 258 REG_UPDATE_6(GRPH_CONTROL, 257 259 GRPH_SW_MODE, info->gfx9.swizzle, ··· 264 268 GRPH_Z, 0); 265 269 */ 266 270 } 267 - #endif 271 + 268 272 if (mi->masks->GRPH_ARRAY_MODE) { /* GFX8 */ 269 273 REG_UPDATE_9(GRPH_CONTROL, 270 274 GRPH_NUM_BANKS, info->gfx8.num_banks,
-4
drivers/gpu/drm/amd/display/dc/dce/dce_mem_input.h
··· 58 58 MI_DCE11_2_REG_LIST(id),\ 59 59 MI_DCE_PTE_REG_LIST(id) 60 60 61 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 62 61 #define MI_DCE12_REG_LIST(id)\ 63 62 MI_DCE_BASE_REG_LIST(id),\ 64 63 MI_DCE_PTE_REG_LIST(id),\ 65 64 SRI(GRPH_PIPE_OUTSTANDING_REQUEST_LIMIT, DCP, id),\ 66 65 SRI(DPG_PIPE_STUTTER_CONTROL2, DMIF_PG, id),\ 67 66 SRI(DPG_PIPE_LOW_POWER_CONTROL, DMIF_PG, id) 68 - #endif 69 67 70 68 struct dce_mem_input_registers { 71 69 /* DCP */ ··· 170 172 MI_DCE11_2_MASK_SH_LIST(mask_sh),\ 171 173 MI_DCP_PTE_MASK_SH_LIST(mask_sh, ) 172 174 173 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 174 175 #define MI_GFX9_TILE_MASK_SH_LIST(mask_sh, blk)\ 175 176 SFB(blk, GRPH_CONTROL, GRPH_SW_MODE, mask_sh),\ 176 177 SFB(blk, GRPH_CONTROL, GRPH_SE_ENABLE, mask_sh),\ ··· 192 195 MI_DMIF_PG_MASK_SH_LIST(mask_sh, DMIF_PG0_),\ 193 196 MI_DCE12_DMIF_PG_MASK_SH_LIST(mask_sh, DMIF_PG0_),\ 194 197 MI_GFX9_TILE_MASK_SH_LIST(mask_sh, DCP0_) 195 - #endif 196 198 197 199 #define MI_REG_FIELD_LIST(type) \ 198 200 type GRPH_ENABLE; \
-4
drivers/gpu/drm/amd/display/dc/dce/dce_opp.h
··· 107 107 SRI(FMT_TEMPORAL_DITHER_PROGRAMMABLE_PATTERN_T_MATRIX, FMT, id), \ 108 108 SRI(CONTROL, FMT_MEMORY, id) 109 109 110 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 111 110 #define OPP_DCE_120_REG_LIST(id) \ 112 111 OPP_COMMON_REG_LIST_BASE(id), \ 113 112 SRI(DCFE_MEM_PWR_CTRL, DCFE, id), \ 114 113 SRI(DCFE_MEM_PWR_STATUS, DCFE, id), \ 115 114 SRI(CONTROL, FMT_MEMORY, id) 116 - #endif 117 115 118 116 #define OPP_SF(reg_name, field_name, post_fix)\ 119 117 .field_name = reg_name ## __ ## field_name ## post_fix ··· 203 205 OPP_SF(DCFE_MEM_LIGHT_SLEEP_CNTL, DCP_LUT_LIGHT_SLEEP_DIS, mask_sh),\ 204 206 OPP_SF(DCFE_MEM_LIGHT_SLEEP_CNTL, REGAMMA_LUT_MEM_PWR_STATE, mask_sh) 205 207 206 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 207 208 #define OPP_COMMON_MASK_SH_LIST_DCE_120(mask_sh)\ 208 209 OPP_SF(DCFE0_DCFE_MEM_PWR_CTRL, DCP_REGAMMA_MEM_PWR_DIS, mask_sh),\ 209 210 OPP_SF(DCFE0_DCFE_MEM_PWR_CTRL, DCP_LUT_MEM_PWR_DIS, mask_sh),\ ··· 264 267 OPP_SF(FMT0_FMT_CONTROL, FMT_SUBSAMPLING_MODE, mask_sh),\ 265 268 OPP_SF(FMT0_FMT_CONTROL, FMT_SUBSAMPLING_ORDER, mask_sh),\ 266 269 OPP_SF(FMT0_FMT_CONTROL, FMT_CBCR_BIT_REDUCTION_BYPASS, mask_sh) 267 - #endif 268 270 269 271 #define OPP_REG_FIELD_LIST(type) \ 270 272 type DCP_REGAMMA_MEM_PWR_DIS; \
-4
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.h
··· 187 187 #define SE_COMMON_MASK_SH_LIST_DCE_COMMON(mask_sh)\ 188 188 SE_COMMON_MASK_SH_LIST_DCE_COMMON_BASE(mask_sh) 189 189 190 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 191 190 #define SE_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh)\ 192 191 SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC_INDEX, mask_sh),\ 193 192 SE_SF(DIG0_AFMT_GENERIC_HDR, AFMT_GENERIC_HB0, mask_sh),\ ··· 266 267 SE_SF(DIG0_HDMI_CONTROL, HDMI_CLOCK_CHANNEL_RATE, mask_sh),\ 267 268 SE_SF(DIG0_DIG_FE_CNTL, TMDS_PIXEL_ENCODING, mask_sh),\ 268 269 SE_SF(DIG0_DIG_FE_CNTL, TMDS_COLOR_FORMAT, mask_sh) 269 - #endif 270 270 271 271 #define SE_COMMON_MASK_SH_LIST_SOC(mask_sh)\ 272 272 SE_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh) ··· 292 294 SE_SF(DIG_FE_CNTL, TMDS_COLOR_FORMAT, mask_sh),\ 293 295 SE_SF(DP_VID_TIMING, DP_VID_M_DOUBLE_VALUE_EN, mask_sh) 294 296 295 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 296 297 #define SE_COMMON_MASK_SH_LIST_DCE120(mask_sh)\ 297 298 SE_COMMON_MASK_SH_LIST_SOC(mask_sh),\ 298 299 SE_SF(DIG0_AFMT_VBI_PACKET_CONTROL, AFMT_GENERIC0_UPDATE, mask_sh),\ ··· 304 307 SE_SF(DP0_DP_SEC_CNTL, DP_SEC_AVI_ENABLE, mask_sh),\ 305 308 SE_SF(DIG0_AFMT_AVI_INFO3, AFMT_AVI_INFO_VERSION, mask_sh),\ 306 309 SE_SF(DP0_DP_VID_TIMING, DP_VID_M_DOUBLE_VALUE_EN, mask_sh) 307 - #endif 308 310 309 311 struct dce_stream_encoder_shift { 310 312 uint8_t AFMT_GENERIC_INDEX;
-2
drivers/gpu/drm/amd/display/dc/dce/dce_transform.h
··· 153 153 XFM_SF(DCFE_MEM_PWR_STATUS, SCL_COEFF_MEM_PWR_STATE, mask_sh), \ 154 154 XFM_SF(SCL_MODE, SCL_PSCL_EN, mask_sh) 155 155 156 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 157 156 #define XFM_COMMON_MASK_SH_LIST_SOC_BASE(mask_sh) \ 158 157 XFM_SF(DCP0_OUT_CLAMP_CONTROL_B_CB, OUT_CLAMP_MIN_B_CB, mask_sh), \ 159 158 XFM_SF(DCP0_OUT_CLAMP_CONTROL_B_CB, OUT_CLAMP_MAX_B_CB, mask_sh), \ ··· 218 219 XFM_SF(DCFE0_DCFE_MEM_PWR_CTRL, SCL_COEFF_MEM_PWR_DIS, mask_sh), \ 219 220 XFM_SF(DCFE0_DCFE_MEM_PWR_STATUS, SCL_COEFF_MEM_PWR_STATE, mask_sh), \ 220 221 XFM_SF(SCL0_SCL_MODE, SCL_PSCL_EN, mask_sh) 221 - #endif 222 222 223 223 #define XFM_REG_FIELD_LIST(type) \ 224 224 type OUT_CLAMP_MIN_B_CB; \
-5
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
··· 1427 1427 return; 1428 1428 } 1429 1429 1430 - /* TODOFPGA */ 1431 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1432 1430 /* TODO: This is incorrect. Figure out how to fix. */ 1433 1431 pipe_ctx->dis_clk->funcs->apply_clock_voltage_request( 1434 1432 pipe_ctx->dis_clk, ··· 1449 1451 pre_mode_set, 1450 1452 false); 1451 1453 return; 1452 - #endif 1453 1454 } 1454 1455 1455 1456 /* get the required state based on state dependent clocks: ··· 1465 1468 pipe_ctx->dis_clk->funcs->set_min_clocks_state( 1466 1469 pipe_ctx->dis_clk, *clocks_state); 1467 1470 } else { 1468 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1469 1471 pipe_ctx->dis_clk->funcs->apply_clock_voltage_request( 1470 1472 pipe_ctx->dis_clk, 1471 1473 DM_PP_CLOCK_TYPE_DISPLAY_CLK, ··· 1485 1489 req_clocks.pixel_clk_khz, 1486 1490 pre_mode_set, 1487 1491 false); 1488 - #endif 1489 1492 } 1490 1493 } 1491 1494
-2
drivers/gpu/drm/amd/display/dc/dce110/dce110_mem_input.c
··· 409 409 dce_mem_input_program_surface_config, 410 410 .mem_input_is_flip_pending = 411 411 dce110_mem_input_is_flip_pending, 412 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 413 412 .mem_input_update_dchub = NULL 414 - #endif 415 413 }; 416 414 /*****************************************/ 417 415 /* Constructor, Destructor */
-2
drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator.h
··· 108 108 uint32_t min_h_front_porch; 109 109 uint32_t min_h_back_porch; 110 110 111 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 112 111 /* DCE 12 */ 113 - #endif 114 112 uint32_t min_h_sync_width; 115 113 uint32_t min_v_sync_width; 116 114 uint32_t min_v_blank;
+5 -9
drivers/gpu/drm/amd/display/dc/dce120/dce120_resource.c
··· 909 909 { 910 910 unsigned int i; 911 911 struct dc_context *ctx = dc->ctx; 912 + struct irq_service_init_data irq_init_data; 912 913 913 914 ctx->dc_bios->regs = &bios_regs; 914 915 ··· 998 997 goto res_create_fail; 999 998 } 1000 999 1001 - { 1002 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 1003 - struct irq_service_init_data init_data; 1004 - init_data.ctx = dc->ctx; 1005 - pool->base.irqs = dal_irq_service_dce120_create(&init_data); 1006 - if (!pool->base.irqs) 1007 - goto irqs_create_fail; 1008 - #endif 1009 - } 1000 + irq_init_data.ctx = dc->ctx; 1001 + pool->base.irqs = dal_irq_service_dce120_create(&irq_init_data); 1002 + if (!pool->base.irqs) 1003 + goto irqs_create_fail; 1010 1004 1011 1005 for (i = 0; i < pool->base.pipe_count; i++) { 1012 1006 pool->base.timing_generators[i] =
-2
drivers/gpu/drm/amd/display/dc/dce80/dce80_mem_input.c
··· 54 54 dce_mem_input_program_surface_config, 55 55 .mem_input_is_flip_pending = 56 56 dce110_mem_input_is_flip_pending, 57 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 58 57 .mem_input_update_dchub = NULL 59 - #endif 60 58 }; 61 59 62 60 /*****************************************/
-4
drivers/gpu/drm/amd/display/dc/dm_services.h
··· 192 192 unsigned int delay_between_poll_us, unsigned int time_out_num_tries, 193 193 const char *func_name); 194 194 195 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 196 195 197 196 /* These macros need to be used with soc15 registers in order to retrieve 198 197 * the actual offset. ··· 273 274 20000,\ 274 275 200000) 275 276 276 - #endif 277 277 /************************************** 278 278 * Power Play (PP) interfaces 279 279 **************************************/ ··· 335 337 const struct dc_context *ctx, 336 338 struct dm_pp_wm_sets_with_clock_ranges *wm_with_clock_ranges); 337 339 338 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 339 340 bool dm_pp_notify_wm_clock_changes_soc15( 340 341 const struct dc_context *ctx, 341 342 struct dm_pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges); 342 - #endif 343 343 344 344 /* DAL calls this function to notify PP about completion of Mode Set. 345 345 * For PP it means that current DCE clocks are those which were returned
-2
drivers/gpu/drm/amd/display/dc/dm_services_types.h
··· 141 141 struct dm_pp_clock_range_for_wm_set wm_clk_ranges[MAX_WM_SETS]; 142 142 }; 143 143 144 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 145 144 struct dm_pp_clock_range_for_dmif_wm_set_soc15 { 146 145 enum dm_pp_wm_set_id wm_set_id; 147 146 uint32_t wm_min_dcfclk_clk_in_khz; ··· 165 166 struct dm_pp_clock_range_for_mcif_wm_set_soc15 166 167 wm_mcif_clocks_ranges[MAX_WM_SETS]; 167 168 }; 168 - #endif 169 169 170 170 #define MAX_DISPLAY_CONFIGS 6 171 171
-2
drivers/gpu/drm/amd/display/dc/gpio/Makefile
··· 31 31 ############################################################################### 32 32 # DCE 12x 33 33 ############################################################################### 34 - ifdef CONFIG_DRM_AMD_DC_DCE12_0 35 34 GPIO_DCE120 = hw_translate_dce120.o hw_factory_dce120.o 36 35 37 36 AMD_DAL_GPIO_DCE120 = $(addprefix $(AMDDALPATH)/dc/gpio/dce120/,$(GPIO_DCE120)) 38 37 39 38 AMD_DISPLAY_FILES += $(AMD_DAL_GPIO_DCE120) 40 - endif 41 39 42 40 ############################################################################### 43 41 # Diagnostics on FPGA
-4
drivers/gpu/drm/amd/display/dc/gpio/hw_factory.c
··· 44 44 45 45 #include "dce110/hw_factory_dce110.h" 46 46 47 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 48 47 #include "dce120/hw_factory_dce120.h" 49 - #endif 50 48 51 49 #include "diagnostics/hw_factory_diag.h" 52 50 ··· 74 76 case DCE_VERSION_11_2: 75 77 dal_hw_factory_dce110_init(factory); 76 78 return true; 77 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 78 79 case DCE_VERSION_12_0: 79 80 dal_hw_factory_dce120_init(factory); 80 81 return true; 81 - #endif 82 82 default: 83 83 ASSERT_CRITICAL(false); 84 84 return false;
-4
drivers/gpu/drm/amd/display/dc/gpio/hw_translate.c
··· 42 42 43 43 #include "dce80/hw_translate_dce80.h" 44 44 #include "dce110/hw_translate_dce110.h" 45 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 46 45 #include "dce120/hw_translate_dce120.h" 47 - #endif 48 46 #include "diagnostics/hw_translate_diag.h" 49 47 50 48 /* ··· 68 70 case DCE_VERSION_11_2: 69 71 dal_hw_translate_dce110_init(translate); 70 72 return true; 71 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 72 73 case DCE_VERSION_12_0: 73 74 dal_hw_translate_dce120_init(translate); 74 75 return true; 75 - #endif 76 76 default: 77 77 BREAK_TO_DEBUGGER(); 78 78 return false;
-2
drivers/gpu/drm/amd/display/dc/i2caux/Makefile
··· 50 50 ############################################################################### 51 51 # DCE 120 family 52 52 ############################################################################### 53 - ifdef CONFIG_DRM_AMD_DC_DCE12_0 54 53 I2CAUX_DCE120 = i2caux_dce120.o 55 54 56 55 AMD_DAL_I2CAUX_DCE120 = $(addprefix $(AMDDALPATH)/dc/i2caux/dce120/,$(I2CAUX_DCE120)) 57 56 58 57 AMD_DISPLAY_FILES += $(AMD_DAL_I2CAUX_DCE120) 59 - endif 60 58 61 59 ############################################################################### 62 60 # Diagnostics on FPGA
-4
drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
··· 57 57 58 58 #include "dce112/i2caux_dce112.h" 59 59 60 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 61 60 #include "dce120/i2caux_dce120.h" 62 - #endif 63 61 64 62 #include "diagnostics/i2caux_diag.h" 65 63 ··· 82 84 return dal_i2caux_dce110_create(ctx); 83 85 case DCE_VERSION_10_0: 84 86 return dal_i2caux_dce100_create(ctx); 85 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 86 87 case DCE_VERSION_12_0: 87 88 return dal_i2caux_dce120_create(ctx); 88 - #endif 89 89 default: 90 90 BREAK_TO_DEBUGGER(); 91 91 return NULL;
-2
drivers/gpu/drm/amd/display/dc/inc/bandwidth_calcs.h
··· 40 40 BW_CALCS_VERSION_POLARIS10, 41 41 BW_CALCS_VERSION_POLARIS11, 42 42 BW_CALCS_VERSION_STONEY, 43 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 44 43 BW_CALCS_VERSION_VEGA10 45 - #endif 46 44 }; 47 45 48 46 /*******************************************************************************
-6
drivers/gpu/drm/amd/display/dc/inc/hw/display_clock.h
··· 28 28 29 29 #include "dm_services_types.h" 30 30 31 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 32 31 struct clocks_value { 33 32 int dispclk_in_khz; 34 33 int max_pixelclk_in_khz; ··· 37 38 bool pixelclk_notify_pplib_done; 38 39 bool phyclk_notigy_pplib_done; 39 40 }; 40 - #endif 41 41 42 42 /* Structure containing all state-dependent clocks 43 43 * (dependent on "enum clocks_state") */ ··· 51 53 52 54 enum dm_pp_clocks_state max_clks_state; 53 55 enum dm_pp_clocks_state cur_min_clks_state; 54 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 55 56 struct clocks_value cur_clocks_value; 56 - #endif 57 57 }; 58 58 59 59 struct display_clock_funcs { ··· 67 71 68 72 int (*get_dp_ref_clk_frequency)(struct display_clock *disp_clk); 69 73 70 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 71 74 bool (*apply_clock_voltage_request)( 72 75 struct display_clock *disp_clk, 73 76 enum dm_pp_clock_type clocks_type, 74 77 int clocks_in_khz, 75 78 bool pre_mode_set, 76 79 bool update_dp_phyclk); 77 - #endif 78 80 }; 79 81 80 82 #endif /* __DISPLAY_CLOCK_H__ */
-2
drivers/gpu/drm/amd/display/dc/inc/hw/mem_input.h
··· 100 100 101 101 bool (*mem_input_is_flip_pending)(struct mem_input *mem_input); 102 102 103 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 104 103 void (*mem_input_update_dchub)(struct mem_input *mem_input, 105 104 struct dchub_init_data *dh_data); 106 - #endif 107 105 }; 108 106 109 107 #endif
-2
drivers/gpu/drm/amd/display/dc/irq/Makefile
··· 30 30 ############################################################################### 31 31 # DCE 12x 32 32 ############################################################################### 33 - ifdef CONFIG_DRM_AMD_DC_DCE12_0 34 33 IRQ_DCE12 = irq_service_dce120.o 35 34 36 35 AMD_DAL_IRQ_DCE12 = $(addprefix $(AMDDALPATH)/dc/irq/dce120/,$(IRQ_DCE12)) 37 36 38 37 AMD_DISPLAY_FILES += $(AMD_DAL_IRQ_DCE12) 39 - endif 40 38
-2
drivers/gpu/drm/amd/display/dc/irq/irq_service.c
··· 33 33 34 34 #include "dce80/irq_service_dce80.h" 35 35 36 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 37 36 #include "dce120/irq_service_dce120.h" 38 - #endif 39 37 40 38 #include "reg_helper.h" 41 39 #include "irq_service.h"
-2
drivers/gpu/drm/amd/display/include/dal_asic_id.h
··· 123 123 #define FAMILY_VI 130 /* Volcanic Islands: Iceland (V), Tonga (M) */ 124 124 #define FAMILY_CZ 135 /* Carrizo */ 125 125 126 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 127 126 #define FAMILY_AI 141 128 - #endif 129 127 130 128 #define FAMILY_UNKNOWN 0xFF 131 129
-2
drivers/gpu/drm/amd/display/include/dal_types.h
··· 38 38 DCE_VERSION_10_0, 39 39 DCE_VERSION_11_0, 40 40 DCE_VERSION_11_2, 41 - #if defined(CONFIG_DRM_AMD_DC_DCE12_0) 42 41 DCE_VERSION_12_0, 43 - #endif 44 42 DCE_VERSION_MAX, 45 43 }; 46 44