Commit defbbcd9 authored by Dave Airlie's avatar Dave Airlie

Merge tag 'amd-drm-fixes-5.15-2021-10-21' of...

Merge tag 'amd-drm-fixes-5.15-2021-10-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

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
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211021203430.4578-1-alexander.deucher@amd.com
parents 3906fe9b 53c2ff8b
...@@ -1257,7 +1257,7 @@ static int nv_common_early_init(void *handle) ...@@ -1257,7 +1257,7 @@ static int nv_common_early_init(void *handle)
AMD_PG_SUPPORT_VCN_DPG | AMD_PG_SUPPORT_VCN_DPG |
AMD_PG_SUPPORT_JPEG; AMD_PG_SUPPORT_JPEG;
if (adev->pdev->device == 0x1681) if (adev->pdev->device == 0x1681)
adev->external_rev_id = adev->rev_id + 0x19; adev->external_rev_id = 0x20;
else else
adev->external_rev_id = adev->rev_id + 0x01; adev->external_rev_id = adev->rev_id + 0x01;
break; break;
......
...@@ -263,7 +263,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf, ...@@ -263,7 +263,7 @@ static ssize_t dp_link_settings_write(struct file *f, const char __user *buf,
if (!wr_buf) if (!wr_buf)
return -ENOSPC; return -ENOSPC;
if (parse_write_buffer_into_params(wr_buf, size, if (parse_write_buffer_into_params(wr_buf, wr_buf_size,
(long *)param, buf, (long *)param, buf,
max_param_num, max_param_num,
&param_nums)) { &param_nums)) {
......
...@@ -366,32 +366,32 @@ static struct wm_table lpddr5_wm_table = { ...@@ -366,32 +366,32 @@ static struct wm_table lpddr5_wm_table = {
.wm_inst = WM_A, .wm_inst = WM_A,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 11.65333, .pstate_latency_us = 11.65333,
.sr_exit_time_us = 5.32, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 6.38, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
}, },
{ {
.wm_inst = WM_B, .wm_inst = WM_B,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 11.65333, .pstate_latency_us = 11.65333,
.sr_exit_time_us = 9.82, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 11.196, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
}, },
{ {
.wm_inst = WM_C, .wm_inst = WM_C,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 11.65333, .pstate_latency_us = 11.65333,
.sr_exit_time_us = 9.89, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 11.24, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
}, },
{ {
.wm_inst = WM_D, .wm_inst = WM_D,
.wm_type = WM_TYPE_PSTATE_CHG, .wm_type = WM_TYPE_PSTATE_CHG,
.pstate_latency_us = 11.65333, .pstate_latency_us = 11.65333,
.sr_exit_time_us = 9.748, .sr_exit_time_us = 11.5,
.sr_enter_plus_exit_time_us = 11.102, .sr_enter_plus_exit_time_us = 14.5,
.valid = true, .valid = true,
}, },
} }
......
...@@ -76,10 +76,6 @@ void dcn31_init_hw(struct dc *dc) ...@@ -76,10 +76,6 @@ void dcn31_init_hw(struct dc *dc)
if (dc->clk_mgr && dc->clk_mgr->funcs->init_clocks) if (dc->clk_mgr && dc->clk_mgr->funcs->init_clocks)
dc->clk_mgr->funcs->init_clocks(dc->clk_mgr); dc->clk_mgr->funcs->init_clocks(dc->clk_mgr);
// Initialize the dccg
if (res_pool->dccg->funcs->dccg_init)
res_pool->dccg->funcs->dccg_init(res_pool->dccg);
if (IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment)) { if (IS_FPGA_MAXIMUS_DC(dc->ctx->dce_environment)) {
REG_WRITE(REFCLK_CNTL, 0); REG_WRITE(REFCLK_CNTL, 0);
...@@ -106,6 +102,9 @@ void dcn31_init_hw(struct dc *dc) ...@@ -106,6 +102,9 @@ void dcn31_init_hw(struct dc *dc)
hws->funcs.bios_golden_init(dc); hws->funcs.bios_golden_init(dc);
hws->funcs.disable_vga(dc->hwseq); hws->funcs.disable_vga(dc->hwseq);
} }
// Initialize the dccg
if (res_pool->dccg->funcs->dccg_init)
res_pool->dccg->funcs->dccg_init(res_pool->dccg);
if (dc->debug.enable_mem_low_power.bits.dmcu) { if (dc->debug.enable_mem_low_power.bits.dmcu) {
// Force ERAM to shutdown if DMCU is not enabled // Force ERAM to shutdown if DMCU is not enabled
......
...@@ -217,8 +217,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_1_soc = { ...@@ -217,8 +217,8 @@ struct _vcs_dpi_soc_bounding_box_st dcn3_1_soc = {
.num_states = 5, .num_states = 5,
.sr_exit_time_us = 9.0, .sr_exit_time_us = 9.0,
.sr_enter_plus_exit_time_us = 11.0, .sr_enter_plus_exit_time_us = 11.0,
.sr_exit_z8_time_us = 402.0, .sr_exit_z8_time_us = 442.0,
.sr_enter_plus_exit_z8_time_us = 520.0, .sr_enter_plus_exit_z8_time_us = 560.0,
.writeback_latency_us = 12.0, .writeback_latency_us = 12.0,
.dram_channel_width_bytes = 4, .dram_channel_width_bytes = 4,
.round_trip_ping_latency_dcfclk_cycles = 106, .round_trip_ping_latency_dcfclk_cycles = 106,
...@@ -928,7 +928,7 @@ static const struct dc_debug_options debug_defaults_drv = { ...@@ -928,7 +928,7 @@ static const struct dc_debug_options debug_defaults_drv = {
.disable_dcc = DCC_ENABLE, .disable_dcc = DCC_ENABLE,
.vsr_support = true, .vsr_support = true,
.performance_trace = false, .performance_trace = false,
.max_downscale_src_width = 3840,/*upto 4K*/ .max_downscale_src_width = 4096,/*upto true 4K*/
.disable_pplib_wm_range = false, .disable_pplib_wm_range = false,
.scl_reset_length10 = true, .scl_reset_length10 = true,
.sanity_checks = false, .sanity_checks = false,
...@@ -1590,6 +1590,13 @@ static int dcn31_populate_dml_pipes_from_context( ...@@ -1590,6 +1590,13 @@ static int dcn31_populate_dml_pipes_from_context(
pipe = &res_ctx->pipe_ctx[i]; pipe = &res_ctx->pipe_ctx[i];
timing = &pipe->stream->timing; timing = &pipe->stream->timing;
/*
* Immediate flip can be set dynamically after enabling the plane.
* We need to require support for immediate flip or underflow can be
* intermittently experienced depending on peak b/w requirements.
*/
pipes[pipe_cnt].pipe.src.immediate_flip = true;
pipes[pipe_cnt].pipe.src.unbounded_req_mode = false; pipes[pipe_cnt].pipe.src.unbounded_req_mode = false;
pipes[pipe_cnt].pipe.src.gpuvm = true; pipes[pipe_cnt].pipe.src.gpuvm = true;
pipes[pipe_cnt].pipe.src.dcc_fraction_of_zs_req_luma = 0; 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 ...@@ -5398,9 +5398,9 @@ void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
v->MaximumReadBandwidthWithPrefetch = v->MaximumReadBandwidthWithPrefetch =
v->MaximumReadBandwidthWithPrefetch v->MaximumReadBandwidthWithPrefetch
+ dml_max4( + dml_max3(
v->VActivePixelBandwidth[i][j][k], v->VActivePixelBandwidth[i][j][k]
v->VActiveCursorBandwidth[i][j][k] + v->VActiveCursorBandwidth[i][j][k]
+ v->NoOfDPP[i][j][k] + v->NoOfDPP[i][j][k]
* (v->meta_row_bandwidth[i][j][k] * (v->meta_row_bandwidth[i][j][k]
+ v->dpte_row_bandwidth[i][j][k]), + v->dpte_row_bandwidth[i][j][k]),
......
...@@ -227,7 +227,7 @@ enum { ...@@ -227,7 +227,7 @@ enum {
#define FAMILY_YELLOW_CARP 146 #define FAMILY_YELLOW_CARP 146
#define YELLOW_CARP_A0 0x01 #define YELLOW_CARP_A0 0x01
#define YELLOW_CARP_B0 0x1A #define YELLOW_CARP_B0 0x20
#define YELLOW_CARP_UNKNOWN 0xFF #define YELLOW_CARP_UNKNOWN 0xFF
#ifndef ASICREV_IS_YELLOW_CARP #ifndef ASICREV_IS_YELLOW_CARP
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment