* [PATCH 00/10] DC Patches October 14, 2024
@ 2024-10-15 8:17 Wayne Lin
2024-10-15 8:17 ` [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations Wayne Lin
` (10 more replies)
0 siblings, 11 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Wayne Lin
This DC patchset brings improvements in multiple areas. In summary, we have:
- Fix dcn401 idle optimization problem
- Fix cursor corruption on dcn35
- Fix DP LL compliance failures
- Fix SubVP Phantom VBlank End calculation
Cc: Daniel Wheeler <daniel.wheeler@amd.com>
---
Aric Cyr (1):
drm/amd/display: 3.2.306
Aurabindo Pillai (3):
drm/amd/display: temp w/a for dGPU to enter idle optimizations
drm/amd/display: Reuse subvp enable check for DCN401
drm/amd/display: temp w/a for DP Link Layer compliance
Bhuvanachandra Pinninti (1):
drm/amd/display: To change dcn301_init.h guard.
Dillon Varone (1):
drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21
Fangzhi Zuo (1):
drm/amd/display: Add a Precise Delay Routine
Leo Chen (1):
drm/amd/display: Adding array index check to prevent memory corruption
Samson Tam (1):
drm/amd/display: update fullscreen status to SPL
Yihan Zhu (1):
drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
.../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 13 +++++++++++
.../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 6 +++--
drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
.../gpu/drm/amd/display/dc/dc_spl_translate.c | 2 +-
drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 +++
.../dc/dml2/dml21/dml21_translation_helper.c | 1 -
.../dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 1 +
.../dml21/src/dml2_core/dml2_core_utils.c | 1 +
.../drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h | 1 +
.../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h | 1 +
.../drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c | 22 +++++++++++++++----
.../amd/display/dc/hwss/dcn301/dcn301_init.h | 4 ++--
.../dc/link/protocols/link_dp_training.c | 2 +-
.../dc/resource/dcn401/dcn401_resource.c | 3 ++-
16 files changed, 56 insertions(+), 14 deletions(-)
--
2.37.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 13:14 ` Mario Limonciello
2024-10-15 8:17 ` [PATCH 02/10] drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35 Wayne Lin
` (9 subsequent siblings)
10 siblings, 1 reply; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Mario Limonciello,
Alex Deucher, stable
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
[Why&How]
vblank immediate disable currently does not work for all asics. On
DCN401, the vblank interrupts never stop coming, and hence we never
get a chance to trigger idle optimizations.
Add a workaround to enable immediate disable only on APUs for now. This
adds a 2-frame delay for triggering idle optimization, which is a
negligible overhead.
Fixes: db11e20a1144 ("drm/amd/display: use a more lax vblank enable policy for older ASICs")
Fixes: 6dfb3a42a914 ("drm/amd/display: use a more lax vblank enable policy for DCN35+")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a4882b16ace2..6ea54eb5d68d 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -8379,7 +8379,8 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
IP_VERSION(3, 5, 0) ||
acrtc_state->stream->link->psr_settings.psr_version <
- DC_PSR_VERSION_UNSUPPORTED) {
+ DC_PSR_VERSION_UNSUPPORTED ||
+ !(adev->flags & AMD_IS_APU)) {
timing = &acrtc_state->stream->timing;
/* at least 2 frames */
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/10] drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
2024-10-15 8:17 ` [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 03/10] drm/amd/display: Reuse subvp enable check for DCN401 Wayne Lin
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Yihan Zhu,
Nicholas Kazlauskas
From: Yihan Zhu <Yihan.Zhu@amd.com>
[WHY & HOW]
Cursor corruption observed on USBC display with specific system setup with a
reboot. Cursor memory might still in the lightsleep state due to voltage
issue, we need program DISPCLK_R_GATE_DISABLE to avoid this issue only on
DCN35.
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Yihan Zhu <Yihan.Zhu@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
.../drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h | 1 +
.../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h | 1 +
.../drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c | 22 +++++++++++++++----
3 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h b/drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h
index cd1706d301e7..f09cba8e29cc 100644
--- a/drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h
+++ b/drivers/gpu/drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h
@@ -690,6 +690,7 @@ struct dcn20_dpp {
int lb_memory_size;
int lb_bits_per_entry;
bool is_write_to_ram_a_safe;
+ bool dispclk_r_gate_disable;
struct scaler_data scl_data;
struct pwl_params pwl_data;
};
diff --git a/drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h b/drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h
index b110f35ef66b..f236824126e9 100644
--- a/drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h
+++ b/drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h
@@ -572,6 +572,7 @@ struct dcn3_dpp {
int lb_memory_size;
int lb_bits_per_entry;
bool is_write_to_ram_a_safe;
+ bool dispclk_r_gate_disable;
struct scaler_data scl_data;
struct pwl_params pwl_data;
};
diff --git a/drivers/gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c b/drivers/gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
index 9f885a03eec6..62b7012cda43 100644
--- a/drivers/gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
+++ b/drivers/gpu/drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c
@@ -50,11 +50,21 @@ void dpp35_dppclk_control(
DPPCLK_RATE_CONTROL, dppclk_div,
DPP_CLOCK_ENABLE, 1);
else
- REG_UPDATE(DPP_CONTROL,
- DPP_CLOCK_ENABLE, 1);
+ if (dpp->dispclk_r_gate_disable)
+ REG_UPDATE_2(DPP_CONTROL,
+ DPP_CLOCK_ENABLE, 1,
+ DISPCLK_R_GATE_DISABLE, 1);
+ else
+ REG_UPDATE(DPP_CONTROL,
+ DPP_CLOCK_ENABLE, 1);
} else
- REG_UPDATE(DPP_CONTROL,
- DPP_CLOCK_ENABLE, 0);
+ if (dpp->dispclk_r_gate_disable)
+ REG_UPDATE_2(DPP_CONTROL,
+ DPP_CLOCK_ENABLE, 0,
+ DISPCLK_R_GATE_DISABLE, 0);
+ else
+ REG_UPDATE(DPP_CONTROL,
+ DPP_CLOCK_ENABLE, 0);
}
void dpp35_program_bias_and_scale_fcnv(
@@ -126,6 +136,10 @@ bool dpp35_construct(
(const struct dcn3_dpp_mask *)(tf_mask));
dpp->base.funcs = &dcn35_dpp_funcs;
+
+ // w/a for cursor memory stuck in LS by programming DISPCLK_R_GATE_DISABLE, limit w/a to some ASIC revs
+ if (dpp->base.ctx->asic_id.hw_internal_rev <= 0x10)
+ dpp->dispclk_r_gate_disable = true;
return ret;
}
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/10] drm/amd/display: Reuse subvp enable check for DCN401
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
2024-10-15 8:17 ` [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations Wayne Lin
2024-10-15 8:17 ` [PATCH 02/10] drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35 Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 04/10] drm/amd/display: Adding array index check to prevent memory corruption Wayne Lin
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
Reuse subvp enable check from DCN32 for IGT testing of Sub-Viewport
feature on DCN401
Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
.../gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
index 46feff9348d9..b2e59e97818a 100644
--- a/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/resource/dcn401/dcn401_resource.c
@@ -1579,7 +1579,8 @@ static void dcn401_destroy_resource_pool(struct resource_pool **pool)
}
static struct dc_cap_funcs cap_funcs = {
- .get_dcc_compression_cap = dcn20_get_dcc_compression_cap
+ .get_dcc_compression_cap = dcn20_get_dcc_compression_cap,
+ .get_subvp_en = dcn32_subvp_in_use,
};
static void dcn401_update_bw_bounding_box(struct dc *dc, struct clk_bw_params *bw_params)
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/10] drm/amd/display: Adding array index check to prevent memory corruption
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (2 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 03/10] drm/amd/display: Reuse subvp enable check for DCN401 Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 05/10] drm/amd/display: temp w/a for DP Link Layer compliance Wayne Lin
` (6 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Leo Chen,
Charlene Liu, Nicholas Kazlauskas
From: Leo Chen <leo.chen@amd.com>
[Why & How]
Array indices out of bound caused memory corruption. Adding checks to
ensure that array index stays in bound.
Reviewed-by: Charlene Liu <charlene.liu@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Leo Chen <leo.chen@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
.../gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
index b46a3afe48ca..7d68006137a9 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c
@@ -257,11 +257,11 @@ static void dcn35_notify_host_router_bw(struct clk_mgr *clk_mgr_base, struct dc_
struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
uint32_t host_router_bw_kbps[MAX_HOST_ROUTERS_NUM] = { 0 };
int i;
-
for (i = 0; i < context->stream_count; ++i) {
const struct dc_stream_state *stream = context->streams[i];
const struct dc_link *link = stream->link;
- uint8_t lowest_dpia_index = 0, hr_index = 0;
+ uint8_t lowest_dpia_index = 0;
+ unsigned int hr_index = 0;
if (!link)
continue;
@@ -271,6 +271,8 @@ static void dcn35_notify_host_router_bw(struct clk_mgr *clk_mgr_base, struct dc_
continue;
hr_index = (link->link_index - lowest_dpia_index) / 2;
+ if (hr_index >= MAX_HOST_ROUTERS_NUM)
+ continue;
host_router_bw_kbps[hr_index] += dc_bandwidth_in_kbps_from_timing(
&stream->timing, dc_link_get_highest_encoding_format(link));
}
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/10] drm/amd/display: temp w/a for DP Link Layer compliance
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (3 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 04/10] drm/amd/display: Adding array index check to prevent memory corruption Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 06/10] drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21 Wayne Lin
` (5 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Mario Limonciello,
Alex Deucher, stable, Dillon Varone
From: Aurabindo Pillai <aurabindo.pillai@amd.com>
[Why&How]
Disabling P-State support on full updates for DCN401 results in
introducing additional communication with SMU. A UCLK hard min message
to SMU takes 4 seconds to go through, which was due to DCN not allowing
pstate switch, which was caused by incorrect value for TTU watermark
before blanking the HUBP prior to DPG on for servicing the test request.
Fix the issue temporarily by disallowing pstate changes for compliance
test while test request handler is reworked for a proper fix.
Fixes: 67ea53a4bd9d ("drm/amd/display: Disable DCN401 UCLK P-State support on full updates")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
.../drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
index 8eaf292bc4eb..b0fea0856866 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
@@ -46,6 +46,7 @@
#include "dm_helpers.h"
#include "ddc_service_types.h"
+#include "clk_mgr.h"
static u32 edid_extract_panel_id(struct edid *edid)
{
@@ -1181,6 +1182,8 @@ bool dm_helpers_dp_handle_test_pattern_request(
struct pipe_ctx *pipe_ctx = NULL;
struct amdgpu_dm_connector *aconnector = link->priv;
struct drm_device *dev = aconnector->base.dev;
+ struct dc_state *dc_state = ctx->dc->current_state;
+ struct clk_mgr *clk_mgr = ctx->dc->clk_mgr;
int i;
for (i = 0; i < MAX_PIPES; i++) {
@@ -1281,6 +1284,16 @@ bool dm_helpers_dp_handle_test_pattern_request(
pipe_ctx->stream->test_pattern.type = test_pattern;
pipe_ctx->stream->test_pattern.color_space = test_pattern_color_space;
+ /* Temp W/A for compliance test failure */
+ dc_state->bw_ctx.bw.dcn.clk.p_state_change_support = false;
+ dc_state->bw_ctx.bw.dcn.clk.dramclk_khz = clk_mgr->dc_mode_softmax_enabled ?
+ clk_mgr->bw_params->dc_mode_softmax_memclk : clk_mgr->bw_params->max_memclk_mhz;
+ dc_state->bw_ctx.bw.dcn.clk.idle_dramclk_khz = dc_state->bw_ctx.bw.dcn.clk.dramclk_khz;
+ ctx->dc->clk_mgr->funcs->update_clocks(
+ ctx->dc->clk_mgr,
+ dc_state,
+ false);
+
dc_link_dp_set_test_pattern(
(struct dc_link *) link,
test_pattern,
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/10] drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (4 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 05/10] drm/amd/display: temp w/a for DP Link Layer compliance Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 07/10] drm/amd/display: Add a Precise Delay Routine Wayne Lin
` (4 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Dillon Varone,
Alvin Lee
From: Dillon Varone <dillon.varone@amd.com>
[WHY]
The phantom stream timing is copied from the main stream as most
parameters are identical, however some need to be recalculated.
Currently VBlank End is not recalculated and copied from the main
incorrectly.
[HOW]
Recalculate VBlank End for phantom stream timing.
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
.../drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 1 +
.../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c
index 0aa4e4d343b0..3d41ffde91c1 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.c
@@ -159,6 +159,7 @@ static void create_phantom_stream_from_main_stream(struct dml2_stream_parameters
phantom->timing.v_total = meta->v_total;
phantom->timing.v_active = meta->v_active;
phantom->timing.v_front_porch = meta->v_front_porch;
+ phantom->timing.v_blank_end = phantom->timing.v_total - phantom->timing.v_front_porch - phantom->timing.v_active;
phantom->timing.vblank_nom = phantom->timing.v_total - phantom->timing.v_active;
phantom->timing.drr_config.enabled = false;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c
index ab229e1598ae..714b5c39b7e6 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_utils.c
@@ -425,6 +425,7 @@ static void create_phantom_stream_from_main_stream(struct dml2_stream_parameters
phantom->timing.v_total = meta->v_total;
phantom->timing.v_active = meta->v_active;
phantom->timing.v_front_porch = meta->v_front_porch;
+ phantom->timing.v_blank_end = phantom->timing.v_total - phantom->timing.v_front_porch - phantom->timing.v_active;
phantom->timing.vblank_nom = phantom->timing.v_total - phantom->timing.v_active;
phantom->timing.drr_config.enabled = false;
}
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/10] drm/amd/display: Add a Precise Delay Routine
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (5 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 06/10] drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21 Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 08/10] drm/amd/display: update fullscreen status to SPL Wayne Lin
` (3 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Fangzhi Zuo,
Aric Cyr
From: Fangzhi Zuo <Jerry.Zuo@amd.com>
Fix DP compliance failures 4.2.2.12, 4.3.1.21, 4.9.1.19
caused by imprecise delay on fsleep().
Reviewed-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Fangzhi Zuo <Jerry.Zuo@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
.../gpu/drm/amd/display/dc/link/protocols/link_dp_training.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
index a42c56a57253..754c895e1bfb 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training.c
@@ -272,7 +272,7 @@ void dp_wait_for_training_aux_rd_interval(
struct dc_link *link,
uint32_t wait_in_micro_secs)
{
- fsleep(wait_in_micro_secs);
+ usleep_range_state(wait_in_micro_secs, wait_in_micro_secs, TASK_UNINTERRUPTIBLE);
DC_LOG_HW_LINK_TRAINING("%s:\n wait = %d\n",
__func__,
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/10] drm/amd/display: update fullscreen status to SPL
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (6 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 07/10] drm/amd/display: Add a Precise Delay Routine Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 09/10] drm/amd/display: To change dcn301_init.h guard Wayne Lin
` (2 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Samson Tam,
Alvin Lee
From: Samson Tam <Samson.Tam@amd.com>
[Why]
Current fullscreen check in SPL using dm_helpers is out-of-sync
with dc state. This causes an issue during minimal transition
where we pick an invalid intermediate state because the pre and
post fullscreen status are different.
[How]
Add sharpening_required flag to dc_stream_state. Use this flag to
indicate if we are in fullscreen or not. Propagate flag to SPL for
fullscreen status. Remove workaround in DML
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++
drivers/gpu/drm/amd/display/dc/dc_spl_translate.c | 2 +-
drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 +++
.../drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c | 1 -
4 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 743f3292d98e..5a12fc75f97f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2756,6 +2756,9 @@ static enum surface_update_type check_update_surfaces_for_stream(
if (stream_update->scaler_sharpener_update)
su_flags->bits.scaler_sharpener = 1;
+ if (stream_update->sharpening_required)
+ su_flags->bits.sharpening_required = 1;
+
if (su_flags->raw != 0)
overall_type = UPDATE_TYPE_FULL;
@@ -3107,6 +3110,8 @@ static void copy_stream_update_to_stream(struct dc *dc,
}
if (update->scaler_sharpener_update)
stream->scaler_sharpener_update = *update->scaler_sharpener_update;
+ if (update->sharpening_required)
+ stream->sharpening_required = *update->sharpening_required;
}
static void backup_planes_and_stream_state(
diff --git a/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c b/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c
index eeffe44be9e3..24aa9df892f3 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c
+++ b/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c
@@ -195,7 +195,7 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct spl
/* Check if it is stream is in fullscreen and if its HDR.
* Use this to determine sharpness levels
*/
- spl_in->is_fullscreen = dm_helpers_is_fullscreen(pipe_ctx->stream->ctx, pipe_ctx->stream);
+ spl_in->is_fullscreen = pipe_ctx->stream->sharpening_required;
spl_in->is_hdr_on = dm_helpers_is_hdr_on(pipe_ctx->stream->ctx, pipe_ctx->stream);
spl_in->sdr_white_level_nits = plane_state->sdr_white_level_nits;
}
diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h
index 14ea47eda0c8..413970588a26 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_stream.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h
@@ -143,6 +143,7 @@ union stream_update_flags {
uint32_t crtc_timing_adjust : 1;
uint32_t fams_changed : 1;
uint32_t scaler_sharpener : 1;
+ uint32_t sharpening_required : 1;
} bits;
uint32_t raw;
@@ -310,6 +311,7 @@ struct dc_stream_state {
struct luminance_data lumin_data;
bool scaler_sharpener_update;
+ bool sharpening_required;
};
#define ABM_LEVEL_IMMEDIATE_DISABLE 255
@@ -356,6 +358,7 @@ struct dc_stream_update {
struct dc_cursor_position *cursor_position;
bool *hw_cursor_req;
bool *scaler_sharpener_update;
+ bool *sharpening_required;
};
bool dc_is_stream_unchanged(
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
index d901b9f7bc6a..7a01a956e4bb 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
@@ -514,7 +514,6 @@ static void populate_dml21_stream_overrides_from_stream_state(
break;
}
if (!stream->ctx->dc->debug.enable_single_display_2to1_odm_policy ||
- ((stream->ctx->dc->debug.force_sharpness > 1) && stream->ctx->dc->config.use_spl) ||
stream->debug.force_odm_combine_segments > 0)
stream_desc->overrides.disable_dynamic_odm = true;
stream_desc->overrides.disable_subvp = stream->ctx->dc->debug.force_disable_subvp || stream->hw_cursor_req;
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/10] drm/amd/display: To change dcn301_init.h guard.
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (7 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 08/10] drm/amd/display: update fullscreen status to SPL Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-15 8:17 ` [PATCH 10/10] drm/amd/display: 3.2.306 Wayne Lin
2024-10-17 18:44 ` [PATCH 00/10] DC Patches October 14, 2024 Wheeler, Daniel
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler,
Bhuvanachandra Pinninti, Dillon Varone
From: Bhuvanachandra Pinninti <bpinnint@amd.com>
[why & How]
The original guard is wrongly to be set as for dcn30.
Changed it from 30 to 301.
Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Bhuvanachandra Pinninti <bpinnint@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.h b/drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.h
index 0bca48ccbfa2..a6e0115a53ee 100644
--- a/drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.h
+++ b/drivers/gpu/drm/amd/display/dc/hwss/dcn301/dcn301_init.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef __DC_DCN30_INIT_H__
-#define __DC_DCN30_INIT_H__
+#ifndef __DC_DCN301_INIT_H__
+#define __DC_DCN301_INIT_H__
struct dc;
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/10] drm/amd/display: 3.2.306
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (8 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 09/10] drm/amd/display: To change dcn301_init.h guard Wayne Lin
@ 2024-10-15 8:17 ` Wayne Lin
2024-10-17 18:44 ` [PATCH 00/10] DC Patches October 14, 2024 Wheeler, Daniel
10 siblings, 0 replies; 15+ messages in thread
From: Wayne Lin @ 2024-10-15 8:17 UTC (permalink / raw)
To: amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Wayne Lin, Tom Chung, Fangzhi Zuo,
Zaeem Mohamed, Solomon Chiu, Daniel Wheeler, Aric Cyr
From: Aric Cyr <aric.cyr@amd.com>
This version brings along following fixes:
- Fix dcn401 idle optimization problem
- Fix cursor corruption on dcn35
- Fix DP LL compliance failures
- Fix SubVP Phantom VBlank End calculation
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Aric Cyr <aric.cyr@amd.com>
Signed-off-by: Wayne Lin <wayne.lin@amd.com>
---
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 6ba167d4c785..6d76dc110d38 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -55,7 +55,7 @@ struct aux_payload;
struct set_config_cmd_payload;
struct dmub_notification;
-#define DC_VER "3.2.305"
+#define DC_VER "3.2.306"
#define MAX_SURFACES 3
#define MAX_PLANES 6
--
2.37.3
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations
2024-10-15 8:17 ` [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations Wayne Lin
@ 2024-10-15 13:14 ` Mario Limonciello
2024-10-16 13:13 ` Pillai, Aurabindo
0 siblings, 1 reply; 15+ messages in thread
From: Mario Limonciello @ 2024-10-15 13:14 UTC (permalink / raw)
To: Wayne Lin, amd-gfx
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Hamza Mahfooz,
Aurabindo Pillai, Roman Li, Tom Chung, Fangzhi Zuo, Zaeem Mohamed,
Solomon Chiu, Daniel Wheeler, Alex Deucher, stable
On 10/15/2024 03:17, Wayne Lin wrote:
> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>
> [Why&How]
> vblank immediate disable currently does not work for all asics. On
> DCN401, the vblank interrupts never stop coming, and hence we never
> get a chance to trigger idle optimizations.
>
> Add a workaround to enable immediate disable only on APUs for now. This
> adds a 2-frame delay for triggering idle optimization, which is a
> negligible overhead.
>
> Fixes: db11e20a1144 ("drm/amd/display: use a more lax vblank enable policy for older ASICs")
> Fixes: 6dfb3a42a914 ("drm/amd/display: use a more lax vblank enable policy for DCN35+")
>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Signed-off-by: Wayne Lin <wayne.lin@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index a4882b16ace2..6ea54eb5d68d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8379,7 +8379,8 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
> if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
> IP_VERSION(3, 5, 0) ||
> acrtc_state->stream->link->psr_settings.psr_version <
> - DC_PSR_VERSION_UNSUPPORTED) {
> + DC_PSR_VERSION_UNSUPPORTED ||
> + !(adev->flags & AMD_IS_APU)) {
> timing = &acrtc_state->stream->timing;
>
> /* at least 2 frames */
Considering the regression raised [1] is on an APU too I wonder if this
is really the best workaround to approach to this issue.
https://lore.kernel.org/amd-gfx/9b80e957-f20a-4bd7-a40b-2b5f1decf5a4@johnrowley.me/
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations
2024-10-15 13:14 ` Mario Limonciello
@ 2024-10-16 13:13 ` Pillai, Aurabindo
2024-10-16 13:15 ` Mario Limonciello
0 siblings, 1 reply; 15+ messages in thread
From: Pillai, Aurabindo @ 2024-10-16 13:13 UTC (permalink / raw)
To: Limonciello, Mario, Lin, Wayne, amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry, Li, Sun peng (Leo), Siqueira, Rodrigo,
Mahfooz, Hamza, Li, Roman, Chung, ChiaHsuan (Tom), Zuo, Jerry,
Mohamed, Zaeem, Chiu, Solomon, Wheeler, Daniel,
Deucher, Alexander, stable@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 3409 bytes --]
[Public]
Hi Mario,
Hamza is working on the reported issue and appears to be due to a different root cause. Hence, we're expecting that the fix for that issue is likely going to be different, with what we know so far. While that issue is being debugged, this patch will allow us to have better idle power consumption on dGPUs
--
Regards,
Jay
________________________________
From: Limonciello, Mario <Mario.Limonciello@amd.com>
Sent: Tuesday, October 15, 2024 9:14 AM
To: Lin, Wayne <Wayne.Lin@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Li, Roman <Roman.Li@amd.com>; Chung, ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>; Mohamed, Zaeem <Zaeem.Mohamed@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Wheeler, Daniel <Daniel.Wheeler@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; stable@vger.kernel.org <stable@vger.kernel.org>
Subject: Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations
On 10/15/2024 03:17, Wayne Lin wrote:
> From: Aurabindo Pillai <aurabindo.pillai@amd.com>
>
> [Why&How]
> vblank immediate disable currently does not work for all asics. On
> DCN401, the vblank interrupts never stop coming, and hence we never
> get a chance to trigger idle optimizations.
>
> Add a workaround to enable immediate disable only on APUs for now. This
> adds a 2-frame delay for triggering idle optimization, which is a
> negligible overhead.
>
> Fixes: db11e20a1144 ("drm/amd/display: use a more lax vblank enable policy for older ASICs")
> Fixes: 6dfb3a42a914 ("drm/amd/display: use a more lax vblank enable policy for DCN35+")
>
> Cc: Mario Limonciello <mario.limonciello@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> Signed-off-by: Wayne Lin <wayne.lin@amd.com>
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index a4882b16ace2..6ea54eb5d68d 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8379,7 +8379,8 @@ static void manage_dm_interrupts(struct amdgpu_device *adev,
> if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
> IP_VERSION(3, 5, 0) ||
> acrtc_state->stream->link->psr_settings.psr_version <
> - DC_PSR_VERSION_UNSUPPORTED) {
> + DC_PSR_VERSION_UNSUPPORTED ||
> + !(adev->flags & AMD_IS_APU)) {
> timing = &acrtc_state->stream->timing;
>
> /* at least 2 frames */
Considering the regression raised [1] is on an APU too I wonder if this
is really the best workaround to approach to this issue.
https://lore.kernel.org/amd-gfx/9b80e957-f20a-4bd7-a40b-2b5f1decf5a4@johnrowley.me/
[-- Attachment #2: Type: text/html, Size: 7047 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations
2024-10-16 13:13 ` Pillai, Aurabindo
@ 2024-10-16 13:15 ` Mario Limonciello
0 siblings, 0 replies; 15+ messages in thread
From: Mario Limonciello @ 2024-10-16 13:15 UTC (permalink / raw)
To: Pillai, Aurabindo, Lin, Wayne, amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry, Li, Sun peng (Leo), Siqueira, Rodrigo,
Mahfooz, Hamza, Li, Roman, Chung, ChiaHsuan (Tom), Zuo, Jerry,
Mohamed, Zaeem, Chiu, Solomon, Wheeler, Daniel,
Deucher, Alexander, stable@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 3780 bytes --]
Jay,
Got it, thanks for confirming.
Thanks,
On 10/16/2024 08:13, Pillai, Aurabindo wrote:
>
> [Public]
>
>
>
> Hi Mario,
>
> Hamza is working on the reported issue and appears to be due to a
> different root cause. Hence, we're expecting that the fix for that
> issue is likely going to be different, with what we know so far. While
> that issue is being debugged, this patch will allow us to have better
> idle power consumption on dGPUs
>
>
> --
>
> Regards,
> Jay
> ------------------------------------------------------------------------
> *From:* Limonciello, Mario <Mario.Limonciello@amd.com>
> *Sent:* Tuesday, October 15, 2024 9:14 AM
> *To:* Lin, Wayne <Wayne.Lin@amd.com>; amd-gfx@lists.freedesktop.org
> <amd-gfx@lists.freedesktop.org>
> *Cc:* Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo)
> <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>;
> Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Pillai, Aurabindo
> <Aurabindo.Pillai@amd.com>; Li, Roman <Roman.Li@amd.com>; Chung,
> ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com>; Zuo, Jerry
> <Jerry.Zuo@amd.com>; Mohamed, Zaeem <Zaeem.Mohamed@amd.com>; Chiu,
> Solomon <Solomon.Chiu@amd.com>; Wheeler, Daniel
> <Daniel.Wheeler@amd.com>; Deucher, Alexander
> <Alexander.Deucher@amd.com>; stable@vger.kernel.org
> <stable@vger.kernel.org>
> *Subject:* Re: [PATCH 01/10] drm/amd/display: temp w/a for dGPU to
> enter idle optimizations
> On 10/15/2024 03:17, Wayne Lin wrote:
> > From: Aurabindo Pillai <aurabindo.pillai@amd.com>
> >
> > [Why&How]
> > vblank immediate disable currently does not work for all asics. On
> > DCN401, the vblank interrupts never stop coming, and hence we never
> > get a chance to trigger idle optimizations.
> >
> > Add a workaround to enable immediate disable only on APUs for now. This
> > adds a 2-frame delay for triggering idle optimization, which is a
> > negligible overhead.
> >
> > Fixes: db11e20a1144 ("drm/amd/display: use a more lax vblank enable
> policy for older ASICs")
> > Fixes: 6dfb3a42a914 ("drm/amd/display: use a more lax vblank enable
> policy for DCN35+")
> >
> > Cc: Mario Limonciello <mario.limonciello@amd.com>
> > Cc: Alex Deucher <alexander.deucher@amd.com>
> > Cc: stable@vger.kernel.org
> > Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> > Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
> > Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com>
> > Signed-off-by: Wayne Lin <wayne.lin@amd.com>
> > ---
> > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > index a4882b16ace2..6ea54eb5d68d 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -8379,7 +8379,8 @@ static void manage_dm_interrupts(struct
> amdgpu_device *adev,
> > if (amdgpu_ip_version(adev, DCE_HWIP, 0) <
> > IP_VERSION(3, 5, 0) ||
> > acrtc_state->stream->link->psr_settings.psr_version <
> > - DC_PSR_VERSION_UNSUPPORTED) {
> > + DC_PSR_VERSION_UNSUPPORTED ||
> > + !(adev->flags & AMD_IS_APU)) {
> > timing = &acrtc_state->stream->timing;
> >
> > /* at least 2 frames */
>
> Considering the regression raised [1] is on an APU too I wonder if this
> is really the best workaround to approach to this issue.
>
> https://lore.kernel.org/amd-gfx/9b80e957-f20a-4bd7-a40b-2b5f1decf5a4@johnrowley.me/
[-- Attachment #2: Type: text/html, Size: 11204 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: [PATCH 00/10] DC Patches October 14, 2024
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
` (9 preceding siblings ...)
2024-10-15 8:17 ` [PATCH 10/10] drm/amd/display: 3.2.306 Wayne Lin
@ 2024-10-17 18:44 ` Wheeler, Daniel
10 siblings, 0 replies; 15+ messages in thread
From: Wheeler, Daniel @ 2024-10-17 18:44 UTC (permalink / raw)
To: Lin, Wayne, amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry, Li, Sun peng (Leo), Siqueira, Rodrigo,
Mahfooz, Hamza, Pillai, Aurabindo, Li, Roman, Lin, Wayne,
Chung, ChiaHsuan (Tom), Zuo, Jerry, Mohamed, Zaeem, Chiu, Solomon,
Lin, Wayne
[Public]
Hi all,
This week this patchset was tested on 4 systems, two dGPU and two APU based, and tested across multiple display and connection types.
APU
* Single Display eDP -> 1080p 60hz, 2560x1600 120hz, 1920x1200 165hz
* Single Display DP -> 4k144hz, 4k240hz
* Multi display -> eDP + DP/HDMI/USB-C -> 1080p 60hz eDP + 4k 144hz, 4k 240hz (Includes USB-C to DP/HDMI adapters)
* Thunderbolt -> LG Ultrafine 5k
* DSC -> Cable Matters 101075 (DP to 3x DP) with 3x 4k60hz displays, HP Hook G2 with 3x 4k60hz displays (2x DP, 1x USB-C)
* USB 4 -> HP Hook G4, Lenovo Thunderbolt Dock, both with 2x 4k60hz DP and 1x 4k60hz HDMI displays
* PCON -> Club3D CAC-1085 + 1x 4k 144hz
DGPU
* Single Display DP -> 4k144hz, 4k240hz
* Multiple Display DP -> 4k240hz + 4k144hz
* MST (Startech MST14DP123DP [DP to 3x DP] and 2x 4k 60hz displays)
* DSC (with Cable Matters 101075 [DP to 3x DP] with 3x 4k60hz displays)
The testing is a mix of automated and manual tests. Manual testing includes (but is not limited to)
* Changing display configurations and settings
* Video/Audio playback
* Benchmark testing
* Suspend/Resume testing
* Feature testing (Freesync, HDCP, etc.)
Automated testing includes (but is not limited to)
* Script testing (scripts to automate some of the manual checks)
* IGT testing
The testing is mainly tested on the following displays, but occasionally there are tests with other displays
* Samsung G8 Neo 4k240hz
* Samsung QN55QN95B 4k 120hz
* Acer XV322QKKV 4k144hz
* HP U27 4k Wireless 4k60hz
* LG 27UD58B 4k60hz
* LG 32UN650WA 4k60hz
* LG Ultrafine 5k 5k60hz
* AU Optronics B140HAN01.1 1080p 60hz eDP
* AU Optronics B160UAN01.J 1920x1200 165hz eDP
* AU Optronics B160QAN02.L 2560x1600 120hz eDP
The patchset consists of the amd-staging-drm-next branch (Head commit - 3631f572ee38bed4c3d0a9003570c63eaa9fd4e3 -> drm/amdgpu/swsmu: add automatic parameter to set_soft_freq_range) with new patches added on top of it.
Tested on Ubuntu 24.04.1, on Wayland and X11, using KDE Plasma and Gnome.
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Thank you,
Dan Wheeler
Sr. Technologist | AMD
SW Display
------------------------------------------------------------------------------------------------------------------
1 Commerce Valley Dr E, Thornhill, ON L3T 7X6
amd.com
-----Original Message-----
From: Wayne Lin <Wayne.Lin@amd.com>
Sent: Tuesday, October 15, 2024 4:17 AM
To: amd-gfx@lists.freedesktop.org
Cc: Wentland, Harry <Harry.Wentland@amd.com>; Li, Sun peng (Leo) <Sunpeng.Li@amd.com>; Siqueira, Rodrigo <Rodrigo.Siqueira@amd.com>; Mahfooz, Hamza <Hamza.Mahfooz@amd.com>; Pillai, Aurabindo <Aurabindo.Pillai@amd.com>; Li, Roman <Roman.Li@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>; Chung, ChiaHsuan (Tom) <ChiaHsuan.Chung@amd.com>; Zuo, Jerry <Jerry.Zuo@amd.com>; Mohamed, Zaeem <Zaeem.Mohamed@amd.com>; Chiu, Solomon <Solomon.Chiu@amd.com>; Wheeler, Daniel <Daniel.Wheeler@amd.com>; Lin, Wayne <Wayne.Lin@amd.com>
Subject: [PATCH 00/10] DC Patches October 14, 2024
This DC patchset brings improvements in multiple areas. In summary, we have:
- Fix dcn401 idle optimization problem
- Fix cursor corruption on dcn35
- Fix DP LL compliance failures
- Fix SubVP Phantom VBlank End calculation
Cc: Daniel Wheeler <daniel.wheeler@amd.com>
---
Aric Cyr (1):
drm/amd/display: 3.2.306
Aurabindo Pillai (3):
drm/amd/display: temp w/a for dGPU to enter idle optimizations
drm/amd/display: Reuse subvp enable check for DCN401
drm/amd/display: temp w/a for DP Link Layer compliance
Bhuvanachandra Pinninti (1):
drm/amd/display: To change dcn301_init.h guard.
Dillon Varone (1):
drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21
Fangzhi Zuo (1):
drm/amd/display: Add a Precise Delay Routine
Leo Chen (1):
drm/amd/display: Adding array index check to prevent memory corruption
Samson Tam (1):
drm/amd/display: update fullscreen status to SPL
Yihan Zhu (1):
drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++- .../amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 13 +++++++++++ .../display/dc/clk_mgr/dcn35/dcn35_clk_mgr.c | 6 +++--
drivers/gpu/drm/amd/display/dc/core/dc.c | 5 +++++
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
.../gpu/drm/amd/display/dc/dc_spl_translate.c | 2 +-
drivers/gpu/drm/amd/display/dc/dc_stream.h | 3 +++
.../dc/dml2/dml21/dml21_translation_helper.c | 1 - .../dml2/dml21/src/dml2_core/dml2_core_dcn4.c | 1 +
.../dml21/src/dml2_core/dml2_core_utils.c | 1 +
.../drm/amd/display/dc/dpp/dcn20/dcn20_dpp.h | 1 + .../drm/amd/display/dc/dpp/dcn30/dcn30_dpp.h | 1 + .../drm/amd/display/dc/dpp/dcn35/dcn35_dpp.c | 22 +++++++++++++++---- .../amd/display/dc/hwss/dcn301/dcn301_init.h | 4 ++--
.../dc/link/protocols/link_dp_training.c | 2 +-
.../dc/resource/dcn401/dcn401_resource.c | 3 ++-
16 files changed, 56 insertions(+), 14 deletions(-)
--
2.37.3
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-10-17 18:44 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-15 8:17 [PATCH 00/10] DC Patches October 14, 2024 Wayne Lin
2024-10-15 8:17 ` [PATCH 01/10] drm/amd/display: temp w/a for dGPU to enter idle optimizations Wayne Lin
2024-10-15 13:14 ` Mario Limonciello
2024-10-16 13:13 ` Pillai, Aurabindo
2024-10-16 13:15 ` Mario Limonciello
2024-10-15 8:17 ` [PATCH 02/10] drm/amd/display: w/a to program DISPCLK_R_GATE_DISABLE DCN35 Wayne Lin
2024-10-15 8:17 ` [PATCH 03/10] drm/amd/display: Reuse subvp enable check for DCN401 Wayne Lin
2024-10-15 8:17 ` [PATCH 04/10] drm/amd/display: Adding array index check to prevent memory corruption Wayne Lin
2024-10-15 8:17 ` [PATCH 05/10] drm/amd/display: temp w/a for DP Link Layer compliance Wayne Lin
2024-10-15 8:17 ` [PATCH 06/10] drm/amd/display: Recalculate SubVP Phantom VBlank End in dml21 Wayne Lin
2024-10-15 8:17 ` [PATCH 07/10] drm/amd/display: Add a Precise Delay Routine Wayne Lin
2024-10-15 8:17 ` [PATCH 08/10] drm/amd/display: update fullscreen status to SPL Wayne Lin
2024-10-15 8:17 ` [PATCH 09/10] drm/amd/display: To change dcn301_init.h guard Wayne Lin
2024-10-15 8:17 ` [PATCH 10/10] drm/amd/display: 3.2.306 Wayne Lin
2024-10-17 18:44 ` [PATCH 00/10] DC Patches October 14, 2024 Wheeler, Daniel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox