mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
Merge tag 'amd-drm-next-6.2-2022-12-07' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.2-2022-12-07: amdgpu: - DSC fixes for DCN 2.1 - HDMI PCON fixes - PSR fixes - DC DML fixes - Properly throttle on BO allocation - GFX 11.0.4 fixes - MMHUB fix - Make some functions static Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20221207232439.5908-1-alexander.deucher@amd.com
This commit is contained in:
commit
66efff515a
|
|
@ -113,7 +113,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
|
|||
bp.resv = resv;
|
||||
bp.preferred_domain = initial_domain;
|
||||
bp.flags = flags;
|
||||
bp.domain = initial_domain;
|
||||
bp.domain = initial_domain | AMDGPU_GEM_DOMAIN_CPU;
|
||||
bp.bo_ptr_size = sizeof(struct amdgpu_bo);
|
||||
|
||||
r = amdgpu_bo_create_user(adev, &bp, &ubo);
|
||||
|
|
@ -332,20 +332,10 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
|
|||
}
|
||||
|
||||
initial_domain = (u32)(0xffffffff & args->in.domains);
|
||||
retry:
|
||||
r = amdgpu_gem_object_create(adev, size, args->in.alignment,
|
||||
initial_domain,
|
||||
flags, ttm_bo_type_device, resv, &gobj);
|
||||
initial_domain, flags, ttm_bo_type_device,
|
||||
resv, &gobj);
|
||||
if (r && r != -ERESTARTSYS) {
|
||||
if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) {
|
||||
flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) {
|
||||
initial_domain |= AMDGPU_GEM_DOMAIN_GTT;
|
||||
goto retry;
|
||||
}
|
||||
DRM_DEBUG("Failed to allocate GEM object (%llu, %d, %llu, %d)\n",
|
||||
size, initial_domain, args->in.alignment, r);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -549,6 +549,7 @@ void amdgpu_gmc_tmz_set(struct amdgpu_device *adev)
|
|||
/* YELLOW_CARP*/
|
||||
case IP_VERSION(10, 3, 3):
|
||||
case IP_VERSION(11, 0, 1):
|
||||
case IP_VERSION(11, 0, 4):
|
||||
/* Don't enable it by default yet.
|
||||
*/
|
||||
if (amdgpu_tmz < 1) {
|
||||
|
|
|
|||
|
|
@ -581,11 +581,7 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
|
|||
bo->flags |= AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE;
|
||||
|
||||
bo->tbo.bdev = &adev->mman.bdev;
|
||||
if (bp->domain & (AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA |
|
||||
AMDGPU_GEM_DOMAIN_GDS))
|
||||
amdgpu_bo_placement_from_domain(bo, AMDGPU_GEM_DOMAIN_CPU);
|
||||
else
|
||||
amdgpu_bo_placement_from_domain(bo, bp->domain);
|
||||
amdgpu_bo_placement_from_domain(bo, bp->domain);
|
||||
if (bp->type == ttm_bo_type_kernel)
|
||||
bo->tbo.priority = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ unsigned int amdgpu_sw_ring_priority(int idx)
|
|||
}
|
||||
|
||||
/*Scan on low prio rings to have unsignaled fence and high ring has no fence.*/
|
||||
int amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux)
|
||||
static int amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux)
|
||||
{
|
||||
struct amdgpu_ring *ring;
|
||||
int i, need_preempt;
|
||||
|
|
@ -370,7 +370,7 @@ int amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux)
|
|||
}
|
||||
|
||||
/* Trigger Mid-Command Buffer Preemption (MCBP) and find if we need to resubmit. */
|
||||
int amdgpu_mcbp_trigger_preempt(struct amdgpu_ring_mux *mux)
|
||||
static int amdgpu_mcbp_trigger_preempt(struct amdgpu_ring_mux *mux)
|
||||
{
|
||||
int r;
|
||||
|
||||
|
|
@ -434,7 +434,7 @@ void amdgpu_ring_mux_start_ib(struct amdgpu_ring_mux *mux, struct amdgpu_ring *r
|
|||
|
||||
static void scan_and_remove_signaled_chunk(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring)
|
||||
{
|
||||
uint32_t last_seq, size = 0;
|
||||
uint32_t last_seq = 0;
|
||||
struct amdgpu_mux_entry *e;
|
||||
struct amdgpu_mux_chunk *chunk, *tmp;
|
||||
|
||||
|
|
@ -450,8 +450,6 @@ static void scan_and_remove_signaled_chunk(struct amdgpu_ring_mux *mux, struct a
|
|||
if (chunk->sync_seq <= last_seq) {
|
||||
list_del(&chunk->entry);
|
||||
kmem_cache_free(amdgpu_mux_chunk_slab, chunk);
|
||||
} else {
|
||||
size++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5058,6 +5058,7 @@ static void gfx_v11_cntl_power_gating(struct amdgpu_device *adev, bool enable)
|
|||
if (enable && (adev->pg_flags & AMD_PG_SUPPORT_GFX_PG)) {
|
||||
switch (adev->ip_versions[GC_HWIP][0]) {
|
||||
case IP_VERSION(11, 0, 1):
|
||||
case IP_VERSION(11, 0, 4):
|
||||
WREG32_SOC15(GC, 0, regRLC_PG_DELAY_3, RLC_PG_DELAY_3_DEFAULT_GC_11_0_1);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -5091,6 +5092,7 @@ static int gfx_v11_0_set_powergating_state(void *handle,
|
|||
amdgpu_gfx_off_ctrl(adev, enable);
|
||||
break;
|
||||
case IP_VERSION(11, 0, 1):
|
||||
case IP_VERSION(11, 0, 4):
|
||||
gfx_v11_cntl_pg(adev, enable);
|
||||
amdgpu_gfx_off_ctrl(adev, enable);
|
||||
break;
|
||||
|
|
@ -5114,6 +5116,7 @@ static int gfx_v11_0_set_clockgating_state(void *handle,
|
|||
case IP_VERSION(11, 0, 1):
|
||||
case IP_VERSION(11, 0, 2):
|
||||
case IP_VERSION(11, 0, 3):
|
||||
case IP_VERSION(11, 0, 4):
|
||||
gfx_v11_0_update_gfx_clock_gating(adev,
|
||||
state == AMD_CG_STATE_GATE);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ static void mmhub_v2_0_init_cache_regs(struct amdgpu_device *adev)
|
|||
|
||||
tmp = mmMMVM_L2_CNTL5_DEFAULT;
|
||||
tmp = REG_SET_FIELD(tmp, MMVM_L2_CNTL5, L2_CACHE_SMALLK_FRAGMENT_SIZE, 0);
|
||||
WREG32_SOC15(GC, 0, mmMMVM_L2_CNTL5, tmp);
|
||||
WREG32_SOC15(MMHUB, 0, mmMMVM_L2_CNTL5, tmp);
|
||||
}
|
||||
|
||||
static void mmhub_v2_0_enable_system_domain(struct amdgpu_device *adev)
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ static void mmhub_v2_3_init_cache_regs(struct amdgpu_device *adev)
|
|||
|
||||
tmp = mmMMVM_L2_CNTL5_DEFAULT;
|
||||
tmp = REG_SET_FIELD(tmp, MMVM_L2_CNTL5, L2_CACHE_SMALLK_FRAGMENT_SIZE, 0);
|
||||
WREG32_SOC15(GC, 0, mmMMVM_L2_CNTL5, tmp);
|
||||
WREG32_SOC15(MMHUB, 0, mmMMVM_L2_CNTL5, tmp);
|
||||
}
|
||||
|
||||
static void mmhub_v2_3_enable_system_domain(struct amdgpu_device *adev)
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ static void mmhub_v3_0_init_cache_regs(struct amdgpu_device *adev)
|
|||
|
||||
tmp = regMMVM_L2_CNTL5_DEFAULT;
|
||||
tmp = REG_SET_FIELD(tmp, MMVM_L2_CNTL5, L2_CACHE_SMALLK_FRAGMENT_SIZE, 0);
|
||||
WREG32_SOC15(GC, 0, regMMVM_L2_CNTL5, tmp);
|
||||
WREG32_SOC15(MMHUB, 0, regMMVM_L2_CNTL5, tmp);
|
||||
}
|
||||
|
||||
static void mmhub_v3_0_enable_system_domain(struct amdgpu_device *adev)
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ static void mmhub_v3_0_1_init_cache_regs(struct amdgpu_device *adev)
|
|||
|
||||
tmp = regMMVM_L2_CNTL5_DEFAULT;
|
||||
tmp = REG_SET_FIELD(tmp, MMVM_L2_CNTL5, L2_CACHE_SMALLK_FRAGMENT_SIZE, 0);
|
||||
WREG32_SOC15(GC, 0, regMMVM_L2_CNTL5, tmp);
|
||||
WREG32_SOC15(MMHUB, 0, regMMVM_L2_CNTL5, tmp);
|
||||
}
|
||||
|
||||
static void mmhub_v3_0_1_enable_system_domain(struct amdgpu_device *adev)
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ static void mmhub_v3_0_2_init_cache_regs(struct amdgpu_device *adev)
|
|||
|
||||
tmp = regMMVM_L2_CNTL5_DEFAULT;
|
||||
tmp = REG_SET_FIELD(tmp, MMVM_L2_CNTL5, L2_CACHE_SMALLK_FRAGMENT_SIZE, 0);
|
||||
WREG32_SOC15(GC, 0, regMMVM_L2_CNTL5, tmp);
|
||||
WREG32_SOC15(MMHUB, 0, regMMVM_L2_CNTL5, tmp);
|
||||
}
|
||||
|
||||
static void mmhub_v3_0_2_enable_system_domain(struct amdgpu_device *adev)
|
||||
|
|
|
|||
|
|
@ -647,7 +647,23 @@ static int soc21_common_early_init(void *handle)
|
|||
adev->external_rev_id = adev->rev_id + 0x20;
|
||||
break;
|
||||
case IP_VERSION(11, 0, 4):
|
||||
adev->cg_flags = AMD_CG_SUPPORT_VCN_MGCG |
|
||||
adev->cg_flags =
|
||||
AMD_CG_SUPPORT_GFX_CGCG |
|
||||
AMD_CG_SUPPORT_GFX_CGLS |
|
||||
AMD_CG_SUPPORT_GFX_MGCG |
|
||||
AMD_CG_SUPPORT_GFX_FGCG |
|
||||
AMD_CG_SUPPORT_REPEATER_FGCG |
|
||||
AMD_CG_SUPPORT_GFX_PERF_CLK |
|
||||
AMD_CG_SUPPORT_MC_MGCG |
|
||||
AMD_CG_SUPPORT_MC_LS |
|
||||
AMD_CG_SUPPORT_HDP_MGCG |
|
||||
AMD_CG_SUPPORT_HDP_LS |
|
||||
AMD_CG_SUPPORT_ATHUB_MGCG |
|
||||
AMD_CG_SUPPORT_ATHUB_LS |
|
||||
AMD_CG_SUPPORT_IH_CG |
|
||||
AMD_CG_SUPPORT_BIF_MGCG |
|
||||
AMD_CG_SUPPORT_BIF_LS |
|
||||
AMD_CG_SUPPORT_VCN_MGCG |
|
||||
AMD_CG_SUPPORT_JPEG_MGCG;
|
||||
adev->pg_flags = AMD_PG_SUPPORT_VCN |
|
||||
AMD_PG_SUPPORT_GFX_PG |
|
||||
|
|
|
|||
|
|
@ -233,41 +233,6 @@ void dcn32_init_clocks(struct clk_mgr *clk_mgr_base)
|
|||
DC_FP_END();
|
||||
}
|
||||
|
||||
static void dcn32_update_clocks_update_dtb_dto(struct clk_mgr_internal *clk_mgr,
|
||||
struct dc_state *context,
|
||||
int ref_dtbclk_khz)
|
||||
{
|
||||
struct dccg *dccg = clk_mgr->dccg;
|
||||
uint32_t tg_mask = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < clk_mgr->base.ctx->dc->res_pool->pipe_count; i++) {
|
||||
struct pipe_ctx *pipe_ctx = &context->res_ctx.pipe_ctx[i];
|
||||
struct dtbclk_dto_params dto_params = {0};
|
||||
|
||||
/* use mask to program DTO once per tg */
|
||||
if (pipe_ctx->stream_res.tg &&
|
||||
!(tg_mask & (1 << pipe_ctx->stream_res.tg->inst))) {
|
||||
tg_mask |= (1 << pipe_ctx->stream_res.tg->inst);
|
||||
|
||||
dto_params.otg_inst = pipe_ctx->stream_res.tg->inst;
|
||||
dto_params.ref_dtbclk_khz = ref_dtbclk_khz;
|
||||
|
||||
if (is_dp_128b_132b_signal(pipe_ctx)) {
|
||||
dto_params.pixclk_khz = pipe_ctx->stream->phy_pix_clk;
|
||||
|
||||
if (pipe_ctx->stream_res.audio != NULL)
|
||||
dto_params.req_audio_dtbclk_khz = 24000;
|
||||
}
|
||||
if (dc_is_hdmi_signal(pipe_ctx->stream->signal))
|
||||
dto_params.is_hdmi = true;
|
||||
|
||||
dccg->funcs->set_dtbclk_dto(clk_mgr->dccg, &dto_params);
|
||||
//dccg->funcs->set_audio_dtbclk_dto(clk_mgr->dccg, &dto_params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Since DPPCLK request to PMFW needs to be exact (due to DPP DTO programming),
|
||||
* update DPPCLK to be the exact frequency that will be set after the DPPCLK
|
||||
* divider is updated. This will prevent rounding issues that could cause DPP
|
||||
|
|
@ -447,8 +412,6 @@ static void dcn32_update_clocks(struct clk_mgr *clk_mgr_base,
|
|||
/* DCCG requires KHz precision for DTBCLK */
|
||||
clk_mgr_base->clks.ref_dtbclk_khz =
|
||||
dcn32_smu_set_hard_min_by_freq(clk_mgr, PPCLK_DTBCLK, khz_to_mhz_ceil(new_clocks->ref_dtbclk_khz));
|
||||
|
||||
dcn32_update_clocks_update_dtb_dto(clk_mgr, context, clk_mgr_base->clks.ref_dtbclk_khz);
|
||||
}
|
||||
|
||||
if (dc->config.forced_clocks == false || (force_reset && safe_to_lower)) {
|
||||
|
|
|
|||
|
|
@ -1556,6 +1556,9 @@ bool dc_validate_boot_timing(const struct dc *dc,
|
|||
if (tg_inst >= dc->res_pool->timing_generator_count)
|
||||
return false;
|
||||
|
||||
if (tg_inst != link->link_enc->preferred_engine)
|
||||
return false;
|
||||
|
||||
tg = dc->res_pool->timing_generators[tg_inst];
|
||||
|
||||
if (!tg->funcs->get_hw_timing)
|
||||
|
|
@ -1985,7 +1988,7 @@ enum dc_status dc_commit_streams(struct dc *dc,
|
|||
|
||||
DC_LOG_DC("%s Finished.\n", __func__);
|
||||
|
||||
return (res == DC_OK);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* TODO: When the transition to the new commit sequence is done, remove this
|
||||
|
|
|
|||
|
|
@ -3378,7 +3378,7 @@ bool dc_link_setup_psr(struct dc_link *link,
|
|||
case FAMILY_YELLOW_CARP:
|
||||
case AMDGPU_FAMILY_GC_10_3_6:
|
||||
case AMDGPU_FAMILY_GC_11_0_1:
|
||||
if (dc->debug.disable_z10)
|
||||
if (dc->debug.disable_z10 || dc->debug.psr_skip_crtc_disable)
|
||||
psr_context->psr_level.bits.SKIP_CRTC_DISABLE = true;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ struct aux_payload;
|
|||
struct set_config_cmd_payload;
|
||||
struct dmub_notification;
|
||||
|
||||
#define DC_VER "3.2.214"
|
||||
#define DC_VER "3.2.215"
|
||||
|
||||
#define MAX_SURFACES 3
|
||||
#define MAX_PLANES 6
|
||||
|
|
@ -844,6 +844,7 @@ struct dc_debug_options {
|
|||
int crb_alloc_policy_min_disp_count;
|
||||
bool disable_z10;
|
||||
bool enable_z9_disable_interface;
|
||||
bool psr_skip_crtc_disable;
|
||||
union dpia_debug_options dpia_debug;
|
||||
bool disable_fixed_vs_aux_timeout_wa;
|
||||
bool force_disable_subvp;
|
||||
|
|
|
|||
|
|
@ -2216,6 +2216,12 @@ void dcn10_enable_vblanks_synchronization(
|
|||
opp = grouped_pipes[i]->stream_res.opp;
|
||||
tg = grouped_pipes[i]->stream_res.tg;
|
||||
tg->funcs->get_otg_active_size(tg, &width, &height);
|
||||
|
||||
if (!tg->funcs->is_tg_enabled(tg)) {
|
||||
DC_SYNC_INFO("Skipping timing sync on disabled OTG\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (opp->funcs->opp_program_dpg_dimensions)
|
||||
opp->funcs->opp_program_dpg_dimensions(opp, width, 2*(height) + 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2011,10 +2011,13 @@ void dcn20_prepare_bandwidth(
|
|||
|
||||
/* decrease compbuf size */
|
||||
if (hubbub->funcs->program_compbuf_size) {
|
||||
if (context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes)
|
||||
if (context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes) {
|
||||
compbuf_size_kb = context->bw_ctx.dml.ip.min_comp_buffer_size_kbytes;
|
||||
else
|
||||
dc->wm_optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.dml.ip.min_comp_buffer_size_kbytes);
|
||||
} else {
|
||||
compbuf_size_kb = context->bw_ctx.bw.dcn.compbuf_size_kb;
|
||||
dc->wm_optimized_required |= (compbuf_size_kb != dc->current_state->bw_ctx.bw.dcn.compbuf_size_kb);
|
||||
}
|
||||
|
||||
hubbub->funcs->program_compbuf_size(hubbub, compbuf_size_kb, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1493,6 +1493,8 @@ static bool dcn301_resource_construct(
|
|||
dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
|
||||
dc->caps.color.mpc.ocsc = 1;
|
||||
|
||||
dc->caps.dp_hdmi21_pcon_support = true;
|
||||
|
||||
/* read VBIOS LTTPR caps */
|
||||
if (ctx->dc_bios->funcs->get_lttpr_caps) {
|
||||
enum bp_result bp_query_result;
|
||||
|
|
|
|||
|
|
@ -1281,6 +1281,8 @@ static bool dcn302_resource_construct(
|
|||
dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
|
||||
dc->caps.color.mpc.ocsc = 1;
|
||||
|
||||
dc->caps.dp_hdmi21_pcon_support = true;
|
||||
|
||||
/* read VBIOS LTTPR caps */
|
||||
if (ctx->dc_bios->funcs->get_lttpr_caps) {
|
||||
enum bp_result bp_query_result;
|
||||
|
|
|
|||
|
|
@ -1212,6 +1212,8 @@ static bool dcn303_resource_construct(
|
|||
dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
|
||||
dc->caps.color.mpc.ocsc = 1;
|
||||
|
||||
dc->caps.dp_hdmi21_pcon_support = true;
|
||||
|
||||
/* read VBIOS LTTPR caps */
|
||||
if (ctx->dc_bios->funcs->get_lttpr_caps) {
|
||||
enum bp_result bp_query_result;
|
||||
|
|
|
|||
|
|
@ -623,3 +623,43 @@ void dcn31_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable)
|
|||
if (hws->ctx->dc->debug.hpo_optimization)
|
||||
REG_UPDATE(HPO_TOP_HW_CONTROL, HPO_IO_EN, !!enable);
|
||||
}
|
||||
void dcn31_set_drr(struct pipe_ctx **pipe_ctx,
|
||||
int num_pipes, struct dc_crtc_timing_adjust adjust)
|
||||
{
|
||||
int i = 0;
|
||||
struct drr_params params = {0};
|
||||
unsigned int event_triggers = 0x2;/*Bit[1]: OTG_TRIG_A*/
|
||||
unsigned int num_frames = 2;
|
||||
params.vertical_total_max = adjust.v_total_max;
|
||||
params.vertical_total_min = adjust.v_total_min;
|
||||
params.vertical_total_mid = adjust.v_total_mid;
|
||||
params.vertical_total_mid_frame_num = adjust.v_total_mid_frame_num;
|
||||
for (i = 0; i < num_pipes; i++) {
|
||||
if ((pipe_ctx[i]->stream_res.tg != NULL) && pipe_ctx[i]->stream_res.tg->funcs) {
|
||||
if (pipe_ctx[i]->stream_res.tg->funcs->set_drr)
|
||||
pipe_ctx[i]->stream_res.tg->funcs->set_drr(
|
||||
pipe_ctx[i]->stream_res.tg, ¶ms);
|
||||
if (adjust.v_total_max != 0 && adjust.v_total_min != 0)
|
||||
if (pipe_ctx[i]->stream_res.tg->funcs->set_static_screen_control)
|
||||
pipe_ctx[i]->stream_res.tg->funcs->set_static_screen_control(
|
||||
pipe_ctx[i]->stream_res.tg,
|
||||
event_triggers, num_frames);
|
||||
}
|
||||
}
|
||||
}
|
||||
void dcn31_set_static_screen_control(struct pipe_ctx **pipe_ctx,
|
||||
int num_pipes, const struct dc_static_screen_params *params)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned int triggers = 0;
|
||||
if (params->triggers.surface_update)
|
||||
triggers |= 0x600;/*bit 9 and bit10 : 110 0000 0000*/
|
||||
if (params->triggers.cursor_update)
|
||||
triggers |= 0x10;/*bit4*/
|
||||
if (params->triggers.force_trigger)
|
||||
triggers |= 0x1;
|
||||
for (i = 0; i < num_pipes; i++)
|
||||
pipe_ctx[i]->stream_res.tg->funcs->
|
||||
set_static_screen_control(pipe_ctx[i]->stream_res.tg,
|
||||
triggers, params->num_frames);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,4 +56,8 @@ bool dcn31_is_abm_supported(struct dc *dc,
|
|||
void dcn31_init_pipes(struct dc *dc, struct dc_state *context);
|
||||
void dcn31_setup_hpo_hw_control(const struct dce_hwseq *hws, bool enable);
|
||||
|
||||
void dcn31_set_static_screen_control(struct pipe_ctx **pipe_ctx,
|
||||
int num_pipes, const struct dc_static_screen_params *params);
|
||||
void dcn31_set_drr(struct pipe_ctx **pipe_ctx,
|
||||
int num_pipes, struct dc_crtc_timing_adjust adjust);
|
||||
#endif /* __DC_HWSS_DCN31_H__ */
|
||||
|
|
|
|||
|
|
@ -64,9 +64,9 @@ static const struct hw_sequencer_funcs dcn31_funcs = {
|
|||
.prepare_bandwidth = dcn20_prepare_bandwidth,
|
||||
.optimize_bandwidth = dcn20_optimize_bandwidth,
|
||||
.update_bandwidth = dcn20_update_bandwidth,
|
||||
.set_drr = dcn10_set_drr,
|
||||
.set_drr = dcn31_set_drr,
|
||||
.get_position = dcn10_get_position,
|
||||
.set_static_screen_control = dcn10_set_static_screen_control,
|
||||
.set_static_screen_control = dcn31_set_static_screen_control,
|
||||
.setup_stereo = dcn10_setup_stereo,
|
||||
.set_avmute = dcn30_set_avmute,
|
||||
.log_hw_state = dcn10_log_hw_state,
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#define FN(reg_name, field_name) \
|
||||
optc1->tg_shift->field_name, optc1->tg_mask->field_name
|
||||
|
||||
#define STATIC_SCREEN_EVENT_MASK_DRR_DOUBLE_BUFFER_UPDATE_EN 0x2000 /*bit 13*/
|
||||
static void optc31_set_odm_combine(struct timing_generator *optc, int *opp_id, int opp_cnt,
|
||||
struct dc_crtc_timing *timing)
|
||||
{
|
||||
|
|
@ -231,6 +232,32 @@ void optc3_init_odm(struct timing_generator *optc)
|
|||
OPTC_MEM_SEL, 0);
|
||||
optc1->opp_count = 1;
|
||||
}
|
||||
void optc31_set_static_screen_control(
|
||||
struct timing_generator *optc,
|
||||
uint32_t event_triggers,
|
||||
uint32_t num_frames)
|
||||
{
|
||||
struct optc *optc1 = DCN10TG_FROM_TG(optc);
|
||||
uint32_t framecount;
|
||||
uint32_t events;
|
||||
|
||||
if (num_frames > 0xFF)
|
||||
num_frames = 0xFF;
|
||||
REG_GET_2(OTG_STATIC_SCREEN_CONTROL,
|
||||
OTG_STATIC_SCREEN_EVENT_MASK, &events,
|
||||
OTG_STATIC_SCREEN_FRAME_COUNT, &framecount);
|
||||
|
||||
if (events == event_triggers && num_frames == framecount)
|
||||
return;
|
||||
if ((event_triggers & STATIC_SCREEN_EVENT_MASK_DRR_DOUBLE_BUFFER_UPDATE_EN)
|
||||
!= 0)
|
||||
event_triggers = event_triggers &
|
||||
~STATIC_SCREEN_EVENT_MASK_DRR_DOUBLE_BUFFER_UPDATE_EN;
|
||||
|
||||
REG_UPDATE_2(OTG_STATIC_SCREEN_CONTROL,
|
||||
OTG_STATIC_SCREEN_EVENT_MASK, event_triggers,
|
||||
OTG_STATIC_SCREEN_FRAME_COUNT, num_frames);
|
||||
}
|
||||
|
||||
static struct timing_generator_funcs dcn31_tg_funcs = {
|
||||
.validate_timing = optc1_validate_timing,
|
||||
|
|
@ -266,7 +293,7 @@ static struct timing_generator_funcs dcn31_tg_funcs = {
|
|||
.set_drr = optc31_set_drr,
|
||||
.get_last_used_drr_vtotal = optc2_get_last_used_drr_vtotal,
|
||||
.set_vtotal_min_max = optc1_set_vtotal_min_max,
|
||||
.set_static_screen_control = optc1_set_static_screen_control,
|
||||
.set_static_screen_control = optc31_set_static_screen_control,
|
||||
.program_stereo = optc1_program_stereo,
|
||||
.is_stereo_left_eye = optc1_is_stereo_left_eye,
|
||||
.tg_init = optc3_tg_init,
|
||||
|
|
|
|||
|
|
@ -263,5 +263,8 @@ bool optc31_immediate_disable_crtc(struct timing_generator *optc);
|
|||
void optc31_set_drr(struct timing_generator *optc, const struct drr_params *params);
|
||||
|
||||
void optc3_init_odm(struct timing_generator *optc);
|
||||
|
||||
void optc31_set_static_screen_control(
|
||||
struct timing_generator *optc,
|
||||
uint32_t event_triggers,
|
||||
uint32_t num_frames);
|
||||
#endif /* __DC_OPTC_DCN31_H__ */
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ static const struct hw_sequencer_funcs dcn314_funcs = {
|
|||
.prepare_bandwidth = dcn20_prepare_bandwidth,
|
||||
.optimize_bandwidth = dcn20_optimize_bandwidth,
|
||||
.update_bandwidth = dcn20_update_bandwidth,
|
||||
.set_drr = dcn10_set_drr,
|
||||
.set_drr = dcn31_set_drr,
|
||||
.get_position = dcn10_get_position,
|
||||
.set_static_screen_control = dcn10_set_static_screen_control,
|
||||
.set_static_screen_control = dcn31_set_static_screen_control,
|
||||
.setup_stereo = dcn10_setup_stereo,
|
||||
.set_avmute = dcn30_set_avmute,
|
||||
.log_hw_state = dcn10_log_hw_state,
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ static struct timing_generator_funcs dcn314_tg_funcs = {
|
|||
.set_drr = optc31_set_drr,
|
||||
.get_last_used_drr_vtotal = optc2_get_last_used_drr_vtotal,
|
||||
.set_vtotal_min_max = optc1_set_vtotal_min_max,
|
||||
.set_static_screen_control = optc1_set_static_screen_control,
|
||||
.set_static_screen_control = optc31_set_static_screen_control,
|
||||
.program_stereo = optc1_program_stereo,
|
||||
.is_stereo_left_eye = optc1_is_stereo_left_eye,
|
||||
.tg_init = optc3_tg_init,
|
||||
|
|
|
|||
|
|
@ -886,6 +886,7 @@ static const struct dc_plane_cap plane_cap = {
|
|||
static const struct dc_debug_options debug_defaults_drv = {
|
||||
.disable_z10 = false,
|
||||
.enable_z9_disable_interface = true,
|
||||
.psr_skip_crtc_disable = true,
|
||||
.disable_dmcu = true,
|
||||
.force_abm_enable = false,
|
||||
.timing_trace = false,
|
||||
|
|
|
|||
|
|
@ -703,11 +703,7 @@ void dcn32_subvp_update_force_pstate(struct dc *dc, struct dc_state *context)
|
|||
for (i = 0; i < dc->res_pool->pipe_count; i++) {
|
||||
struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
|
||||
|
||||
// For SubVP + DRR, also force disallow on the DRR pipe
|
||||
// (We will force allow in the DMUB sequence -- some DRR timings by default won't allow P-State so we have
|
||||
// to force once the vblank is stretched).
|
||||
if (pipe->stream && pipe->plane_state && (pipe->stream->mall_stream_config.type == SUBVP_MAIN ||
|
||||
(pipe->stream->mall_stream_config.type == SUBVP_NONE && pipe->stream->ignore_msa_timing_param))) {
|
||||
if (pipe->stream && pipe->plane_state && (pipe->stream->mall_stream_config.type == SUBVP_MAIN)) {
|
||||
struct hubp *hubp = pipe->plane_res.hubp;
|
||||
|
||||
if (hubp && hubp->funcs->hubp_update_force_pstate_disallow)
|
||||
|
|
@ -785,6 +781,10 @@ void dcn32_program_mall_pipe_config(struct dc *dc, struct dc_state *context)
|
|||
if (hws && hws->funcs.update_mall_sel)
|
||||
hws->funcs.update_mall_sel(dc, context);
|
||||
|
||||
//update subvp force pstate
|
||||
if (hws && hws->funcs.subvp_update_force_pstate)
|
||||
dc->hwseq->funcs.subvp_update_force_pstate(dc, context);
|
||||
|
||||
// Program FORCE_ONE_ROW_FOR_FRAME and CURSOR_REQ_MODE for main subvp pipes
|
||||
for (i = 0; i < dc->res_pool->pipe_count; i++) {
|
||||
struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
|
||||
|
|
|
|||
|
|
@ -743,7 +743,7 @@ static const struct dc_debug_options debug_defaults_diags = {
|
|||
.dmub_command_table = true,
|
||||
.enable_tri_buf = true,
|
||||
.use_max_lb = true,
|
||||
.force_disable_subvp = true
|
||||
.force_disable_subvp = true,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = {
|
|||
.dppclk_mhz = 847.06,
|
||||
.phyclk_mhz = 810.0,
|
||||
.socclk_mhz = 953.0,
|
||||
.dscclk_mhz = 489.0,
|
||||
.dscclk_mhz = 300.0,
|
||||
.dram_speed_mts = 2400.0,
|
||||
},
|
||||
{
|
||||
|
|
@ -576,7 +576,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = {
|
|||
.dppclk_mhz = 960.00,
|
||||
.phyclk_mhz = 810.0,
|
||||
.socclk_mhz = 278.0,
|
||||
.dscclk_mhz = 287.67,
|
||||
.dscclk_mhz = 342.86,
|
||||
.dram_speed_mts = 2666.0,
|
||||
},
|
||||
{
|
||||
|
|
@ -587,7 +587,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_1_soc = {
|
|||
.dppclk_mhz = 1028.57,
|
||||
.phyclk_mhz = 810.0,
|
||||
.socclk_mhz = 715.0,
|
||||
.dscclk_mhz = 318.334,
|
||||
.dscclk_mhz = 369.23,
|
||||
.dram_speed_mts = 3200.0,
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4851,7 +4851,7 @@ void dml30_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
|
|||
v->SwathHeightYThisState[k],
|
||||
v->SwathHeightCThisState[k],
|
||||
v->HTotal[k] / v->PixelClock[k],
|
||||
v->UrgentLatency,
|
||||
v->UrgLatency[i],
|
||||
v->CursorBufferSize,
|
||||
v->CursorWidth[k][0],
|
||||
v->CursorBPP[k][0],
|
||||
|
|
|
|||
|
|
@ -5082,7 +5082,7 @@ void dml31_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_l
|
|||
v->SwathHeightYThisState[k],
|
||||
v->SwathHeightCThisState[k],
|
||||
v->HTotal[k] / v->PixelClock[k],
|
||||
v->UrgentLatency,
|
||||
v->UrgLatency[i],
|
||||
v->CursorBufferSize,
|
||||
v->CursorWidth[k][0],
|
||||
v->CursorBPP[k][0],
|
||||
|
|
|
|||
|
|
@ -5179,7 +5179,7 @@ void dml314_ModeSupportAndSystemConfigurationFull(struct display_mode_lib *mode_
|
|||
v->SwathHeightYThisState[k],
|
||||
v->SwathHeightCThisState[k],
|
||||
v->HTotal[k] / v->PixelClock[k],
|
||||
v->UrgentLatency,
|
||||
v->UrgLatency[i],
|
||||
v->CursorBufferSize,
|
||||
v->CursorWidth[k][0],
|
||||
v->CursorBPP[k][0],
|
||||
|
|
|
|||
|
|
@ -1683,8 +1683,9 @@ static void mode_support_configuration(struct vba_vars_st *v,
|
|||
&& mode_lib->vba.PTEBufferSizeNotExceeded[i][j] == true
|
||||
&& mode_lib->vba.DCCMetaBufferSizeNotExceeded[i][j] == true
|
||||
&& mode_lib->vba.NonsupportedDSCInputBPC == false
|
||||
&& mode_lib->vba.NotEnoughDETSwathFillLatencyHidingPerState[i][j] == false
|
||||
&& !mode_lib->vba.ExceededMALLSize
|
||||
&& (mode_lib->vba.NotEnoughDETSwathFillLatencyHidingPerState[i][j] == false
|
||||
|| i == v->soc.num_states - 1)
|
||||
&& ((mode_lib->vba.HostVMEnable == false
|
||||
&& !mode_lib->vba.ImmediateFlipRequiredFinal)
|
||||
|| mode_lib->vba.ImmediateFlipSupportedForState[i][j])
|
||||
|
|
|
|||
|
|
@ -1163,7 +1163,7 @@ struct vba_vars_st {
|
|||
double UrgBurstFactorLumaPre[DC__NUM_DPP__MAX];
|
||||
double UrgBurstFactorChromaPre[DC__NUM_DPP__MAX];
|
||||
bool NotUrgentLatencyHidingPre[DC__NUM_DPP__MAX];
|
||||
bool LinkCapacitySupport[DC__NUM_DPP__MAX];
|
||||
bool LinkCapacitySupport[DC__VOLTAGE_STATES];
|
||||
bool VREADY_AT_OR_AFTER_VSYNC[DC__NUM_DPP__MAX];
|
||||
unsigned int MIN_DST_Y_NEXT_START[DC__NUM_DPP__MAX];
|
||||
unsigned int VFrontPorch[DC__NUM_DPP__MAX];
|
||||
|
|
|
|||
|
|
@ -256,8 +256,8 @@ static const struct hw_factory_funcs funcs = {
|
|||
*/
|
||||
void dal_hw_factory_dcn32_init(struct hw_factory *factory)
|
||||
{
|
||||
factory->number_of_pins[GPIO_ID_DDC_DATA] = 6;
|
||||
factory->number_of_pins[GPIO_ID_DDC_CLOCK] = 6;
|
||||
factory->number_of_pins[GPIO_ID_DDC_DATA] = 8;
|
||||
factory->number_of_pins[GPIO_ID_DDC_CLOCK] = 8;
|
||||
factory->number_of_pins[GPIO_ID_GENERIC] = 4;
|
||||
factory->number_of_pins[GPIO_ID_HPD] = 5;
|
||||
factory->number_of_pins[GPIO_ID_GPIO_PAD] = 28;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user