mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
drm/rockchip: rgb: Add support for Rockchip Soc RGB output interface
Some Rockchip CRTCs, like rv1108, can directly output parallel and serial RGB data to panel or conversion chip, so we add this driver to probe encoder and connector. Change-Id: Ieab9271205cace962b7e871becaf903b9abebd94 Signed-off-by: Sandy Huang <hjc@rock-chips.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Mark Yao <mark.yao@rock-chips.com> Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
parent
9784385761
commit
6788d8d093
|
|
@ -74,4 +74,13 @@ config ROCKCHIP_DRM_TVE
|
|||
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.
|
||||
Some Rockchip CRTCs, like rv1108, can directly output parallel
|
||||
and serial RGB format to panel or connect to a conversion chip.
|
||||
say Y to enable its driver.
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@ rockchipdrm-$(CONFIG_ROCKCHIP_DW_MIPI_DSI) += dw-mipi-dsi.o
|
|||
rockchipdrm-$(CONFIG_ROCKCHIP_INNO_HDMI) += inno_hdmi.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_LVDS) += rockchip_lvds.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_DRM_TVE) += rockchip_drm_tve.o
|
||||
rockchipdrm-$(CONFIG_ROCKCHIP_RGB) += rockchip_rgb.o
|
||||
|
||||
obj-$(CONFIG_DRM_ROCKCHIP) += rockchipdrm.o
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/regmap.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <uapi/linux/videodev2.h>
|
||||
|
||||
#include "rockchip_drm_drv.h"
|
||||
|
|
@ -85,7 +86,7 @@ rockchip_rgb_connector_detect(struct drm_connector *connector, bool force)
|
|||
}
|
||||
|
||||
static const struct drm_connector_funcs rockchip_rgb_connector_funcs = {
|
||||
.dpms = drm_atomic_helper_connector_dpms,
|
||||
.dpms = drm_helper_connector_dpms,
|
||||
.detect = rockchip_rgb_connector_detect,
|
||||
.fill_modes = drm_helper_probe_single_connector_modes,
|
||||
.destroy = drm_connector_cleanup,
|
||||
|
|
@ -263,7 +264,7 @@ static int rockchip_rgb_bind(struct device *dev, struct device *master,
|
|||
drm_connector_helper_add(connector,
|
||||
&rockchip_rgb_connector_helper_funcs);
|
||||
|
||||
ret = drm_mode_connector_attach_encoder(connector, encoder);
|
||||
ret = drm_connector_attach_encoder(connector, encoder);
|
||||
if (ret < 0) {
|
||||
DRM_DEV_ERROR(dev,
|
||||
"failed to attach encoder: %d\n", ret);
|
||||
|
|
@ -278,7 +279,7 @@ static int rockchip_rgb_bind(struct device *dev, struct device *master,
|
|||
connector->port = dev->of_node;
|
||||
} else {
|
||||
rgb->bridge->encoder = encoder;
|
||||
ret = drm_bridge_attach(drm_dev, rgb->bridge);
|
||||
ret = drm_bridge_attach(encoder, rgb->bridge, NULL);
|
||||
if (ret) {
|
||||
DRM_DEV_ERROR(dev,
|
||||
"failed to attach bridge: %d\n", ret);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user