[PATCH 1/2] drm/amd/display: increase max surfaces in line with planes and streams
Mohamed, Zaeem
Zaeem.Mohamed at amd.com
Fri Sep 27 17:40:22 UTC 2024
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Melissa,
MAX_SURFACE_NUM and MAX_PLANES both represent the upper bound of planes that are supported by HW. It is best to replace MAX_SURFACE_NUM with MAX_PLANES to remove redundancy. MAX_SURFACES is used to represent the upper bound of surfaces that can be piped to a single CRTC. Keep MAX_SURFACES as is to keep stack size down, and replace MAX_SURFACE_NUM with MAX_PLANES.
Thanks,
Zaeem
-----Original Message-----
From: dri-devel <dri-devel-bounces at lists.freedesktop.org> On Behalf Of Melissa Wen
Sent: Wednesday, September 25, 2024 11:37 AM
To: harry.wentland at amd.com; sunpeng.li at amd.com; Rodrigo.Siqueira at amd.com; alexander.deucher at amd.com; christian.koenig at amd.com; Xinhui.Pan at amd.com; airlied at gmail.com; daniel at ffwll.ch
Cc: amd-gfx at lists.freedesktop.org; dri-devel at lists.freedesktop.org
Subject: [PATCH 1/2] drm/amd/display: increase max surfaces in line with planes and streams
091a97e542cf ("drm/amd/display: Fix warning. Set MAX_SURFACES to 3") reduced the max number of surfaces since, at that time, there was no use for more. However, HW and driver evolves and there are now driver versions that allow two overlay planes (max_slave_planes). Moreover, commit 3cfd03b79425 ("drm/amd/display: update max streams per surface") states 6 is the max surfaces supported asics can have. Therefore, update MAX_SURFACES to match MAX_SURFACE_NUM, MAX_PLANES and MAX_STREAMS.
It also addresses array-index-out-of-bounds reported in the link.
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/3594
Signed-off-by: Melissa Wen <mwen at igalia.com>
---
drivers/gpu/drm/amd/display/dc/dc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
index 3992ad73165b..08b00b263533 100644
--- a/drivers/gpu/drm/amd/display/dc/dc.h
+++ b/drivers/gpu/drm/amd/display/dc/dc.h
@@ -57,7 +57,7 @@ struct dmub_notification;
#define DC_VER "3.2.301"
-#define MAX_SURFACES 3
+#define MAX_SURFACES 6
#define MAX_PLANES 6
#define MAX_STREAMS 6
#define MIN_VIEWPORT_SIZE 12
--
2.45.2
More information about the amd-gfx
mailing list