From d02a15814d2a109ea1238db1cc5cff560b5f58b1 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Thu, 19 Mar 2020 20:08:43 +0800 Subject: [PATCH] drm/panel: simple: Introduce CONFIG_DRM_PANEL_SIMPLE_OF_ONLY Only support panels which all parameters from device tree. Save boot time about 2ms on rk3126-bnd-d708 board. Before: text data bss dec hex filename 59767 296 84 60147 eaf3 drivers/gpu/drm/panel/panel-simple.o After: text data bss dec hex filename 7547 296 84 7927 1ef7 drivers/gpu/drm/panel/panel-simple.o Change-Id: Ie075ff5c84c1807029873555f58bd13d41350abf Signed-off-by: Tao Huang --- drivers/gpu/drm/panel/Kconfig | 7 +++++++ drivers/gpu/drm/panel/panel-simple.c | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 3cd592dc91c7..9d516805529a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -98,6 +98,13 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_SIMPLE_OF_ONLY + bool "compatible is simple-panel or panel-dpi or simple-panel-dsi only" + depends on DRM_PANEL_SIMPLE + depends on ROCKCHIP_MINI_KERNEL + help + Only support panels which all parameters from device tree. + config DRM_PANEL_EDP tristate "support for simple Embedded DisplayPort panels" depends on OF diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 55d9529c4136..a36e83a0c913 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -4255,6 +4255,7 @@ static const struct of_device_id platform_of_match[] = { { .compatible = "simple-panel", .data = NULL, +#ifndef CONFIG_DRM_PANEL_SIMPLE_OF_ONLY }, { .compatible = "ampire,am-1280800n3tzqw-t00h", .data = &ire_am_1280800n3tzqw_t00h, @@ -4645,6 +4646,7 @@ static const struct of_device_id platform_of_match[] = { }, { .compatible = "yes-optoelectronics,ytc700tlag-05-201c", .data = &yes_optoelectronics_ytc700tlag_05_201c, +#endif /* !CONFIG_DRM_PANEL_SIMPLE_OF_ONLY */ }, { /* Must be the last entry */ .compatible = "panel-dpi", @@ -5020,6 +5022,7 @@ static const struct of_device_id dsi_of_match[] = { { .compatible = "simple-panel-dsi", .data = NULL, +#ifndef CONFIG_DRM_PANEL_SIMPLE_OF_ONLY }, { .compatible = "auo,b080uan01", .data = &auo_b080uan01 @@ -5041,6 +5044,7 @@ static const struct of_device_id dsi_of_match[] = { }, { .compatible = "osddisplays,osd101t2045-53ts", .data = &osd101t2045_53ts +#endif /* !CONFIG_DRM_PANEL_SIMPLE_OF_ONLY */ }, { /* sentinel */ }