diff mbox series

[v4,2/2] drm/kmb: Enable support for framebuffer console

Message ID 20211019230719.789958-2-anitha.chrisanthus@intel.com (mailing list archive)
State New, archived
Headers show
Series [v4,1/2] drm/kmb: Enable ADV bridge after modeset | expand

Commit Message

Chrisanthus, Anitha Oct. 19, 2021, 11:07 p.m. UTC
Enable support for fbcon (framebuffer console).

v2: added missing static clk_enable
v3: removed module parameter, use fbdev_emulation instead. Use
preferred depth of 24 for color depth. (Thomas Z.)

Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>
---
 drivers/gpu/drm/kmb/kmb_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Sam Ravnborg Oct. 20, 2021, 5:39 a.m. UTC | #1
Hi Anitha,

On Tue, Oct 19, 2021 at 04:07:19PM -0700, Anitha Chrisanthus wrote:
> Enable support for fbcon (framebuffer console).
> 
> v2: added missing static clk_enable
> v3: removed module parameter, use fbdev_emulation instead. Use
> preferred depth of 24 for color depth. (Thomas Z.)
> 
> Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com>

Acked-by: Sam Ravnborg <sam@ravnborg.org>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c
index 12ce669650cc..19621535043b 100644
--- a/drivers/gpu/drm/kmb/kmb_drv.c
+++ b/drivers/gpu/drm/kmb/kmb_drv.c
@@ -15,6 +15,7 @@ 
 
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_drv.h>
+#include <drm/drm_fb_helper.h>
 #include <drm/drm_gem_cma_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_probe_helper.h>
@@ -176,6 +177,7 @@  static int kmb_setup_mode_config(struct drm_device *drm)
 	drm->mode_config.min_height = KMB_FB_MIN_HEIGHT;
 	drm->mode_config.max_width = KMB_FB_MAX_WIDTH;
 	drm->mode_config.max_height = KMB_FB_MAX_HEIGHT;
+	drm->mode_config.preferred_depth = 24;
 	drm->mode_config.funcs = &kmb_mode_config_funcs;
 
 	ret = kmb_setup_crtc(drm);
@@ -559,6 +561,8 @@  static int kmb_probe(struct platform_device *pdev)
 	if (ret)
 		goto err_register;
 
+	drm_fbdev_generic_setup(&kmb->drm, 0);
+
 	return 0;
 
  err_register: