rockchip-linux / kernel

BSP kernel source
Other
894 stars 1.06k forks source link

Can't find /dev/rga driver #154

Open delavadiya opened 5 years ago

delavadiya commented 5 years ago

I compiled latest kernel and select rockchip-rga as Module.

When I list modules, it showed as below. Module Size Used by rockchip_rga 24576 0 videobuf2_dma_sg 20480 1 rockchip_rga v4l2_mem2mem 20480 1 rockchip_rga mali 262144 1 dw_hdmi_i2s_audio 16384 0 rtc_ds1307 20480 0 ip_tables 24576 0 x_tables 32768 1 ip_tables autofs4 40960 2 uas 20480 0 usb_storage 61440 1 uas

But I can't find that how to use this rockchip-rga module and how to installed rga driver in /dev directory?

Caesar-github commented 5 years ago

/dev/rga should enable the rga2 with "CONFIG_ROCKCHIP_RGA2=y"

Caesar-github commented 5 years ago

maybe you can refer to the rk3399/rk3399pro configure.

delavadiya commented 5 years ago

When compile RGA2 module give this warning "dma_flush_range" [drivers/video/rockchip/rga2/rga2.ko] undefined! and when load rga2 module, dmesg gives "dma_flush_range" undefined. because of this error module cannot be loaded.

Below is dmesg output for rga2 [ 50.469187] rga2: loading out-of-tree module taints kernel. [ 50.470139] rga2: Unknown symbol __dma_flush_range (err 0)

delavadiya commented 5 years ago

After removing this error-> Unknown symbol __dma_flush_range. I compiled RGA2 driver and it's generate rga2.ko module without any warning. I also set CONFIG_ROCKCHIP_RGA2=m and load module using modprobe rga2. After checked in /dev node but not found rga. Also dmesg nothing shown any error related to rga2.

below is the rga related config in rk3328.dtsi file rga: rga@ff3900000 { compatible = "rockchip,rga2"; dev_mode = <1>; reg = <0x0 0xff390000 0x0 0x1000>; interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; clocks = <&cru ACLK_RGA>, <&cru HCLK_RGA>, <&cru SCLK_RGA>; clock-names = "aclk_rga", "hclk_rga", "clk_rga"; dma-coherent; status = "okay"; };