From 44ac733f988ea27f2e9a263f1a0469d8236625ed Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Fri, 15 Mar 2024 08:33:36 +0100 Subject: [PATCH] 6.7/6.8: misc-additions: Add a partial revert fix for amdgpu gamma-related kernel panic Thanks to Anthony Ruhier https://gitlab.freedesktop.org/drm/amd/-/issues/3142#note_2317021 https://gitlab.freedesktop.org/drm/amd/-/issues/3142#note_2324729 Following https://github.com/Frogging-Family/linux-tkg/issues/896 --- linux-tkg-patches/6.7/0012-misc-additions.patch | 13 +++++++++++++ linux-tkg-patches/6.8/0012-misc-additions.patch | 12 ++++++++++++ 2 files changed, 25 insertions(+) diff --git a/linux-tkg-patches/6.7/0012-misc-additions.patch b/linux-tkg-patches/6.7/0012-misc-additions.patch index 31368a7..9b5211b 100644 --- a/linux-tkg-patches/6.7/0012-misc-additions.patch +++ b/linux-tkg-patches/6.7/0012-misc-additions.patch @@ -97,3 +97,16 @@ index f4b210ab061291..837d0dbb28ea08 100644 depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS help This value can be used to select the number of bits to use to + +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +index 990d775e4cea..09e3813b71a8 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -4498,7 +4498,6 @@ void dc_resource_state_destruct(struct dc_state *context) + } + context->stream_count = 0; + context->stream_mask = 0; +- memset(&context->res_ctx, 0, sizeof(context->res_ctx)); + memset(&context->pp_display_cfg, 0, sizeof(context->pp_display_cfg)); + memset(&context->dcn_bw_vars, 0, sizeof(context->dcn_bw_vars)); + context->clk_mgr = NULL; diff --git a/linux-tkg-patches/6.8/0012-misc-additions.patch b/linux-tkg-patches/6.8/0012-misc-additions.patch index 60306e3..960db84 100644 --- a/linux-tkg-patches/6.8/0012-misc-additions.patch +++ b/linux-tkg-patches/6.8/0012-misc-additions.patch @@ -98,3 +98,15 @@ index f4b210ab061291..837d0dbb28ea08 100644 help This value can be used to select the number of bits to use to +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_state.c b/drivers/gpu/drm/amd/display/dc/core/dc_state.c +index 180ac47868c2..42bf097b36b7 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_state.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_state.c +@@ -300,7 +300,6 @@ void dc_state_destruct(struct dc_state *state) + state->phantom_plane_count = 0; + + state->stream_mask = 0; +- memset(&state->res_ctx, 0, sizeof(state->res_ctx)); + memset(&state->pp_display_cfg, 0, sizeof(state->pp_display_cfg)); + memset(&state->dcn_bw_vars, 0, sizeof(state->dcn_bw_vars)); + state->clk_mgr = NULL;