linux/drivers/gpu
Maxime Ripard d1efdf6c84
drm/vkms: Move frame_info into vkms_plane_state
The vkms_frame_info structure is allocated separately in
vkms_plane_duplicate_state() and freed in vkms_plane_destroy_state(),
but has the exact same lifetime as the vkms_plane_state that contains
it.

This separate allocation is fragile: frame_info is only allocated in
duplicate_state, so any other path that creates a vkms_plane_state
produces a state with a NULL frame_info pointer. Both
vkms_plane_atomic_update() and vkms_plane_destroy_state() dereference
it unconditionally when a CRTC is set.

Embed frame_info directly in vkms_plane_state. The structure is
zero-initialized as part of the kzalloc, removing the need for a
separate allocation and its error handling in duplicate_state, and the
matching kfree in destroy_state.

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patch.msgid.link/20260908-drm-no-more-plane-reset-v4-2-a31b3fcfc989@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2026-09-15 11:46:44 +02:00
..
drm drm/vkms: Move frame_info into vkms_plane_state 2026-09-15 11:46:44 +02:00
host1x Linux 7.2 2026-08-20 10:58:44 +10:00
ipu-v3
nova-core drm for 7.3-rc1 2026-08-21 08:41:00 -07:00
tests gpu/tests/buddy: add dirty tracker performance KUnit test 2026-08-27 17:59:01 +05:30
trace
vga vga-switcheroo: Remove unused interfaces 2026-09-11 16:52:43 +02:00
buddy.c Merge drm/drm-next into drm-misc-next 2026-09-07 13:44:24 +02:00
Kconfig gpu: Fix dependencies in CONFIG_GPU_BUDDY_KUNIT_TEST 2026-07-29 13:06:24 +02:00
Makefile