summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD8
-rw-r--r--amdgpu_hdmihotplug.patch173
-rw-r--r--config.x86_642
4 files changed, 184 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 09758cae2eda..70cc5f8c1d16 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = linux-amd-znver2
pkgver = 5.11.v.0
- pkgrel = 1
+ pkgrel = 2
url = https://www.kernel.org/
arch = x86_64
license = GPL2
@@ -18,11 +18,13 @@ pkgbase = linux-amd-znver2
source = linux-amd-znver2.preset
source = linux.install
source = 5013_enable-cpu-optimizations-for-gcc10.patch
+ source = amdgpu_hdmihotplug.patch
sha256sums = SKIP
- sha256sums = 773729415ebd48edf0cd77d803d6ac7d55074f412edd5775a6a64516ad10f997
+ sha256sums = 7ca08cf7d1cad0ae4d22fad50e32dc6226fd679bad5d89633ab92b7e7f82cf35
sha256sums = 60c6ba602443e94a9eba3aeee9d194027d69bffaa428c6d055348ebf03681b5c
sha256sums = d590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0
sha256sums = 126cd35b1153b69dd8d713f902d09ecc64ce8af2e4fa6f021219a65e62e13875
+ sha256sums = abbb23f55cd25941d5487084c627f601bfa0ca63e329d580cc5a472b4638aeaa
pkgname = linux-amd-znver2
pkgdesc = Linux kernel aimed at the znver2 AMD Ryzen CPU based hardware
diff --git a/PKGBUILD b/PKGBUILD
index 1b4d2c9d68c2..e8b4fbe91ec2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgbase=linux-amd-znver2
_srcname=linux
gitver=v5.11
pkgver=5.11.v.0
-pkgrel=1
+pkgrel=2
arch=('x86_64')
url="https://www.kernel.org/"
license=('GPL2')
@@ -20,16 +20,20 @@ source=("git+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git#ta
'linux.install'
# patch from our gentoo overlords
'5013_enable-cpu-optimizations-for-gcc10.patch'
+ # AMDgpu HDMI hotplug patch
+ 'amdgpu_hdmihotplug.patch'
)
sha256sums=('SKIP'
#config.x86_64
- '773729415ebd48edf0cd77d803d6ac7d55074f412edd5775a6a64516ad10f997'
+ '7ca08cf7d1cad0ae4d22fad50e32dc6226fd679bad5d89633ab92b7e7f82cf35'
#.preset file
'60c6ba602443e94a9eba3aeee9d194027d69bffaa428c6d055348ebf03681b5c'
#linux install file
'd590e751ab4cf424b78fd0d57e53d187f07401a68c8b468d17a5f39a337dacf0'
#gentoopatch
'126cd35b1153b69dd8d713f902d09ecc64ce8af2e4fa6f021219a65e62e13875'
+ #AMDgpu patch
+ 'abbb23f55cd25941d5487084c627f601bfa0ca63e329d580cc5a472b4638aeaa'
)
_kernelname=${pkgbase#linux}
diff --git a/amdgpu_hdmihotplug.patch b/amdgpu_hdmihotplug.patch
new file mode 100644
index 000000000000..074da18dcabb
--- /dev/null
+++ b/amdgpu_hdmihotplug.patch
@@ -0,0 +1,173 @@
+commit 85f4f00c1e88b2a5aced59cca7354631e8889dfb
+Author: Alex Deucher <alexander.deucher@amd.com>
+Date: Tue Feb 9 17:21:58 2021 -0500
+
+ Revert "drm/amd/display: reuse current context instead of recreating one"
+
+ This reverts commit 8866a67ab86cc0812e65c04f1ef02bcc41e24d68.
+
+ This breaks hotplug of HDMI on some systems, resulting in
+ a blank screen also causes failures for displays to light up
+ on other systems.
+
+ Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1487
+ Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1492
+ Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211649
+ Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+
+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 34218c2fe835..eed6d04e9572 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -1937,7 +1937,7 @@ static void dm_gpureset_commit_state(struct dc_state *dc_state,
+ dc_commit_updates_for_stream(
+ dm->dc, bundle->surface_updates,
+ dc_state->stream_status->plane_count,
+- dc_state->streams[k], &bundle->stream_update);
++ dc_state->streams[k], &bundle->stream_update, dc_state);
+ }
+
+ cleanup:
+@@ -1968,7 +1968,8 @@ static void dm_set_dpms_off(struct dc_link *link)
+
+ stream_update.stream = stream_state;
+ dc_commit_updates_for_stream(stream_state->ctx->dc, NULL, 0,
+- stream_state, &stream_update);
++ stream_state, &stream_update,
++ stream_state->ctx->dc->current_state);
+ mutex_unlock(&adev->dm.dc_lock);
+ }
+
+@@ -7674,7 +7675,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
+ struct drm_crtc *pcrtc,
+ bool wait_for_vblank)
+ {
+- int i;
++ uint32_t i;
+ uint64_t timestamp_ns;
+ struct drm_plane *plane;
+ struct drm_plane_state *old_plane_state, *new_plane_state;
+@@ -7715,7 +7716,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
+ amdgpu_dm_commit_cursors(state);
+
+ /* update planes when needed */
+- for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) {
++ for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
+ struct drm_crtc *crtc = new_plane_state->crtc;
+ struct drm_crtc_state *new_crtc_state;
+ struct drm_framebuffer *fb = new_plane_state->fb;
+@@ -7938,7 +7939,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
+ bundle->surface_updates,
+ planes_count,
+ acrtc_state->stream,
+- &bundle->stream_update);
++ &bundle->stream_update,
++ dc_state);
+
+ /**
+ * Enable or disable the interrupts on the backend.
+@@ -8274,13 +8276,13 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
+ struct dm_connector_state *dm_new_con_state = to_dm_connector_state(new_con_state);
+ struct dm_connector_state *dm_old_con_state = to_dm_connector_state(old_con_state);
+ struct amdgpu_crtc *acrtc = to_amdgpu_crtc(dm_new_con_state->base.crtc);
+- struct dc_surface_update surface_updates[MAX_SURFACES];
++ struct dc_surface_update dummy_updates[MAX_SURFACES];
+ struct dc_stream_update stream_update;
+ struct dc_info_packet hdr_packet;
+ struct dc_stream_status *status = NULL;
+ bool abm_changed, hdr_changed, scaling_changed;
+
+- memset(&surface_updates, 0, sizeof(surface_updates));
++ memset(&dummy_updates, 0, sizeof(dummy_updates));
+ memset(&stream_update, 0, sizeof(stream_update));
+
+ if (acrtc) {
+@@ -8337,15 +8339,16 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
+ * To fix this, DC should permit updating only stream properties.
+ */
+ for (j = 0; j < status->plane_count; j++)
+- surface_updates[j].surface = status->plane_states[j];
++ dummy_updates[j].surface = status->plane_states[0];
+
+
+ mutex_lock(&dm->dc_lock);
+ dc_commit_updates_for_stream(dm->dc,
+- surface_updates,
++ dummy_updates,
+ status->plane_count,
+ dm_new_crtc_state->stream,
+- &stream_update);
++ &stream_update,
++ dc_state);
+ mutex_unlock(&dm->dc_lock);
+ }
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
+index e2cc1a141131..702c266e60f8 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -2692,7 +2692,8 @@ void dc_commit_updates_for_stream(struct dc *dc,
+ struct dc_surface_update *srf_updates,
+ int surface_count,
+ struct dc_stream_state *stream,
+- struct dc_stream_update *stream_update)
++ struct dc_stream_update *stream_update,
++ struct dc_state *state)
+ {
+ const struct dc_stream_status *stream_status;
+ enum surface_update_type update_type;
+@@ -2711,12 +2712,6 @@ void dc_commit_updates_for_stream(struct dc *dc,
+
+
+ if (update_type >= UPDATE_TYPE_FULL) {
+- struct dc_plane_state *new_planes[MAX_SURFACES];
+-
+- memset(new_planes, 0, sizeof(new_planes));
+-
+- for (i = 0; i < surface_count; i++)
+- new_planes[i] = srf_updates[i].surface;
+
+ /* initialize scratch memory for building context */
+ context = dc_create_state(dc);
+@@ -2725,21 +2720,15 @@ void dc_commit_updates_for_stream(struct dc *dc,
+ return;
+ }
+
+- dc_resource_state_copy_construct(
+- dc->current_state, context);
++ dc_resource_state_copy_construct(state, context);
+
+- /*remove old surfaces from context */
+- if (!dc_rem_all_planes_for_stream(dc, stream, context)) {
+- DC_ERROR("Failed to remove streams for new validate context!\n");
+- return;
+- }
++ for (i = 0; i < dc->res_pool->pipe_count; i++) {
++ struct pipe_ctx *new_pipe = &context->res_ctx.pipe_ctx[i];
++ struct pipe_ctx *old_pipe = &dc->current_state->res_ctx.pipe_ctx[i];
+
+- /* add surface to context */
+- if (!dc_add_all_planes_for_stream(dc, stream, new_planes, surface_count, context)) {
+- DC_ERROR("Failed to add streams for new validate context!\n");
+- return;
++ if (new_pipe->plane_state && new_pipe->plane_state != old_pipe->plane_state)
++ new_pipe->plane_state->force_full_update = true;
+ }
+-
+ }
+
+
+diff --git a/drivers/gpu/drm/amd/display/dc/dc_stream.h b/drivers/gpu/drm/amd/display/dc/dc_stream.h
+index e243c01b9672..b7910976b81a 100644
+--- a/drivers/gpu/drm/amd/display/dc/dc_stream.h
++++ b/drivers/gpu/drm/amd/display/dc/dc_stream.h
+@@ -283,7 +283,8 @@ void dc_commit_updates_for_stream(struct dc *dc,
+ struct dc_surface_update *srf_updates,
+ int surface_count,
+ struct dc_stream_state *stream,
+- struct dc_stream_update *stream_update);
++ struct dc_stream_update *stream_update,
++ struct dc_state *state);
+ /*
+ * Log the current stream state.
+ */
diff --git a/config.x86_64 b/config.x86_64
index 8087172534b0..21a005b12ee6 100644
--- a/config.x86_64
+++ b/config.x86_64
@@ -5,7 +5,7 @@
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100200
-CONFIG_LD_VERSION=236000000
+CONFIG_LD_VERSION=236010000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y