|
本帖最后由 lyc 于 2023-11-20 14:31 编辑
想使用vp0--HDMI显示文件系统内容的同时使用vp3--rgb配置bt1120显示摄像头采集图像,目前不能成功。kernel运行起来后一直打印dwhdmi-rockchip fdea0000.hdmi: use tmds mode
log显示出错:
[ 2.702796] [drm:rockchip_rgb_bind] *ERROR7
[ 3.397687] rockchip-drm display-subsystem: bound fd58c000.syscon:rgb (ops 0)
[ 3.398128] rockchip-drm display-subsystem: failed to parse loader memory 大神能不能帮忙看看我是哪里配置有问题,谢啦
1.rk3588-toybrick.dtsi文件
路径:edge/kernel/linux-5.10/arch/arm64/boot/dts/rockchip/rk3588-toybrick.dtsi
&vop {
status = "okay";
};
&vop_mmu {
status = "okay";
};
/* vp0 & vp1 splice for 8K output */
&vp0 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER0 | 1 << ROCKCHIP_VOP2_ESMART0)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART0>;
};
&vp1 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER1 | 1 << ROCKCHIP_VOP2_ESMART1)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART1>;
};
&vp2 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER2 | 1 << ROCKCHIP_VOP2_ESMART2)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART2>;
};
&vp3 {
rockchip,plane-mask = <(1 << ROCKCHIP_VOP2_CLUSTER3 | 1 << ROCKCHIP_VOP2_ESMART3)>;
rockchip,primary-plane = <ROCKCHIP_VOP2_ESMART3>;
};
2.rk3588-toybrick-x0.dtsi文件 路径:edge/kernel/linux-5.10/arch/arm64/boot/dts/rockchip/rk3588-toybrick-x0.dtsi
(1)/ {
hdmiin_dc: hdmiin-dc {
compatible = "rockchip,dummy-codec";
#sound-dai-cells = <0>;
};
panel {
status = "okay";
compatible = "simple-panel";
reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_LOW>;
reset-delay-ms = <10>;
bus-format = <MEDIA_BUS_FMT_YUYV8_1X16>;
display-timings {
native-mode = <&timing1>;
timing1: timing1 {
clock-frequency = <74250000>;
hactive = <1920>;
vactive = <1080>;
hback-porch = <148>;
hfront-porch = <88>;
vback-porch = <36>;
vfront-porch = <4>;
hsync-len = <44>;
vsync-len = <5>;
hsync-active = <1>;
vsync-active = <1>;
de-active = <1>;
pixelclk-active = <1>;
};
};
port {
panel_in_rgb: endpoint{
remote-endpoint = <&rgb_out_panel>;
};
};
};
}
(2)
&hdmi1 {
enable-gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&hdmi1_in_vp0 {
status = "okay";
};
&route_hdmi1 {
status = "okay";
};
&hdptxphy_hdmi1 {
status = "okay";
};
&display_subsystem {
status = "okay";
};
&route_rgb {
status = "okay";
};
&rgb {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&bt1120_pins>;
ports {
port@1 {
reg = <1>;
rgb_out_panel: endpoint {
remote-endpoint = <&panel_in_rgb>;
};
};
};
};
&rgb_in_vp3 {
status = "okay";
};
3.rockchip_display.h
路径:edge/uboot/drivers/video/drm/rockchip_display.h
#define ROCKCHIP_OUT_MODE_BT1120 0
#define VOP_OUTPUT_IF_BT1120 BIT(1)
4.rockchip_rgb.c
路径:edge/uboot/drivers/video/drm/rockchip_rgb.c
函数:static int rockchip_rgb_connector_init(struct rockchip_connector *conn, struct display_state *state)
case MEDIA_BUS_FMT_YUYV8_1X16:
case MEDIA_BUS_FMT_YVYU8_1X16:
case MEDIA_BUS_FMT_UYVY8_1X16:
case MEDIA_BUS_FMT_VYUY8_1X16:
conn_state->output_mode = ROCKCHIP_OUT_MODE_BT1120;
conn_state->output_if = VOP_OUTPUT_IF_BT1120;
break;
5.rockchip_vop.c
路径:edge/uboot/drivers/video/drm/rockchip_vop.c
函数:static int rockchip_vop_init(struct display_state *state)
switch (conn_state->type) {
case DRM_MODE_CONNECTOR_LVDS:
VOP_CTRL_SET(vop, rgb_en, 1);
VOP_CTRL_SET(vop, rgb_pin_pol, val);
VOP_CTRL_SET(vop, rgb_dclk_pol, dclk_inv);
VOP_CTRL_SET(vop, lvds_en, 1);
VOP_CTRL_SET(vop, lvds_pin_pol, val);
VOP_CTRL_SET(vop, lvds_dclk_pol, dclk_inv);
if (!IS_ERR_OR_NULL(vop->grf))
VOP_GRF_SET(vop, grf_dclk_inv, dclk_inv);
if (conn_state->bus_format == MEDIA_BUS_FMT_YUYV8_1X16) {
VOP_CTRL_SET(vop, bt1120_en, 1);
VOP_CTRL_SET(vop, bt1120_yc_swap, 1);
}
break;
6.rockchip_vop.h
路径:edge/uboot/drivers/video/drm/rockchip_vop.h
结构体:struct vop_ctrl {}
struct vop_reg bt1120_yc_swap;
struct vop_reg bt1120_en;
|
|