aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3241-drm-amd-display-Skip-determining-update-type-for-asy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3241-drm-amd-display-Skip-determining-update-type-for-asy.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3241-drm-amd-display-Skip-determining-update-type-for-asy.patch76
1 files changed, 76 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3241-drm-amd-display-Skip-determining-update-type-for-asy.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3241-drm-amd-display-Skip-determining-update-type-for-asy.patch
new file mode 100644
index 00000000..24e35382
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3241-drm-amd-display-Skip-determining-update-type-for-asy.patch
@@ -0,0 +1,76 @@
+From b8a6ddcdb8c99bed67cd3a0bc5ca8a9b6b2487e8 Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Wed, 31 Jul 2019 09:45:16 -0400
+Subject: [PATCH 3241/4256] drm/amd/display: Skip determining update type for
+ async updates
+
+[Why]
+By passing through the dm_determine_update_type_for_commit for atomic
+commits that can be done asynchronously we are incurring a
+performance penalty by locking access to the global private object
+and holding that access until the end of the programming sequence.
+
+This is also allocating a new large dc_state on every access in addition
+to retaining all the references on each stream and plane until the end
+of the programming sequence.
+
+[How]
+Shift the determination for async update before validation. Return early
+if it's going to be an async update.
+
+Change-Id: I811fff81376d83820b20b8ac622d33a87fdec896
+Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Acked-by: Alex Deucher <alexander.deucher@amd.com>
+Reviewed-by: David Francis <david.francis@amd.com>
+---
+ .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 27 ++++++++++++++-----
+ 1 file changed, 20 insertions(+), 7 deletions(-)
+
+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 ea57affae0cc..2d408b614ee0 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -7225,6 +7225,26 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
+ if (ret)
+ goto fail;
+
++ if (state->legacy_cursor_update) {
++ /*
++ * This is a fast cursor update coming from the plane update
++ * helper, check if it can be done asynchronously for better
++ * performance.
++ */
++ state->async_update =
++ !drm_atomic_helper_async_check(dev, state);
++
++ /*
++ * Skip the remaining global validation if this is an async
++ * update. Cursor updates can be done without affecting
++ * state or bandwidth calcs and this avoids the performance
++ * penalty of locking the private state object and
++ * allocating a new dc_state.
++ */
++ if (state->async_update)
++ return 0;
++ }
++
+ /* Check scaling and underscan changes*/
+ /*TODO Removed scaling changes validation due to inability to commit
+ * new stream into context w\o causing full reset. Need to
+@@ -7277,13 +7297,6 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
+ ret = -EINVAL;
+ goto fail;
+ }
+- } else if (state->legacy_cursor_update) {
+- /*
+- * This is a fast cursor update coming from the plane update
+- * helper, check if it can be done asynchronously for better
+- * performance.
+- */
+- state->async_update = !drm_atomic_helper_async_check(dev, state);
+ }
+
+ /* Must be success */
+--
+2.17.1
+