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

drm/amd/display: Drop CONFIG_DRM_AMD_DC_DMUB guards

[Why]
Support for DMUB only depends on support for DC. It doesn't use floating
point so we don't need to guard it by any specific DCN revision.

[How]
Drop the guards and cleanup the newlines around each one.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Hersen Wu <hersenxs.wu@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nicholas Kazlauskas and committed by
Alex Deucher
2200eb9e 9a71c7d3

+22 -117
-6
drivers/gpu/drm/amd/display/Kconfig
··· 30 30 bool "DCN 2.1 family" 31 31 depends on DRM_AMD_DC && X86 32 32 depends on DRM_AMD_DC_DCN2_0 33 - select DRM_AMD_DC_DMUB 34 33 help 35 34 Choose this option if you want to have 36 35 Renoir support for display engine ··· 51 52 Choose this option 52 53 if you want to support 53 54 HDCP authentication 54 - 55 - config DRM_AMD_DC_DMUB 56 - def_bool n 57 - help 58 - DMUB support for display engine 59 55 60 56 config DEBUG_KERNEL_DC 61 57 bool "Enable kgdb break in DC"
+3 -9
drivers/gpu/drm/amd/display/Makefile
··· 34 34 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/color 35 35 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/info_packet 36 36 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/power 37 + subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc 38 + 37 39 ifdef CONFIG_DRM_AMD_DC_HDCP 38 40 subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/modules/hdcp 39 - endif 40 - 41 - ifdef CONFIG_DRM_AMD_DC_DMUB 42 - subdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dmub/inc 43 41 endif 44 42 45 43 #TODO: remove when Timing Sync feature is complete 46 44 subdir-ccflags-y += -DBUILD_FEATURE_TIMING_SYNC=0 47 45 48 - DAL_LIBS = amdgpu_dm dc modules/freesync modules/color modules/info_packet modules/power 46 + DAL_LIBS = amdgpu_dm dc modules/freesync modules/color modules/info_packet modules/power dmub/src 49 47 50 48 ifdef CONFIG_DRM_AMD_DC_HDCP 51 49 DAL_LIBS += modules/hdcp 52 - endif 53 - 54 - ifdef CONFIG_DRM_AMD_DC_DMUB 55 - DAL_LIBS += dmub/src 56 50 endif 57 51 58 52 AMD_DAL = $(addsuffix /Makefile, $(addprefix $(FULL_AMD_DISPLAY_PATH)/,$(DAL_LIBS)))
+1 -19
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
··· 30 30 #include "dc.h" 31 31 #include "dc/inc/core_types.h" 32 32 #include "dal_asic_id.h" 33 - #ifdef CONFIG_DRM_AMD_DC_DMUB 34 33 #include "dmub/inc/dmub_srv.h" 35 34 #include "dc/inc/hw/dmcu.h" 36 35 #include "dc/inc/hw/abm.h" 37 36 #include "dc/dc_dmub_srv.h" 38 - #endif 39 37 40 38 #include "vid.h" 41 39 #include "amdgpu.h" ··· 91 93 #include "modules/power/power_helpers.h" 92 94 #include "modules/inc/mod_info_packet.h" 93 95 94 - #ifdef CONFIG_DRM_AMD_DC_DMUB 95 96 #define FIRMWARE_RENOIR_DMUB "amdgpu/renoir_dmcub.bin" 96 97 MODULE_FIRMWARE(FIRMWARE_RENOIR_DMUB); 97 - #endif 98 + 98 99 #define FIRMWARE_RAVEN_DMCU "amdgpu/raven_dmcu.bin" 99 100 MODULE_FIRMWARE(FIRMWARE_RAVEN_DMCU); 100 101 ··· 674 677 } 675 678 } 676 679 677 - #ifdef CONFIG_DRM_AMD_DC_DMUB 678 680 static int dm_dmub_hw_init(struct amdgpu_device *adev) 679 681 { 680 682 const unsigned int psp_header_bytes = 0x100; ··· 812 816 return 0; 813 817 } 814 818 815 - #endif 816 819 static int amdgpu_dm_init(struct amdgpu_device *adev) 817 820 { 818 821 struct dc_init_data init_data; 819 822 #ifdef CONFIG_DRM_AMD_DC_HDCP 820 823 struct dc_callback_init init_params; 821 824 #endif 822 - #ifdef CONFIG_DRM_AMD_DC_DMUB 823 825 int r; 824 - #endif 825 826 826 827 adev->dm.ddev = adev->ddev; 827 828 adev->dm.adev = adev; ··· 895 902 896 903 dc_hardware_init(adev->dm.dc); 897 904 898 - #ifdef CONFIG_DRM_AMD_DC_DMUB 899 905 r = dm_dmub_hw_init(adev); 900 906 if (r) { 901 907 DRM_ERROR("DMUB interface failed to initialize: status=%d\n", r); 902 908 goto error; 903 909 } 904 910 905 - #endif 906 911 adev->dm.freesync_module = mod_freesync_create(adev->dm.dc); 907 912 if (!adev->dm.freesync_module) { 908 913 DRM_ERROR( ··· 973 982 if (adev->dm.dc) 974 983 dc_deinit_callbacks(adev->dm.dc); 975 984 #endif 976 - #ifdef CONFIG_DRM_AMD_DC_DMUB 977 985 if (adev->dm.dc->ctx->dmub_srv) { 978 986 dc_dmub_srv_destroy(&adev->dm.dc->ctx->dmub_srv); 979 987 adev->dm.dc->ctx->dmub_srv = NULL; ··· 982 992 amdgpu_bo_free_kernel(&adev->dm.dmub_bo, 983 993 &adev->dm.dmub_bo_gpu_addr, 984 994 &adev->dm.dmub_bo_cpu_addr); 985 - #endif 986 995 987 996 /* DC Destroy TODO: Replace destroy DAL */ 988 997 if (adev->dm.dc) ··· 1093 1104 return 0; 1094 1105 } 1095 1106 1096 - #ifdef CONFIG_DRM_AMD_DC_DMUB 1097 1107 static uint32_t amdgpu_dm_dmub_reg_read(void *ctx, uint32_t address) 1098 1108 { 1099 1109 struct amdgpu_device *adev = ctx; ··· 1178 1190 return 0; 1179 1191 } 1180 1192 1181 - #endif 1182 1193 static int dm_sw_init(void *handle) 1183 1194 { 1184 1195 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 1185 - #ifdef CONFIG_DRM_AMD_DC_DMUB 1186 1196 int r; 1187 1197 1188 1198 r = dm_dmub_sw_init(adev); 1189 1199 if (r) 1190 1200 return r; 1191 - 1192 - #endif 1193 1201 1194 1202 return load_dmcu_fw(adev); 1195 1203 } ··· 1194 1210 { 1195 1211 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 1196 1212 1197 - #ifdef CONFIG_DRM_AMD_DC_DMUB 1198 1213 if (adev->dm.dmub_srv) { 1199 1214 dmub_srv_destroy(adev->dm.dmub_srv); 1200 1215 adev->dm.dmub_srv = NULL; ··· 1204 1221 adev->dm.dmub_fw = NULL; 1205 1222 } 1206 1223 1207 - #endif 1208 1224 if(adev->dm.fw_dmcu) { 1209 1225 release_firmware(adev->dm.fw_dmcu); 1210 1226 adev->dm.fw_dmcu = NULL;
-4
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h
··· 57 57 struct drm_device; 58 58 struct amdgpu_dm_irq_handler_data; 59 59 struct dc; 60 - #ifdef CONFIG_DRM_AMD_DC_DMUB 61 60 struct amdgpu_bo; 62 61 struct dmub_srv; 63 - #endif 64 62 65 63 struct common_irq_params { 66 64 struct amdgpu_device *adev; ··· 123 125 124 126 struct dc *dc; 125 127 126 - #ifdef CONFIG_DRM_AMD_DC_DMUB 127 128 /** 128 129 * @dmub_srv: 129 130 * ··· 167 170 */ 168 171 uint32_t dmcub_fw_version; 169 172 170 - #endif 171 173 /** 172 174 * @cgs_device: 173 175 *
-3
drivers/gpu/drm/amd/display/dc/Makefile
··· 70 70 AMD_DISPLAY_FILES += $(AMD_DISPLAY_CORE) 71 71 AMD_DISPLAY_FILES += $(AMD_DM_REG_UPDATE) 72 72 73 - ifdef CONFIG_DRM_AMD_DC_DMUB 74 73 DC_DMUB += dc_dmub_srv.o 75 74 AMD_DISPLAY_DMUB = $(addprefix $(AMDDALPATH)/dc/,$(DC_DMUB)) 76 75 AMD_DISPLAY_FILES += $(AMD_DISPLAY_DMUB) 77 - endif 78 -
+8 -19
drivers/gpu/drm/amd/display/dc/bios/command_table2.c
··· 37 37 #include "bios_parser_types_internal2.h" 38 38 #include "amdgpu.h" 39 39 40 - #ifdef CONFIG_DRM_AMD_DC_DMUB 41 40 #include "dc_dmub_srv.h" 42 41 #include "dc.h" 43 - #endif 44 42 45 43 #define DC_LOGGER \ 46 44 bp->base.ctx->logger ··· 105 107 } 106 108 } 107 109 108 - #ifdef CONFIG_DRM_AMD_DC_DMUB 109 110 static void encoder_control_dmcub( 110 111 struct dc_dmub_srv *dmcub, 111 112 struct dig_encoder_stream_setup_parameters_v1_5 *dig) ··· 118 121 dc_dmub_srv_cmd_execute(dmcub); 119 122 dc_dmub_srv_wait_idle(dmcub); 120 123 } 121 - #endif 124 + 122 125 static enum bp_result encoder_control_digx_v1_5( 123 126 struct bios_parser *bp, 124 127 struct bp_encoder_control *cntl) ··· 170 173 default: 171 174 break; 172 175 } 173 - #ifdef CONFIG_DRM_AMD_DC_DMUB 176 + 174 177 if (bp->base.ctx->dc->ctx->dmub_srv && 175 178 bp->base.ctx->dc->debug.dmub_command_table) { 176 179 encoder_control_dmcub(bp->base.ctx->dmub_srv, &params); 177 180 return BP_RESULT_OK; 178 181 } 179 - #endif 180 182 181 183 if (EXEC_BIOS_CMD_TABLE(digxencodercontrol, params)) 182 184 result = BP_RESULT_OK; ··· 212 216 break; 213 217 } 214 218 } 215 - #ifdef CONFIG_DRM_AMD_DC_DMUB 219 + 216 220 static void transmitter_control_dmcub( 217 221 struct dc_dmub_srv *dmcub, 218 222 struct dig_transmitter_control_parameters_v1_6 *dig) ··· 226 230 dc_dmub_srv_cmd_execute(dmcub); 227 231 dc_dmub_srv_wait_idle(dmcub); 228 232 } 229 - #endif 233 + 230 234 static enum bp_result transmitter_control_v1_6( 231 235 struct bios_parser *bp, 232 236 struct bp_transmitter_control *cntl) ··· 258 262 __func__, ps.param.symclk_10khz); 259 263 } 260 264 261 - 262 - #ifdef CONFIG_DRM_AMD_DC_DMUB 263 265 if (bp->base.ctx->dc->ctx->dmub_srv && 264 266 bp->base.ctx->dc->debug.dmub_command_table) { 265 267 transmitter_control_dmcub(bp->base.ctx->dmub_srv, &ps.param); 266 268 return BP_RESULT_OK; 267 269 } 268 - #endif 269 270 270 271 /*color_depth not used any more, driver has deep color factor in the Phyclk*/ 271 272 if (EXEC_BIOS_CMD_TABLE(dig1transmittercontrol, ps)) ··· 296 303 } 297 304 } 298 305 299 - #ifdef CONFIG_DRM_AMD_DC_DMUB 300 306 static void set_pixel_clock_dmcub( 301 307 struct dc_dmub_srv *dmcub, 302 308 struct set_pixel_clock_parameter_v1_7 *clk) ··· 309 317 dc_dmub_srv_cmd_execute(dmcub); 310 318 dc_dmub_srv_wait_idle(dmcub); 311 319 } 312 - #endif 313 320 314 321 static enum bp_result set_pixel_clock_v7( 315 322 struct bios_parser *bp, ··· 384 393 if (bp_params->signal_type == SIGNAL_TYPE_DVI_DUAL_LINK) 385 394 clk.miscinfo |= PIXEL_CLOCK_V7_MISC_DVI_DUALLINK_EN; 386 395 387 - #ifdef CONFIG_DRM_AMD_DC_DMUB 388 396 if (bp->base.ctx->dc->ctx->dmub_srv && 389 397 bp->base.ctx->dc->debug.dmub_command_table) { 390 398 set_pixel_clock_dmcub(bp->base.ctx->dmub_srv, &clk); 391 399 return BP_RESULT_OK; 392 400 } 393 - #endif 401 + 394 402 if (EXEC_BIOS_CMD_TABLE(setpixelclock, clk)) 395 403 result = BP_RESULT_OK; 396 404 } ··· 643 653 break; 644 654 } 645 655 } 646 - #ifdef CONFIG_DRM_AMD_DC_DMUB 656 + 647 657 static void enable_disp_power_gating_dmcub( 648 658 struct dc_dmub_srv *dmcub, 649 659 struct enable_disp_power_gating_parameters_v2_1 *pwr) ··· 657 667 dc_dmub_srv_cmd_execute(dmcub); 658 668 dc_dmub_srv_wait_idle(dmcub); 659 669 } 660 - #endif 670 + 661 671 static enum bp_result enable_disp_power_gating_v2_1( 662 672 struct bios_parser *bp, 663 673 enum controller_id crtc_id, ··· 677 687 ps.param.enable = 678 688 bp->cmd_helper->disp_power_gating_action_to_atom(action); 679 689 680 - #ifdef CONFIG_DRM_AMD_DC_DMUB 681 690 if (bp->base.ctx->dc->ctx->dmub_srv && 682 691 bp->base.ctx->dc->debug.dmub_command_table) { 683 692 enable_disp_power_gating_dmcub(bp->base.ctx->dmub_srv, 684 693 &ps.param); 685 694 return BP_RESULT_OK; 686 695 } 687 - #endif 696 + 688 697 if (EXEC_BIOS_CMD_TABLE(enabledisppowergating, ps.param)) 689 698 result = BP_RESULT_OK; 690 699
+1 -5
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 58 58 #include "hubp.h" 59 59 60 60 #include "dc_link_dp.h" 61 - 62 - #ifdef CONFIG_DRM_AMD_DC_DMUB 63 61 #include "dc_dmub_srv.h" 64 - #endif 65 62 66 63 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT 67 64 #include "dsc.h" ··· 2407 2410 switch (power_state) { 2408 2411 case DC_ACPI_CM_POWER_STATE_D0: 2409 2412 dc_resource_state_construct(dc, dc->current_state); 2410 - #ifdef CONFIG_DRM_AMD_DC_DMUB 2413 + 2411 2414 if (dc->ctx->dmub_srv) 2412 2415 dc_dmub_srv_wait_phy_init(dc->ctx->dmub_srv); 2413 - #endif 2414 2416 2415 2417 dc->hwss.init_hw(dc); 2416 2418
+1 -6
drivers/gpu/drm/amd/display/dc/dc.h
··· 112 112 bool disable_dp_clk_share; 113 113 bool psp_setup_panel_mode; 114 114 bool extended_aux_timeout_support; 115 - #ifdef CONFIG_DRM_AMD_DC_DMUB 116 115 bool dmcub_support; 117 - #endif 118 116 #ifdef CONFIG_DRM_AMD_DC_DCN2_0 119 117 bool hw_3d_lut; 120 118 #endif ··· 402 404 unsigned int force_odm_combine; //bit vector based on otg inst 403 405 unsigned int force_fclk_khz; 404 406 bool disable_tri_buf; 405 - #ifdef CONFIG_DRM_AMD_DC_DMUB 406 407 bool dmub_offload_enabled; 407 408 bool dmcub_emulation; 408 409 bool dmub_command_table; /* for testing only */ 409 - #endif 410 410 struct dc_bw_validation_profile bw_val_profile; 411 411 #ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT 412 412 bool disable_fec; ··· 562 566 struct dc_bios *vbios_override; 563 567 enum dce_environment dce_environment; 564 568 565 - #ifdef CONFIG_DRM_AMD_DC_DMUB 566 569 struct dmub_offload_funcs *dmub_if; 567 570 struct dc_reg_helper_state *dmub_offload; 568 - #endif 571 + 569 572 struct dc_config flags; 570 573 uint32_t log_mask; 571 574 #ifdef CONFIG_DRM_AMD_DC_DCN2_0
+3 -19
drivers/gpu/drm/amd/display/dc/dc_helper.c
··· 32 32 #include "dm_services.h" 33 33 #include <stdarg.h> 34 34 35 - #ifdef CONFIG_DRM_AMD_DC_DMUB 36 35 #include "dc.h" 37 36 #include "dc_dmub_srv.h" 38 37 ··· 99 100 100 101 ctx->dmub_srv->reg_helper_offload.gather_in_progress = gather; 101 102 } 102 - #endif 103 103 104 104 struct dc_reg_value_masks { 105 105 uint32_t value; ··· 145 147 } 146 148 } 147 149 148 - #ifdef CONFIG_DRM_AMD_DC_DMUB 149 150 static void dmub_flush_buffer_execute( 150 151 struct dc_reg_helper_state *offload, 151 152 const struct dc_context *ctx) ··· 236 239 cmd_buf->reg_wait.time_out_us = time_out_us; 237 240 } 238 241 239 - #endif 240 - 241 242 uint32_t generic_reg_update_ex(const struct dc_context *ctx, 242 243 uint32_t addr, int n, 243 244 uint8_t shift1, uint32_t mask1, uint32_t field_value1, ··· 252 257 253 258 va_end(ap); 254 259 255 - #ifdef CONFIG_DRM_AMD_DC_DMUB 256 260 if (ctx->dmub_srv && 257 261 ctx->dmub_srv->reg_helper_offload.gather_in_progress) 258 262 return dmub_reg_value_pack(ctx, addr, &field_value_mask); 259 263 /* todo: return void so we can decouple code running in driver from register states */ 260 - #endif 261 264 262 265 /* mmio write directly */ 263 266 reg_val = dm_read_reg(ctx, addr); ··· 282 289 283 290 /* mmio write directly */ 284 291 reg_val = (reg_val & ~field_value_mask.mask) | field_value_mask.value; 285 - #ifdef CONFIG_DRM_AMD_DC_DMUB 292 + 286 293 if (ctx->dmub_srv && 287 294 ctx->dmub_srv->reg_helper_offload.gather_in_progress) { 288 295 return dmub_reg_value_burst_set_pack(ctx, addr, reg_val); 289 296 /* todo: return void so we can decouple code running in driver from register states */ 290 297 } 291 - #endif 298 + 292 299 dm_write_reg(ctx, addr, reg_val); 293 300 return reg_val; 294 301 } ··· 306 313 } 307 314 #endif 308 315 309 - #ifdef CONFIG_DRM_AMD_DC_DMUB 310 316 if (ctx->dmub_srv && 311 317 ctx->dmub_srv->reg_helper_offload.gather_in_progress && 312 318 !ctx->dmub_srv->reg_helper_offload.should_burst_write) { 313 319 ASSERT(false); 314 320 return 0; 315 321 } 316 - #endif 317 322 318 323 value = cgs_read_register(ctx->cgs_device, address); 319 324 trace_amdgpu_dc_rreg(&ctx->perf_trace->read_count, address, value); ··· 478 487 uint32_t reg_val; 479 488 int i; 480 489 481 - #ifdef CONFIG_DRM_AMD_DC_DMUB 482 490 if (ctx->dmub_srv && 483 491 ctx->dmub_srv->reg_helper_offload.gather_in_progress) { 484 492 dmub_reg_wait_done_pack(ctx, addr, mask, shift, condition_value, 485 493 delay_between_poll_us * time_out_num_tries); 486 494 return; 487 495 } 488 - #endif 489 496 490 497 /* something is terribly wrong if time out is > 200ms. (5Hz) */ 491 498 ASSERT(delay_between_poll_us * time_out_num_tries <= 3000000); ··· 531 542 uint32_t index) 532 543 { 533 544 uint32_t value = 0; 534 - #ifdef CONFIG_DRM_AMD_DC_DMUB 545 + 535 546 // when reg read, there should not be any offload. 536 547 if (ctx->dmub_srv && 537 548 ctx->dmub_srv->reg_helper_offload.gather_in_progress) { 538 549 ASSERT(false); 539 550 } 540 - #endif 541 551 542 552 dm_write_reg(ctx, addr_index, index); 543 553 value = dm_read_reg(ctx, addr_data); ··· 575 587 return reg_val; 576 588 } 577 589 578 - #ifdef CONFIG_DRM_AMD_DC_DMUB 579 590 void reg_sequence_start_gather(const struct dc_context *ctx) 580 591 { 581 592 /* if reg sequence is supported and enabled, set flag to ··· 639 652 dc_dmub_srv_wait_idle(ctx->dmub_srv); 640 653 } 641 654 } 642 - 643 - 644 - #endif
+1 -4
drivers/gpu/drm/amd/display/dc/dc_types.h
··· 48 48 struct dc_link; 49 49 struct dc_sink; 50 50 struct dal; 51 - #ifdef CONFIG_DRM_AMD_DC_DMUB 52 51 struct dc_dmub_srv; 53 - #endif 54 52 55 53 /******************************** 56 54 * Environment definitions ··· 110 112 uint32_t dc_sink_id_count; 111 113 uint32_t dc_stream_id_count; 112 114 uint64_t fbc_gpu_addr; 113 - #ifdef CONFIG_DRM_AMD_DC_DMUB 114 115 struct dc_dmub_srv *dmub_srv; 115 - #endif 116 + 116 117 #ifdef CONFIG_DRM_AMD_DC_HDCP 117 118 struct cp_psp cp_psp; 118 119 #endif
+2 -4
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp_cm.c
··· 352 352 uint32_t i; 353 353 struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base); 354 354 355 - #ifdef CONFIG_DRM_AMD_DC_DMUB 356 355 REG_SEQ_START(); 357 - #endif 356 + 358 357 for (i = 0 ; i < num; i++) { 359 358 REG_SET(CM_RGAM_LUT_DATA, 0, CM_RGAM_LUT_DATA, rgb[i].red_reg); 360 359 REG_SET(CM_RGAM_LUT_DATA, 0, CM_RGAM_LUT_DATA, rgb[i].green_reg); ··· 632 633 BREAK_TO_DEBUGGER(); 633 634 break; 634 635 } 635 - #ifdef CONFIG_DRM_AMD_DC_DMUB 636 + 636 637 REG_SEQ_SUBMIT(); 637 638 REG_SEQ_WAIT_DONE(); 638 - #endif 639 639 } 640 640 641 641 void dpp1_degamma_ram_select(
+1 -4
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
··· 457 457 REG_UPDATE(CONTROL, 458 458 VTG0_ENABLE, 1); 459 459 460 - #ifdef CONFIG_DRM_AMD_DC_DMUB 461 460 REG_SEQ_START(); 462 - #endif 461 + 463 462 /* Enable CRTC */ 464 463 REG_UPDATE_2(OTG_CONTROL, 465 464 OTG_DISABLE_POINT_CNTL, 3, 466 465 OTG_MASTER_EN, 1); 467 466 468 - #ifdef CONFIG_DRM_AMD_DC_DMUB 469 467 REG_SEQ_SUBMIT(); 470 468 REG_SEQ_WAIT_DONE(); 471 - #endif 472 469 473 470 return true; 474 471 }
+1 -4
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_mpc.c
··· 345 345 uint32_t i; 346 346 struct dcn20_mpc *mpc20 = TO_DCN20_MPC(mpc); 347 347 348 - #ifdef CONFIG_DRM_AMD_DC_DMUB 349 348 PERF_TRACE(); 350 349 REG_SEQ_START(); 351 - #endif 352 350 353 351 for (i = 0 ; i < num; i++) { 354 352 REG_SET(MPCC_OGAM_LUT_DATA[mpcc_id], 0, MPCC_OGAM_LUT_DATA, rgb[i].red_reg); ··· 466 468 ASSERT(!mpc_disabled); 467 469 ASSERT(!mpc_idle); 468 470 } 469 - #ifdef CONFIG_DRM_AMD_DC_DMUB 471 + 470 472 REG_SEQ_SUBMIT(); 471 473 PERF_TRACE(); 472 474 REG_SEQ_WAIT_DONE(); 473 475 PERF_TRACE(); 474 - #endif 475 476 } 476 477 477 478 static void mpc2_init_mpcc(struct mpcc *mpcc, int mpcc_inst)
-2
drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c
··· 1678 1678 dc->caps.post_blend_color_processing = true; 1679 1679 dc->caps.force_dp_tps4_for_cp2520 = true; 1680 1680 dc->caps.extended_aux_timeout_support = true; 1681 - #ifdef CONFIG_DRM_AMD_DC_DMUB 1682 1681 dc->caps.dmcub_support = true; 1683 - #endif 1684 1682 1685 1683 if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV) 1686 1684 dc->debug = debug_defaults_drv;
-4
drivers/gpu/drm/amd/display/dc/dm_services.h
··· 40 40 41 41 #undef DEPRECATED 42 42 43 - #ifdef CONFIG_DRM_AMD_DC_DMUB 44 43 struct dmub_srv; 45 44 struct dc_dmub_srv; 46 45 47 - #endif 48 46 irq_handler_idx dm_register_interrupt( 49 47 struct dc_context *ctx, 50 48 struct dc_interrupt_params *int_params, ··· 142 144 uint32_t addr, int n, 143 145 uint8_t shift1, uint32_t mask1, uint32_t field_value1, ...); 144 146 145 - #ifdef CONFIG_DRM_AMD_DC_DMUB 146 147 struct dc_dmub_srv *dc_dmub_srv_create(struct dc *dc, struct dmub_srv *dmub); 147 148 void dc_dmub_srv_destroy(struct dc_dmub_srv **dmub_srv); 148 149 149 150 void reg_sequence_start_gather(const struct dc_context *ctx); 150 151 void reg_sequence_start_execute(const struct dc_context *ctx); 151 152 void reg_sequence_wait_done(const struct dc_context *ctx); 152 - #endif 153 153 154 154 #define FD(reg_field) reg_field ## __SHIFT, \ 155 155 reg_field ## _MASK
-3
drivers/gpu/drm/amd/display/dc/inc/reg_helper.h
··· 485 485 uint8_t shift1, uint32_t mask1, uint32_t field_value1, 486 486 ...); 487 487 488 - 489 - #ifdef CONFIG_DRM_AMD_DC_DMUB 490 488 /* register offload macros 491 489 * 492 490 * instead of MMIO to register directly, in some cases we want ··· 503 505 /* wait for the last REG_SEQ_SUBMIT to finish */ 504 506 #define REG_SEQ_WAIT_DONE() \ 505 507 reg_sequence_wait_done(CTX) 506 - #endif 507 508 508 509 #endif /* DRIVERS_GPU_DRM_AMD_DC_DEV_DC_INC_REG_HELPER_H_ */
-2
drivers/gpu/drm/amd/display/dmub/src/Makefile
··· 20 20 # OTHER DEALINGS IN THE SOFTWARE. 21 21 # 22 22 23 - ifdef CONFIG_DRM_AMD_DC_DMUB 24 23 DMUB = dmub_srv.o dmub_reg.o dmub_dcn20.o dmub_dcn21.o 25 24 26 25 AMD_DAL_DMUB = $(addprefix $(AMDDALPATH)/dmub/src/,$(DMUB)) 27 26 28 27 AMD_DISPLAY_FILES += $(AMD_DAL_DMUB) 29 - endif