All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.1 01/41] drm/amd/display: Do not set drr on pipe commit
@ 2023-07-24  1:20 ` Sasha Levin
  0 siblings, 0 replies; 66+ messages in thread
From: Sasha Levin @ 2023-07-24  1:20 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: wenjing.liu, dri-devel, mdaenzer, Jun.Lei, Sasha Levin,
	jiapeng.chong, Rodrigo Siqueira, amd-gfx, Alvin.Lee2, sunpeng.li,
	mwen, Daniel Wheeler, hersenxs.wu, sungjoon.kim, Dillon.Varone,
	Wesley Chalmers, qingqing.zhuo, Xinhui.Pan, Alex Deucher,
	christian.koenig

From: Wesley Chalmers <Wesley.Chalmers@amd.com>

[ Upstream commit e101bf95ea87ccc03ac2f48dfc0757c6364ff3c7 ]

[WHY]
Writing to DRR registers such as OTG_V_TOTAL_MIN on the same frame as a
pipe commit can cause underflow.

[HOW]
Move DMUB p-state delegate into optimze_bandwidth; enabling FAMS sets
optimized_required.

This change expects that Freesync requests are blocked when
optimized_required is true.

Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 6 ++++++
 drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index 2d49e99a152c4..7ff4a308152a0 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -2021,6 +2021,12 @@ void dcn20_optimize_bandwidth(
 	if (hubbub->funcs->program_compbuf_size)
 		hubbub->funcs->program_compbuf_size(hubbub, context->bw_ctx.bw.dcn.compbuf_size_kb, true);
 
+	if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) {
+		dc_dmub_srv_p_state_delegate(dc,
+			true, context);
+		context->bw_ctx.bw.dcn.clk.p_state_change_support = true;
+	}
+
 	dc->clk_mgr->funcs->update_clocks(
 			dc->clk_mgr,
 			context,
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
index a1b312483d7f1..c97d3e81a83d2 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_hwseq.c
@@ -987,11 +987,18 @@ void dcn30_set_disp_pattern_generator(const struct dc *dc,
 void dcn30_prepare_bandwidth(struct dc *dc,
  	struct dc_state *context)
 {
+	if (context->bw_ctx.bw.dcn.clk.fw_based_mclk_switching) {
+		dc->optimized_required = true;
+		context->bw_ctx.bw.dcn.clk.p_state_change_support = false;
+	}
+
 	if (dc->clk_mgr->dc_mode_softmax_enabled)
 		if (dc->clk_mgr->clks.dramclk_khz <= dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000 &&
 				context->bw_ctx.bw.dcn.clk.dramclk_khz > dc->clk_mgr->bw_params->dc_mode_softmax_memclk * 1000)
 			dc->clk_mgr->funcs->set_max_memclk(dc->clk_mgr, dc->clk_mgr->bw_params->clk_table.entries[dc->clk_mgr->bw_params->clk_table.num_entries - 1].memclk_mhz);
 
 	dcn20_prepare_bandwidth(dc, context);
+
+	dc_dmub_srv_p_state_delegate(dc, false, context);
 }
 
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 66+ messages in thread

end of thread, other threads:[~2023-07-24 10:47 UTC | newest]

Thread overview: 66+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24  1:20 [PATCH AUTOSEL 6.1 01/41] drm/amd/display: Do not set drr on pipe commit Sasha Levin
2023-07-24  1:20 ` Sasha Levin
2023-07-24  1:20 ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 02/41] drm/amdgpu: fix calltrace warning in amddrm_buddy_fini Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 03/41] drm/radeon: Fix integer overflow in radeon_cs_parser_init Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 04/41] drm/amdgpu: Fix integer overflow in amdgpu_cs_pass1 Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 05/41] drm/amdgpu: fix memory leak in mes self test Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 06/41] ALSA: emu10k1: roll up loops in DSP setup code for Audigy Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 07/41] ASoC: Intel: sof_sdw: add quirk for MTL RVP Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 08/41] ASoC: Intel: sof_sdw: add quirk for LNL RVP Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 09/41] PCI: tegra194: Fix possible array out of bounds access Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 10/41] ASoC: SOF: amd: Add pci revision id check Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 11/41] drm/stm: ltdc: fix late dereference check Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 12/41] drm: rcar-du: remove R-Car H3 ES1.* workarounds Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 13/41] ASoC: amd: vangogh: Add check for acp config flags in vangogh platform Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 14/41] ARM: dts: imx6dl: prtrvt, prtvt7, prti6q, prtwd2: fix USB related warnings Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 15/41] ASoC: Intel: sof_sdw_rt_sdca_jack_common: test SOF_JACK_JDSRC in _exit Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 16/41] ASoC: Intel: sof_sdw: Add support for Rex soundwire Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 17/41] iopoll: Call cpu_relax() in busy loops Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 18/41] quota: Properly disable quotas when add_dquot_ref() fails Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 19/41] quota: fix warning in dqgrab() Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 20/41] ALSA: hda: Add Loongson LS7A HD-Audio support Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 21/41] ASoC: SOF: Intel: fix SoundWire/HDaudio mutual exclusion Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 22/41] dma-remap: use kvmalloc_array/kvfree for larger dma memory remap Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 23/41] accel/habanalabs: add pci health check during heartbeat Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 24/41] HID: logitech-hidpp: Add USB and Bluetooth IDs for the Logitech G915 TKL Keyboard Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 25/41] iommu/amd: Introduce Disable IRTE Caching Support Sasha Levin
2023-07-24  1:20 ` [PATCH AUTOSEL 6.1 26/41] drm/amdgpu: install stub fence into potential unused fence pointers Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:20   ` Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 27/41] drm/amd/display: Apply 60us prefetch for DCFCLK <= 300Mhz Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 28/41] Revert "drm/amd/display: Do not set drr on pipe commit" Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24 10:46   ` Michel Dänzer
2023-07-24 10:46     ` Michel Dänzer
2023-07-24 10:46     ` Michel Dänzer
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 29/41] HID: add quirk for 03f0:464a HP Elite Presenter Mouse Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 30/41] RDMA/mlx5: Return the firmware result upon destroying QP/RQ Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 31/41] drm/amd/display: Skip DPP DTO update if root clock is gated Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 32/41] drm/amd/display: Enable dcn314 DPP RCO Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21   ` Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 33/41] ASoC: SOF: core: Free the firmware trace before calling snd_sof_shutdown() Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 34/41] ovl: check type and offset of struct vfsmount in ovl_entry Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 35/41] HID: intel-ish-hid: ipc: Add Arrow Lake PCI device ID Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 36/41] udf: Fix uninitialized array access for some pathnames Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 37/41] ALSA: hda/realtek: Add quirks for ROG ALLY CS35l41 audio Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 38/41] fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 39/41] MIPS: dec: prom: Address -Warray-bounds warning Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 40/41] FS: JFS: Fix null-ptr-deref Read in txBegin Sasha Levin
2023-07-24  1:21 ` [PATCH AUTOSEL 6.1 41/41] FS: JFS: Check for read-only mounted filesystem " Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.