Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/fb-helper: Add TODO for making drm_fb_helper_alloc_fbi fill apertures

Currently drivers using drm_fbdev_generic_setup() end up with a single
empty aperture in their fb_info struct.

Not having the proper info in the apertures list causes
register_framebuffer to not remove conflicting framebuffers,
which some drivers currently workaround by manually calling
drm_fb_helper_remove_conflicting_pci_framebuffers().

Add a TODO as a reminder that we need to fix this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200326151009.102377-1-hdegoede@redhat.com

+8
+8
drivers/gpu/drm/drm_fb_helper.c
··· 514 514 if (ret) 515 515 goto err_release; 516 516 517 + /* 518 + * TODO: We really should be smarter here and alloc an apperture 519 + * for each IORESOURCE_MEM resource helper->dev->dev has and also 520 + * init the ranges of the appertures based on the resources. 521 + * Note some drivers currently count on there being only 1 empty 522 + * aperture and fill this themselves, these will need to be dealt 523 + * with somehow when fixing this. 524 + */ 517 525 info->apertures = alloc_apertures(1); 518 526 if (!info->apertures) { 519 527 ret = -ENOMEM;