dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Hans de Goede <hdegoede@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@intel.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/fb-helper: Add TODO for making drm_fb_helper_alloc_fbi fill apertures
Date: Thu, 26 Mar 2020 18:55:36 +0100	[thread overview]
Message-ID: <CAKMK7uFgyt_LD7wSTDB-LdaW_cc9Ge12DY8kWxeL_dS4Q4deOQ@mail.gmail.com> (raw)
In-Reply-To: <20200326151009.102377-1-hdegoede@redhat.com>

On Thu, Mar 26, 2020 at 4:10 PM Hans de Goede <hdegoede@redhat.com> 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@redhat.com>
> ---
>  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@ffwll.ch>

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

  reply	other threads:[~2020-03-26 17:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 15:10 [PATCH] drm/fb-helper: Add TODO for making drm_fb_helper_alloc_fbi fill apertures Hans de Goede
2020-03-26 17:55 ` Daniel Vetter [this message]
2020-03-27 10:22   ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKMK7uFgyt_LD7wSTDB-LdaW_cc9Ge12DY8kWxeL_dS4Q4deOQ@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).