[PATCH 0/1] drm/blend: size zpos array to active planes instead of total

From: Gustavo Piaz Da Silva

Date: Thu Apr 30 2026 - 20:13:47 EST


drm_atomic_helper_crtc_normalize_zpos() allocates a temporary
array sized by dev->mode_config.num_total_plane, which counts
all planes registered on the device. The function only operates
on planes active on the given CRTC, as described by
crtc_state->plane_mask.

Replace num_total_plane with hweight32(crtc_state->plane_mask)
to size the allocation to exactly the planes being processed.

Gustavo Piaz Da Silva (1):
drm/blend: size zpos array to active planes instead of total

drivers/gpu/drm/drm_blend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--
2.43.0