[RK3399][Android7.1] Display中的VOP模块介绍

OS: Android 7.1
Board: Firefly-RK3399
Uboot: v2017.02

什么是VOP ?

全称 Visual Output Processor, 是Rockchip系列Soc的Display Controller(显示控制器), 用来将video memory中的image data传送到外部lcd 接口,如edp, dp, hdmi等。


RK3399 VOP:

在RK3399平台上一共有两个VOP,一个叫"VOP_BIG", 另外一个叫"VOP_LIT", 两个模块的registers layout是一样的,主要区别在于:

VOP_BIG最大输出分辨率是 4096x2160,并且支持四个windows.
VOP_LIT最大输出分辨率是 2560x1600,只支持两个windows.

RK3399 VOP的 register layout和 rk3288 类似, 所以重用了rk3288的一些功能。

VOP驱动:
代码路径位于 kernel/drivers/gpu/drm/rockchip/ 主要文件是

rockchip_drm_vop.c rockchip_vop_reg.c


DTS定义:

内核文档中说明:

Required properties:
- compatible: value should be one of the following "rockchip,rk3036-vop";
		"rockchip,rk3288-vop";
		"rockchip,rk3368-vop";
		"rockchip,rk3366-vop";
		"rockchip,rk3399-vop-big";
		"rockchip,rk3399-vop-lit";
		"rockchip,rk322x-vop";
		"rockchip,rk3328-vop";
- interrupts: should contain a list of all VOP IP block interrupts in the order: VSYNC, LCD_SYSTEM. The interrupt specifier
		 format depends on the interrupt controller used.
- clocks: must include clock specifiers corresponding to entries in the clock-names property.
- clock-names: Must contain aclk_vop: for ddr buffer transfer.
		hclk_vop: for ahb bus to R/W the phy regs.
		dclk_vop: pixel clock.
- resets: Must contain an entry for each entry in reset-names. See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
  - axi
  - ahb
  - dclk
- iommus: required a iommu node
- port: A port node with endpoint definitions as defined in Documentation/devicetree/bindings/media/video-interfaces.txt.

实际定义:

vop big:

	vopb: vop@ff900000 {
		compatible = "rockchip,rk3399-vop-big";
		reg = <0x0 0xff900000 0x0 0x3efc>;
		interrupts = ;
		clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
		resets = <&cru SRST_A_VOP0>, <&cru SRST_H_VOP0>, <&cru SRST_D_VOP0>;
		reset-names = "axi", "ahb", "dclk";
		power-domains = <&power RK3399_PD_VOPB>;
		iommus = <&vopb_mmu>;
		status = "disabled";

		vopb_out: port {
			#address-cells = <1>;
			#size-cells = <0>;

			vopb_out_edp: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&edp_in_vopb>;
			};
......
		};
	};

vop little:

	vopl: vop@ff8f0000 {
		compatible = "rockchip,rk3399-vop-lit";
		reg = <0x0 0xff8f0000 0x0 0x3efc>;
		interrupts = ;
		clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>;
		clock-names = "aclk_vop", "dclk_vop", "hclk_vop";
		resets = <&cru SRST_A_VOP1>, <&cru SRST_H_VOP1>, <&cru SRST_D_VOP1>;
		reset-names = "axi", "ahb", "dclk";
		power-domains = <&power RK3399_PD_VOPL>;
		iommus = <&vopl_mmu>;
		status = "disabled";

		vopl_out: port {
			#address-cells = <1>;
			#size-cells = <0>;

			vopl_out_mipi: endpoint@0 {
				reg = <0>;
				remote-endpoint = <&mipi_in_vopl>;
			};
......
		};
	};

VOP功能框图:

框图如下,摘rk3288 TRM:

[RK3399][Android7.1] Display中的VOP模块介绍_第1张图片

所以其实VOP就是个显示处理单元。
VOPB和VOPL两个处理单元不全部相同,比如VOPL不能处理AFBC功能,如果要使用的话需要关闭AFBC,否则无法正常显示。


参考:
Patchwork [v2,4/5] drm/rockchip: vop: add rk3399 vop support

你可能感兴趣的:(RK3399,子类__Display)