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 <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2020-03-19 20:08:43 +08:00
parent ad9a2b7050
commit d02a15814d
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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 = &ampire_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 */
}