mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
drm/rockchip: add config options of VOP and VOP2 driver
rv1126 does not support VOP2, so add config options to reduce memory usage. make ARCH=arm rv1126_defconfig ./ksize.sh drivers/gpu/drm/ before ksize: 675434 Bytes after kszie: 581268 Bytes save about: 94166 Bytes In addition, improve the format of space and tab, and remove extra "depends on DRM_ROCKCHIP". Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: I2b29a543a7e52e4e4b72112980e2c6dc6c6cce92
This commit is contained in:
@@ -20,13 +20,27 @@ if DRM_ROCKCHIP
|
||||
|
||||
config ROCKCHIP_DRM_DEBUG
|
||||
tristate "Rockchip DRM debug"
|
||||
depends on DRM_ROCKCHIP
|
||||
help
|
||||
This option add a debug node to dump buf from application.
|
||||
dump buffer store at: /data/vop_buf
|
||||
debug node: /d/dri/0/ff900000.vop/vop_dump/dump
|
||||
cat /d/dri/0/ff900000.vop/vop_dump/dump get more help.
|
||||
|
||||
config ROCKCHIP_VOP
|
||||
bool "Rockchip VOP driver"
|
||||
default y
|
||||
help
|
||||
This selects support for the VOP driver.If you want to
|
||||
enable VOP on Rockchip SoC, you should selet this option.
|
||||
|
||||
config ROCKCHIP_VOP2
|
||||
bool "Rockchip VOP2 driver"
|
||||
default y if !CPU_RV1126
|
||||
help
|
||||
This selects support for the VOP2 driver. If you want to
|
||||
enable VOP2 on RK3566 and RK3568 based SoC, you should
|
||||
selet this option.
|
||||
|
||||
config ROCKCHIP_ANALOGIX_DP
|
||||
bool "Rockchip specific extensions for Analogix DP driver"
|
||||
help
|
||||
@@ -35,17 +49,17 @@ config ROCKCHIP_ANALOGIX_DP
|
||||
on RK3288 based SoC, you should selet this option.
|
||||
|
||||
config ROCKCHIP_CDN_DP
|
||||
bool "Rockchip cdn DP"
|
||||
bool "Rockchip cdn DP"
|
||||
depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m)
|
||||
help
|
||||
help
|
||||
This selects support for Rockchip SoC specific extensions
|
||||
for the cdn DP driver. If you want to enable Dp on
|
||||
RK3399 based SoC, you should select this
|
||||
option.
|
||||
|
||||
config ROCKCHIP_DW_HDMI
|
||||
bool "Rockchip specific extensions for Synopsys DW HDMI"
|
||||
help
|
||||
bool "Rockchip specific extensions for Synopsys DW HDMI"
|
||||
help
|
||||
This selects support for Rockchip SoC specific extensions
|
||||
for the Synopsys DesignWare HDMI driver. If you want to
|
||||
enable HDMI on RK3288 based SoC, you should selet this
|
||||
@@ -54,10 +68,10 @@ config ROCKCHIP_DW_HDMI
|
||||
config ROCKCHIP_DW_MIPI_DSI
|
||||
bool "Rockchip specific extensions for Synopsys DW MIPI DSI"
|
||||
help
|
||||
This selects support for Rockchip SoC specific extensions
|
||||
for the Synopsys DesignWare HDMI driver. If you want to
|
||||
enable MIPI DSI on RK3288 based SoC, you should selet this
|
||||
option.
|
||||
This selects support for Rockchip SoC specific extensions
|
||||
for the Synopsys DesignWare HDMI driver. If you want to
|
||||
enable MIPI DSI on RK3288 based SoC, you should selet this
|
||||
option.
|
||||
|
||||
config ROCKCHIP_INNO_HDMI
|
||||
bool "Rockchip specific extensions for Innosilicon HDMI"
|
||||
@@ -68,7 +82,6 @@ config ROCKCHIP_INNO_HDMI
|
||||
|
||||
config ROCKCHIP_LVDS
|
||||
bool "Rockchip LVDS support"
|
||||
depends on DRM_ROCKCHIP
|
||||
depends on PINCTRL && OF
|
||||
help
|
||||
Choose this option to enable support for Rockchip LVDS controllers.
|
||||
@@ -78,14 +91,12 @@ config ROCKCHIP_LVDS
|
||||
|
||||
config ROCKCHIP_DRM_TVE
|
||||
bool "Rockchip TVE support"
|
||||
depends on DRM_ROCKCHIP
|
||||
help
|
||||
Choose this option to enable support for Rockchip TVE controllers.
|
||||
say Y to enable its driver.
|
||||
|
||||
config ROCKCHIP_RGB
|
||||
bool "Rockchip RGB support"
|
||||
depends on DRM_ROCKCHIP
|
||||
depends on PINCTRL
|
||||
help
|
||||
Choose this option to enable support for Rockchip RGB output.
|
||||
@@ -95,11 +106,10 @@ config ROCKCHIP_RGB
|
||||
|
||||
config DRM_ROCKCHIP_VVOP
|
||||
tristate "Rockchip virtual VOP drm driver"
|
||||
depends on DRM_ROCKCHIP
|
||||
help
|
||||
Say y here if you want use some module of rockchip drm, but
|
||||
don't need a real vop driver(et: you just want rockchip drm
|
||||
gem driver to allocate memory).
|
||||
Say y here if you want use some module of rockchip drm, but
|
||||
don't need a real vop driver(et: you just want rockchip drm
|
||||
gem driver to allocate memory).
|
||||
|
||||
source "drivers/gpu/drm/rockchip/ebc-dev/Kconfig"
|
||||
source "drivers/gpu/drm/rockchip/rk618/Kconfig"
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
|
||||
|
||||
rockchipdrm-y := rockchip_drm_drv.o rockchip_drm_fb.o \
|
||||
rockchip_drm_gem.o rockchip_drm_psr.o \
|
||||
rockchip_drm_vop.o rockchip_vop_reg.o \
|
||||
rockchip_drm_vop2.o rockchip_vop2_reg.o
|
||||
rockchip_drm_gem.o rockchip_drm_psr.o
|
||||
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_VOP) += rockchip_drm_vop.o rockchip_vop_reg.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_VOP2) += rockchip_drm_vop2.o rockchip_vop2_reg.o
|
||||
|
||||
rockchipdrm-$(CONFIG_DRM_FBDEV_EMULATION) += rockchip_drm_fbdev.o
|
||||
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_ANALOGIX_DP) += analogix_dp-rockchip.o
|
||||
|
||||
@@ -1095,7 +1095,7 @@ static void dw_mipi_dsi_encoder_disable(struct drm_encoder *encoder)
|
||||
if (dsi->panel)
|
||||
drm_panel_disable(dsi->panel);
|
||||
|
||||
if (dsi->pdata->soc_type == RK3568)
|
||||
if (IS_ENABLED(CONFIG_CPU_RK3568) && dsi->pdata->soc_type == RK3568)
|
||||
vop2_standby(encoder->crtc, 1);
|
||||
|
||||
dw_mipi_dsi_disable(dsi);
|
||||
@@ -1103,7 +1103,7 @@ static void dw_mipi_dsi_encoder_disable(struct drm_encoder *encoder)
|
||||
drm_panel_unprepare(dsi->panel);
|
||||
dw_mipi_dsi_post_disable(dsi);
|
||||
|
||||
if (dsi->pdata->soc_type == RK3568)
|
||||
if (IS_ENABLED(CONFIG_CPU_RK3568) && dsi->pdata->soc_type == RK3568)
|
||||
vop2_standby(encoder->crtc, 0);
|
||||
}
|
||||
|
||||
@@ -1339,7 +1339,7 @@ static void dw_mipi_dsi_encoder_enable(struct drm_encoder *encoder)
|
||||
|
||||
dw_mipi_dsi_vop_routing(dsi);
|
||||
|
||||
if (dsi->pdata->soc_type == RK3568)
|
||||
if (IS_ENABLED(CONFIG_CPU_RK3568) && dsi->pdata->soc_type == RK3568)
|
||||
vop2_standby(encoder->crtc, 1);
|
||||
|
||||
dw_mipi_dsi_pre_enable(dsi);
|
||||
@@ -1347,7 +1347,7 @@ static void dw_mipi_dsi_encoder_enable(struct drm_encoder *encoder)
|
||||
drm_panel_prepare(dsi->panel);
|
||||
dw_mipi_dsi_enable(dsi);
|
||||
|
||||
if (dsi->pdata->soc_type == RK3568)
|
||||
if (IS_ENABLED(CONFIG_CPU_RK3568) && dsi->pdata->soc_type == RK3568)
|
||||
vop2_standby(encoder->crtc, 0);
|
||||
|
||||
if (dsi->panel)
|
||||
|
||||
@@ -2345,8 +2345,8 @@ static int __init rockchip_drm_init(void)
|
||||
#if IS_ENABLED(CONFIG_DRM_ROCKCHIP_VVOP)
|
||||
ADD_ROCKCHIP_SUB_DRIVER(vvop_platform_driver, CONFIG_DRM_ROCKCHIP_VVOP);
|
||||
#else
|
||||
ADD_ROCKCHIP_SUB_DRIVER(vop_platform_driver, CONFIG_DRM_ROCKCHIP);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(vop2_platform_driver, CONFIG_DRM_ROCKCHIP);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(vop_platform_driver, CONFIG_ROCKCHIP_VOP);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(vop2_platform_driver, CONFIG_ROCKCHIP_VOP2);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(rockchip_lvds_driver,
|
||||
CONFIG_ROCKCHIP_LVDS);
|
||||
ADD_ROCKCHIP_SUB_DRIVER(rockchip_dp_driver,
|
||||
|
||||
Reference in New Issue
Block a user