Hi Sam, Thanks for the review.
-----Original Message----- From: Sam Ravnborg sam@ravnborg.org Sent: Wednesday, July 28, 2021 12:31 AM To: Chrisanthus, Anitha anitha.chrisanthus@intel.com Cc: dri-devel@lists.freedesktop.org; Dea, Edmund J edmund.j.dea@intel.com Subject: Re: [PATCH 14/14] drm/kmb: Enable support for fbcon (framebuffer console)
Hi Anitha,
On Tue, Jul 27, 2021 at 05:31:26PM -0700, Anitha Chrisanthus wrote:
From: Edmund Dea edmund.j.dea@intel.com
Enable support for fbcon (framebuffer console). The user can initialize fbcon by loading kmb-drm with the parameter console=1.
I do not see the poit of the boot parameter?? Why is it needed here but not in other drivers?
By default, console is not enabled in this driver, customer only needs it when they are doing initial setups and then want it disabled after.
Signed-off-by: Edmund Dea edmund.j.dea@intel.com Signed-off-by: Anitha Chrisanthus anitha.chrisanthus@intel.com
drivers/gpu/drm/kmb/kmb_drv.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/kmb/kmb_drv.c
b/drivers/gpu/drm/kmb/kmb_drv.c
index d0de1db03493..d39d004f513a 100644 --- a/drivers/gpu/drm/kmb/kmb_drv.c +++ b/drivers/gpu/drm/kmb/kmb_drv.c @@ -5,6 +5,7 @@
#include <linux/clk.h> #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/of_graph.h> #include <linux/of_platform.h> #include <linux/of_reserved_mem.h> @@ -15,6 +16,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_irq.h> @@ -25,7 +27,13 @@ #include "kmb_dsi.h" #include "kmb_regs.h"
-static int kmb_display_clk_enable(struct kmb_drm_private *kmb) +/* Module Parameters */ +static bool console; +module_param(console, bool, 0400); +MODULE_PARM_DESC(console,
"Enable framebuffer console support (0=disable [default],
1=on)");
+int kmb_display_clk_enable(struct kmb_drm_private *kmb)
kmb_display_clk_enable lost a "static" - it will result in a warning if you build with W=1
Will fix it in v2
{ int ret = 0;
@@ -546,6 +554,9 @@ static int kmb_probe(struct platform_device *pdev) if (ret) goto err_register;
if (console)
drm_fbdev_generic_setup(&kmb->drm, 32);
return 0;
err_register:
-- 2.25.1