rockchip中的vop

1.vop基本概念

rockchip平台的lcd controller成为vop(video output processor),芯片中一般集成了1-2个vop,只有支持两个vop的芯片,才能支持双屏异显

RK3399有2个VOP:
Video Output Processor(VOP_BIG)Video Output Processor(VOP_LIT)

支持的显示接口:
One or Two MIPI-DSI portOne eDP portOne DP portOne HDMI port


2.vop基本配置逻辑

//数据传递流程如下:
vop(相当于显示控制器) --> dis/vlds/edp/rgb(相当于encoder) --> panel(相当于显示器)
//分析2代的配置,数据流向
vopb_out_rgb -> rgb_in_vopb -> rgb_out_panel ->panel_in_rgb

//配置vopb
&vopb {
	//1.这块使能了,相当于使能了lcd控制器
	status = "okay";
	
};

&display_subsystem {
	route_rgb: route-rgb {
					status = "disabled";
					logo,uboot = "logo.bmp";
					logo,kernel = "logo_kernel.bmp";
					logo,mode = "center";
					charge_logo,mode = "center";
					//2.vopb有多少输出点,这块相当于要连接vopb_out_rgb这个输出点
					connect = <&vopb_out_rgb>;
				};
}

&route_rgb {
    /delete-property/ logo,uboot;
	//3.这块使能了,相当于使能了vopb_out_rgb输出
	status = "okay";
}

总结:以上3项配置相当于配置了vop -> vopb -> vopb_out_rgb

//配置encoder
&rgb {
	//1.这块使能相当于使能了encoder
	status = "okay";
	ports {
		port@1 {
			reg = <1>;

			rgb_out_panel: endpoint {
				//2.这块定义了连接的panel,即显示器
				remote-endpoint = <&panel_in_rgb>;
			};
		};
	};
};

&rgb_in_vopb {
	//2.这块使能相当于使能了encoder的接收,即能够接收来自vopb_out_rgb的数据
	status = "okay";
};

总结:以上2项配置相当于配置了encoder

//配置panel,在panel中设置与液晶屏相关内容,例如分辨率、时钟,时序等各参数
panel: panel {

	port {
		panel_in_rgb: endpoint {
			//1.这块定义了连接的encoder
			remote-endpoint = <&rgb_out_panel>;
		};
	};
}	
//分析3代的配置
//定义vopb
&vopb {
	status = "okay";
};

&display_subsystem {

	route_dsi: route-dsi {
			status = "disabled";
			logo,uboot = "logo.bmp";
			logo,kernel = "logo_kernel.bmp";
			logo,mode = "center";
			charge_logo,mode = "center";
			connect = <&vopb_out_dsi>;
	};
}

&route_dsi {
	logo,uboot = "logo_kernel.bmp";
	connect = <&vopb_out_dsi>;
	status = "okay";
};

//定义encoder
&dsi {
	status = "okay";
	//在该处直接定义了panel
	panel@0 {
	}
}

&dsi_in_vopb {
	status = "okay";
};

3.设备节点

在这里插入图片描述

display-subsystem:
配置 Rockchip 的 display engine;通过 route 表将各组件(plane / crct / encoder / connector) 关联在一起,以便对应的驱动构建出 display pipe;
vopl: vop@ff8f0000:
配置 VOP little;
子节点 port 里有 5 个 endpoint,名字分别为 vopl_out_dsi / vopl_out_edp 等,它们是数据输出端,即 output endpoint;
每个 endpoint 都会连接到某个 remote-endpoint,VOP 的 remote-endpoint 连接的就是各种显示 Encoder 的 endpoint,例如 vopl_out_dsi ---> dsi_in_vopl;
vopb: vop@ff900000:
省略
edp: edp@ff970000:
配置 edp 控制器,大致包括基地址、中断、时钟、子节点 port;
2 个 input endpoint,分别连接到 VOPL 和 VOPB;
1 个 output endpoint 连接到了 epd panel 上;
有 3 条连接:
vopb_out_edp ---> edp_in_vopbvopl_out_edp ---> edp_in_vopledp_out ---> edp_panel
panel: edp-panel:
配置某一款具体的 edp 屏;
有 1 条连接:
edp_out ---> edp_panel
hdmi: hdmi@ff940000:
配置 hdmi 控制器,大致包括引脚、基地址、中断、时钟、子节点 port;
有 2 条连接:
vopb_out_hdmi ---> hdmi_in_vopbvopl_out_hdmi ---> hdmi_in_vopl
dsi: dsi@ff960000  dsi1: dsi@ff968000:
配置 mipi dsi,类似 edp / hdmi;
mipi_dphy_tx1rx1: mipi-dphy-tx1rx1@ff968000:
配置 mipi dphy;

4.参考文档

RK3399 探索之旅 Display 子系统 基础概念

### RK3588 VOP Module Documentation and Resources The Video Output Processor (VOP) module on the RK3588 is a critical component responsible for processing video data before it reaches display devices. This section provides an overview of how this hardware layer interacts with other components within the system. #### Hardware Description Language Representation In terms of device tree representation, the VOP can be described using a hierarchical structure that outlines its properties and connections to other parts of the SoC: ```c vop { compatible = "rockchip,rk3588-vop"; reg = <0x0 0xff9a0000 0x0 0x1000>; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; }; ``` This snippet shows part of what might appear in a Device Tree Source file specific to configuring the VOP interface[^1]. #### Accessing Hardware Resources from Drivers For drivers interacting directly with the VOP or any similar peripheral, obtaining necessary resources such as memory regions or interrupt lines involves calling `platform_get_resource` during probe initialization. For instance, ```c struct resource *res; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) return -ENODEV; base = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(base)) return PTR_ERR(base); ``` Here, `pdev` represents a pointer to the platform device object associated with the driver being probed. The code attempts to map the first set (`num=0`) of contiguous memory-mapped IO addresses defined by the parent device's configuration into kernel virtual address space so they may be accessed programmatically[^3]. #### Registering DRM Devices Once all required setup steps are completed—including initializing registers according to vendor specifications—the final step often entails registering the newly configured graphics pipeline under Linux’s Direct Rendering Manager framework via `drm_dev_register`. This allows user-space applications like Xorg or Wayland compositors access through standardized interfaces provided by DRM/KMS APIs[^4]. --related questions-- 1. How does one configure multiple output channels when setting up the VOP? 2. What methods exist for optimizing performance while working with high-resolution displays connected to the VOP? 3. Can you provide examples demonstrating how to implement custom transformations supported by the VOP hardware acceleration features? 4. In which scenarios would someone need direct control over low-level parameters exposed by the VOP rather than relying solely upon higher abstraction layers?
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值