Re: [PATCH 12/16] drm/fb-helper: directly call set_par from the hotplug handler

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

 



On Thu, Jan 24, 2013 at 10:20 AM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote:
> The idea behind calling down into the driver's ->fb_probe function on each
> hotplug seems to be able to reallocate the backing storage (if e.g. a screen
> with higher resolution gets added). But that requires quite a bit of work in the
> fb helper itself, since currently we limit new screens to the currently
> allocated fb. An no kms driver supports fbdev fb resizing.

does an non kms fbdev driver support resizing?  That might be a better
argument ;-)

w/ framebuffer vaddr all over the place, teaching fbdev to resize
seems like it might be kinda fun.. I guess if we really wanted to
resize fbdev then we'd be better off beating all the console_lock vs
notifier vs whatever else deadlocks so that we could reliably
unregister and re-register a framebuffer on last-unplug / first-plug.

Reviewed-by: Rob Clark <robdclark@xxxxxxxxx>

> So don't bother and start to simplify the code by calling drm_fb_helper_set_par
> directly from the fbdev hotplug function, since that's the only thing left in
> drm_fb_helper_single_fb_probe which does not concern itself with fb allocation
> and initial setup. Follow-on patches will streamline the initial setup
> code.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/drm_fb_helper.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 5c73a12..90c1117 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -859,8 +859,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>                 dev_info(fb_helper->dev->dev, "fb%d: %s frame buffer device\n",
>                                 info->node, info->fix.id);
>
> -       } else {
> -               drm_fb_helper_set_par(info);
>         }
>
>         /* Switch back to kernel console on panic */
> @@ -1436,7 +1434,9 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
>         drm_setup_crtcs(fb_helper);
>         drm_modeset_unlock_all(dev);
>
> -       return drm_fb_helper_single_fb_probe(fb_helper, bpp_sel);
> +       drm_fb_helper_set_par(fb_helper->fbdev);
> +
> +       return 0;
>  }
>  EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
>
> --
> 1.7.10.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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