]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/fb-helper: Allocate and release fb_info in single place
authorThomas Zimmermann <tzimmermann@suse.de>
Mon, 27 Oct 2025 08:12:17 +0000 (09:12 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 25 Nov 2025 10:02:43 +0000 (11:02 +0100)
commit63c971af40365ee706c7e24f6a7900d693518f09
tree83f829601f409c6183d9ff93cc17de91bca8de24
parentac364014fd812c8a2babe8f9dff8c909271a653e
drm/fb-helper: Allocate and release fb_info in single place

Move the calls to drm_fb_helper_alloc_info() from drivers into a
single place in fbdev helpers. Allocates struct fb_info for a new
framebuffer device. Then call drm_fb_helper_single_fb_probe() to
create an fbdev screen buffer. Also release the instance on errors
by calling drm_fb_helper_release_info().

Simplifies the code and fixes the error cleanup for some of the
drivers.

Regular release of the struct fb_info instance still happens in
drm_fb_helper_fini() as before.

v2:
- remove error rollback in driver implementations (kernel test robot)
- initialize info in TTM implementation (kernel test robot)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Christian König <christian.koenig@amd.com> # radeon
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> # msm
Acked-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patch.msgid.link/20251027081245.80262-1-tzimmermann@suse.de
13 files changed:
drivers/gpu/drm/armada/armada_fbdev.c
drivers/gpu/drm/drm_fb_helper.c
drivers/gpu/drm/drm_fbdev_dma.c
drivers/gpu/drm/drm_fbdev_shmem.c
drivers/gpu/drm/drm_fbdev_ttm.c
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
drivers/gpu/drm/gma500/fbdev.c
drivers/gpu/drm/i915/display/intel_fbdev.c
drivers/gpu/drm/msm/msm_fbdev.c
drivers/gpu/drm/omapdrm/omap_fbdev.c
drivers/gpu/drm/radeon/radeon_fbdev.c
drivers/gpu/drm/tegra/fbdev.c
include/drm/drm_fb_helper.h