diff mbox series

[4/9] drm/simplekms: Add fbdev emulation

Message ID 20200625120011.16168-5-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Support simple-framebuffer devices and firmware fbs | expand

Commit Message

Thomas Zimmermann June 25, 2020, noon UTC
This displays a console on the simplefb framebuffer. The default
framebuffer format is being used.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/tiny/simplekms.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Daniel Vetter June 29, 2020, 9:11 a.m. UTC | #1
On Thu, Jun 25, 2020 at 02:00:06PM +0200, Thomas Zimmermann wrote:
> This displays a console on the simplefb framebuffer. The default
> framebuffer format is being used.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/tiny/simplekms.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tiny/simplekms.c b/drivers/gpu/drm/tiny/simplekms.c
> index dc7cf3983945..ac2ebfcedd22 100644
> --- a/drivers/gpu/drm/tiny/simplekms.c
> +++ b/drivers/gpu/drm/tiny/simplekms.c
> @@ -8,6 +8,7 @@
>  #include <drm/drm_damage_helper.h>
>  #include <drm/drm_device.h>
>  #include <drm/drm_drv.h>
> +#include <drm/drm_fb_helper.h>
>  #include <drm/drm_format_helper.h>
>  #include <drm/drm_gem_framebuffer_helper.h>
>  #include <drm/drm_gem_shmem_helper.h>
> @@ -469,6 +470,8 @@ static int simplekms_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> +	drm_fbdev_generic_setup(dev, 0);

I think for the fastboot stuff what we could do is improve the generic
fbdev code with essentially what intel_fbdev_init_bios does. Well actually
just shovel that code into the helpers maybe, the other code to pick
initial configs for fastboot has been moved already too.

Otherwise lgtm ofc.

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

> +
>  	return 0;
>  }
>  
> -- 
> 2.27.0
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tiny/simplekms.c b/drivers/gpu/drm/tiny/simplekms.c
index dc7cf3983945..ac2ebfcedd22 100644
--- a/drivers/gpu/drm/tiny/simplekms.c
+++ b/drivers/gpu/drm/tiny/simplekms.c
@@ -8,6 +8,7 @@ 
 #include <drm/drm_damage_helper.h>
 #include <drm/drm_device.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_fb_helper.h>
 #include <drm/drm_format_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_gem_shmem_helper.h>
@@ -469,6 +470,8 @@  static int simplekms_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
+	drm_fbdev_generic_setup(dev, 0);
+
 	return 0;
 }