diff --git a/patches.suse/drm-amd-display-Revert-vblank-change-that-causes-nul.patch b/patches.suse/drm-amd-display-Revert-vblank-change-that-causes-nul.patch new file mode 100644 index 0000000..627cf8a --- /dev/null +++ b/patches.suse/drm-amd-display-Revert-vblank-change-that-causes-nul.patch @@ -0,0 +1,70 @@ +From c02b04633c4f4654331c53966cb937df1c73a9bb Mon Sep 17 00:00:00 2001 +From: Daniel Miess +Date: Thu, 11 May 2023 09:12:09 -0400 +Subject: [PATCH] drm/amd/display: Revert vblank change that causes null pointer crash +Git-commit: c02b04633c4f4654331c53966cb937df1c73a9bb +Patch-mainline: v6.5-rc1 +References: git-fixes + +Revert commit 1a4bcdbea431 ("drm/amd/display: Fix possible underflow for displays with large vblank") +Because it cause some regression + +Fixes: 1a4bcdbea431 ("drm/amd/display: Fix possible underflow for displays with large vblank") +Reviewed-by: Nicholas Kazlauskas +Acked-by: Tom Chung +Signed-off-by: Daniel Miess +Tested-by: Daniel Wheeler +Signed-off-by: Alex Deucher +Acked-by: Takashi Iwai + +--- + .../amd/display/dc/dml/dcn314/dcn314_fpu.c | 19 ++++++++++++------- + 1 file changed, 12 insertions(+), 7 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +index 554152371eb5..1d00eb9e73c6 100644 +--- a/drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c ++++ b/drivers/gpu/drm/amd/display/dc/dml/dcn314/dcn314_fpu.c +@@ -33,7 +33,7 @@ + #include "dml/display_mode_vba.h" + + struct _vcs_dpi_ip_params_st dcn3_14_ip = { +- .VBlankNomDefaultUS = 800, ++ .VBlankNomDefaultUS = 668, + .gpuvm_enable = 1, + .gpuvm_max_page_table_levels = 1, + .hostvm_enable = 1, +@@ -286,7 +286,7 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c + struct resource_context *res_ctx = &context->res_ctx; + struct pipe_ctx *pipe; + bool upscaled = false; +- const unsigned int max_allowed_vblank_nom = 1023; ++ bool isFreesyncVideo = false; + + dc_assert_fp_enabled(); + +@@ -300,11 +300,16 @@ int dcn314_populate_dml_pipes_from_context_fpu(struct dc *dc, struct dc_state *c + pipe = &res_ctx->pipe_ctx[i]; + timing = &pipe->stream->timing; + +- pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min; +- pipes[pipe_cnt].pipe.dest.vblank_nom = timing->v_total - pipes[pipe_cnt].pipe.dest.vactive; +- pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, dcn3_14_ip.VBlankNomDefaultUS); +- pipes[pipe_cnt].pipe.dest.vblank_nom = max(pipes[pipe_cnt].pipe.dest.vblank_nom, timing->v_sync_width); +- pipes[pipe_cnt].pipe.dest.vblank_nom = min(pipes[pipe_cnt].pipe.dest.vblank_nom, max_allowed_vblank_nom); ++ isFreesyncVideo = pipe->stream->adjust.v_total_max == pipe->stream->adjust.v_total_min; ++ isFreesyncVideo = isFreesyncVideo && pipe->stream->adjust.v_total_min > timing->v_total; ++ ++ if (!isFreesyncVideo) { ++ pipes[pipe_cnt].pipe.dest.vblank_nom = ++ dcn3_14_ip.VBlankNomDefaultUS / (timing->h_total / (timing->pix_clk_100hz / 10000.0)); ++ } else { ++ pipes[pipe_cnt].pipe.dest.vtotal = pipe->stream->adjust.v_total_min; ++ pipes[pipe_cnt].pipe.dest.vblank_nom = timing->v_total - pipes[pipe_cnt].pipe.dest.vactive; ++ } + + if (pipe->plane_state && + (pipe->plane_state->src_rect.height < pipe->plane_state->dst_rect.height || +-- +2.43.0 + diff --git a/series.conf b/series.conf index e3ecdad..261b4cd 100644 --- a/series.conf +++ b/series.conf @@ -42540,6 +42540,7 @@ patches.suse/drm-amd-display-drop-redundant-memset-in-get_availab.patch patches.suse/drm-amdgpu-Validate-VM-ioctl-flags.patch patches.suse/drm-amd-display-Fix-artifacting-on-eDP-panels-when-e.patch + patches.suse/drm-amd-display-Revert-vblank-change-that-causes-nul.patch patches.suse/drm-amd-display-Apply-60us-prefetch-for-DCFCLK-300Mh.patch patches.suse/drm-amd-display-Update-correct-DCN314-register-heade.patch patches.suse/drm-radeon-fix-possible-division-by-zero-errors.patch