aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1567-drm-amd-display-Don-t-ASSERT-when-total_planes-AMDGP.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/1567-drm-amd-display-Don-t-ASSERT-when-total_planes-AMDGP.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/1567-drm-amd-display-Don-t-ASSERT-when-total_planes-AMDGP.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/1567-drm-amd-display-Don-t-ASSERT-when-total_planes-AMDGP.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/1567-drm-amd-display-Don-t-ASSERT-when-total_planes-AMDGP.patch
new file mode 100644
index 00000000..57c75019
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/1567-drm-amd-display-Don-t-ASSERT-when-total_planes-AMDGP.patch
@@ -0,0 +1,42 @@
+From b9cec28b4e09581a560c60301db67c867e993c7c Mon Sep 17 00:00:00 2001
+From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Date: Tue, 5 Mar 2019 12:24:08 -0500
+Subject: [PATCH 1567/2940] drm/amd/display: Don't ASSERT when total_planes ==
+ AMDGPU_MAX_PLANES
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[Why]
+Can happen on ASICs with 6 planes, but this isn't a bug since we haven't
+written outside the array.
+
+[How]
+Use <= instead of <.
+
+Cc: Leo Li <sunpeng.li@amd.com>
+Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
+Reported-by: Michel Dänzer <michel.daenzer@amd.com>
+Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+Tested-by: Michel Dänzer <michel.daenzer@amd.com>
+Signed-off-by: Chaudhary Amit Kumar <Chaudharyamit.Kumar@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
+ 1 file changed, 1 insertion(+), 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 ccf759ae87e7..e0d0691711fa 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -1920,7 +1920,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
+ /* There is one primary plane per CRTC */
+ primary_planes = dm->dc->caps.max_streams;
+ total_planes = primary_planes + overlay_planes;
+- ASSERT(total_planes < AMDGPU_MAX_PLANES);
++ ASSERT(total_planes <= AMDGPU_MAX_PLANES);
+
+ /*
+ * Initialize primary planes, implicit planes for legacy IOCTLS.
+--
+2.17.1
+