amd-drm-fixes-5.15-2021-10-21: amdgpu: - Fix a potential out of bounds write in debugfs - Fix revision handling for Yellow Carp - Display fixes for Yellow Carp
Unified · Split
| @@ -1257,7 +1257,7 @@ static int nv_common_early_init(void *handle) · 1256 unmodified lines | ||
| 1257 | 1257 | AMD_PG_SUPPORT_VCN_DPG | |
| 1258 | 1258 | AMD_PG_SUPPORT_JPEG; |
| 1259 | 1259 | if (adev->pdev->device == 0x1681) |
| 1260 | − adev->external_rev_id = adev->rev_id + 0x19; | |
| 1260 | + adev->external_rev_id = 0x20; | |
| 1261 | 1261 | else |
| 1262 | 1262 | adev->external_rev_id = adev->rev_id + 0x01; |
| 1263 | 1263 | break; |
| @@ -263,7 +263,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf, · 262 unmodified lines | ||
| 263 | 263 | if (!wr_buf) |
| 264 | 264 | return -ENOSPC; |
| 265 | 265 | |
| 266 | − if (parse_write_buffer_into_params(wr_buf, size, | |
| 266 | + if (parse_write_buffer_into_params(wr_buf, wr_buf_size, | |
| 267 | 267 | (long *)param, buf, |
| 268 | 268 | max_param_num, |
| 269 | 269 | ¶m_nums)) { |
| @@ -366,32 +366,32 @@ static struct wm_table lpddr5_wm_table = { · 365 unmodified lines | ||
| 366 | 366 | .wm_inst = WM_A, |
| 367 | 367 | .wm_type = WM_TYPE_PSTATE_CHG, |
| 368 | 368 | .pstate_latency_us = 11.65333, |
| 369 | − .sr_exit_time_us = 5.32, | |
| 370 | − .sr_enter_plus_exit_time_us = 6.38, | |
| 369 | + .sr_exit_time_us = 11.5, | |
| 370 | + .sr_enter_plus_exit_time_us = 14.5, | |
| 371 | 371 | .valid = true, |
| 372 | 372 | }, |
| 373 | 373 | { |
| 374 | 374 | .wm_inst = WM_B, |
| 375 | 375 | .wm_type = WM_TYPE_PSTATE_CHG, |
| 376 | 376 | .pstate_latency_us = 11.65333, |
| 377 | − .sr_exit_time_us = 9.82, | |
| 378 | − .sr_enter_plus_exit_time_us = 11.196, | |
| 377 | + .sr_exit_time_us = 11.5, | |
| 378 | + .sr_enter_plus_exit_time_us = 14.5, | |
| 379 | 379 | .valid = true, |
| 380 | 380 | }, |
| 381 | 381 | { |
| 382 | 382 | .wm_inst = WM_C, |
| 383 | 383 | .wm_type = WM_TYPE_PSTATE_CHG, |
| 384 | 384 | .pstate_latency_us = 11.65333, |
| 385 | − .sr_exit_time_us = 9.89, | |
| 386 | − .sr_enter_plus_exit_time_us = 11.24, | |
| 385 | + .sr_exit_time_us = 11.5, | |
| 386 | + .sr_enter_plus_exit_time_us = 14.5, | |
| 387 | 387 | .valid = true, |
| 388 | 388 | }, |
| 389 | 389 | { |
| 390 | 390 | .wm_inst = WM_D, |
| 391 | 391 | .wm_type = WM_TYPE_PSTATE_CHG, |
| 392 | 392 | .pstate_latency_us = 11.65333, |
| 393 | − .sr_exit_time_us = 9.748, | |
| 394 | − .sr_enter_plus_exit_time_us = 11.102, | |
| 393 | + .sr_exit_time_us = 11.5, | |
| 394 | + .sr_enter_plus_exit_time_us = 14.5, | |
| 395 | 395 | .valid = true, |
| 396 | 396 | }, |
| 397 | 397 | } |
| @@ -76,10 +76,6 @@ void dcn31_init_hw(struct dc *dc) · 75 unmodified lines | ||
| 76 | 76 | if (dc->clk_mgr && dc->clk_mgr->funcs->init_clocks) |
| 77 | 77 | dc->clk_mgr->funcs->init_clocks(dc->clk_mgr); |
| 78 | 78 | |
| 79 | − // Initialize the dccg | |
| 80 | − if (res_pool->dccg->funcs->dccg_init) | |
| 81 | − res_pool->dccg->funcs->dccg_init(res_pool->dccg); | |
| 82 | − | |
| 83 | 79 | if (IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment)) { |
| 84 | 80 | |
| 85 | 81 | REG_WRITE(REFCLK_CNTL, 0); |
| @@ -106,6 +102,9 @@ void dcn31_init_hw(struct dc *dc) · 20 unmodified lines | ||
| 106 | 102 | hws->funcs.bios_golden_init(dc); |
| 107 | 103 | hws->funcs.disable_vga(dc->hwseq); |
| 108 | 104 | } |
| 105 | + // Initialize the dccg | |
| 106 | + if (res_pool->dccg->funcs->dccg_init) | |
| 107 | + res_pool->dccg->funcs->dccg_init(res_pool->dccg); | |
| 109 | 108 | |
| 110 | 109 | if (dc->debug.enable_mem_low_power.bits.dmcu) { |
| 111 | 110 | // Force ERAM to shutdown if DMCU is not enabled |
| @@ -217,8 +217,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_1_soc = { · 216 unmodified lines | ||
| 217 | 217 | .num_states = 5, |
| 218 | 218 | .sr_exit_time_us = 9.0, |
| 219 | 219 | .sr_enter_plus_exit_time_us = 11.0, |
| 220 | − .sr_exit_z8_time_us = 402.0, | |
| 221 | − .sr_enter_plus_exit_z8_time_us = 520.0, | |
| 220 | + .sr_exit_z8_time_us = 442.0, | |
| 221 | + .sr_enter_plus_exit_z8_time_us = 560.0, | |
| 222 | 222 | .writeback_latency_us = 12.0, |
| 223 | 223 | .dram_channel_width_bytes = 4, |
| 224 | 224 | .round_trip_ping_latency_dcfclk_cycles = 106, |
| @@ -928,7 +928,7 @@ static const struct dc_debug_options debug_defaults_drv = { · 703 unmodified lines | ||
| 928 | 928 | .disable_dcc = DCC_ENABLE, |
| 929 | 929 | .vsr_support = true, |
| 930 | 930 | .performance_trace = false, |
| 931 | − .max_downscale_src_width = 3840,/*upto 4K*/ | |
| 931 | + .max_downscale_src_width = 4096,/*upto true 4K*/ | |
| 932 | 932 | .disable_pplib_wm_range = false, |
| 933 | 933 | .scl_reset_length10 = true, |
| 934 | 934 | .sanity_checks = false, |
| @@ -1590,6 +1590,13 @@ static int dcn31_populate_dml_pipes_from_context( · 655 unmodified lines | ||
| 1590 | 1590 | pipe = &res_ctx->pipe_ctx[i]; |
| 1591 | 1591 | timing = &pipe->stream->timing; |
| 1592 | 1592 | |
| 1593 | + /* | |
| 1594 | + * Immediate flip can be set dynamically after enabling the plane. | |
| 1595 | + * We need to require support for immediate flip or underflow can be | |
| 1596 | + * intermittently experienced depending on peak b/w requirements. | |
| 1597 | + */ | |
| 1598 | + pipes[pipe_cnt].pipe.src.immediate_flip = true; | |
| 1599 | + | |
| 1593 | 1600 | pipes[pipe_cnt].pipe.src.unbounded_req_mode = false; |
| 1594 | 1601 | pipes[pipe_cnt].pipe.src.gpuvm = true; |
| 1595 | 1602 | pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_luma = 0; |
| @@ -5398,9 +5398,9 @@ void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l · 5397 unmodified lines | ||
| 5398 | 5398 | |
| 5399 | 5399 | v->MaximumReadBandwidthWithPrefetch = |
| 5400 | 5400 | v->MaximumReadBandwidthWithPrefetch |
| 5401 | − + dml_max4( | |
| 5402 | − v->VActivePixelBandwidth[i][j][k], | |
| 5403 | − v->VActiveCursorBandwidth[i][j][k] | |
| 5401 | + + dml_max3( | |
| 5402 | + v->VActivePixelBandwidth[i][j][k] | |
| 5403 | + + v->VActiveCursorBandwidth[i][j][k] | |
| 5404 | 5404 | + v->NoOfDPP[i][j][k] |
| 5405 | 5405 | * (v->meta_row_bandwidth[i][j][k] |
| 5406 | 5406 | + v->dpte_row_bandwidth[i][j][k]), |
| @@ -227,7 +227,7 @@ enum { · 226 unmodified lines | ||
| 227 | 227 | #define FAMILY_YELLOW_CARP 146 |
| 228 | 228 | |
| 229 | 229 | #define YELLOW_CARP_A0 0x01 |
| 230 | −#define YELLOW_CARP_B0 0x1A | |
| 230 | +#define YELLOW_CARP_B0 0x20 | |
| 231 | 231 | #define YELLOW_CARP_UNKNOWN 0xFF |
| 232 | 232 | |
| 233 | 233 | #ifndef ASICREV_IS_YELLOW_CARP |