Re: [PATCH] drm/fb-helper: Add TODO for making drm_fb_helper_alloc_fbi fill apertures

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 26, 2020 at 4:10 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 4c7cbce7bae7..16b8dc38d022 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -526,6 +526,14 @@ struct fb_info *drm_fb_helper_alloc_fbi(struct drm_fb_helper *fb_helper)
>         if (ret)
>                 goto err_release;
>
> +       /*
> +        * TODO: We really should be smarter here and alloc an apperture
> +        * for each IORESOURCE_MEM resource helper->dev->dev has and also
> +        * init the ranges of the appertures based on the resources.
> +        * Note some drivers currently count on there being only 1 empty
> +        * aperture and fill this themselves, these will need to be dealt
> +        * with somehow when fixing this.
> +        */

Ah yes this is a bit more involved than first apperances suggest - we
might want to have a dedicated solution for the generic_setup helper
only, so we don't break all the other drivers using this function
directly.

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

>         info->apertures = alloc_apertures(1);
>         if (!info->apertures) {
>                 ret = -ENOMEM;
> --
> 2.26.0.rc2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux