[R2 Pro] linux hdmi support


After collecting some dts nodes i found out that hdmi is missing vop2 driver in mainline.

There is a vendor repo containing this driver based on 4.19

I currently try to add this driver to 5.15,but it’s huge…i already disabled hdr part as i guess it’s not needed. Maybe anyone can help here and can sort out some more?

Vop2 driver is currently disabled in Makefile to allow building kernel without hdmi support.

For compile tests (currently many errors) just revert this.if it is compilable,then still some things are missing because i add many new fields in existing and new structs which may need handling in mainline code.

Regards Frank

Peter was working on vop2 drivers.

I hope someone can pick it up from where he left so we can have HDMI out soon on rk356x.

Found a newer version here (not much smaller),i’m currently try to get working in 5.15


Benjamin means rockchip people will upstream it by themself some time.


As this is still huge and many changes in existing files, it’s not easy. Help welcome…got it compiled so far,but maybe i forgot anything or made a mistake.i cannot test yet

Edit: vop2 driver is posted here: https://patchwork.kernel.org/project/linux-rockchip/list/?series=581709 There some comments,so i wait for v2 before merging into my public tree. Additionally we need config in board dts similar to this and for resolution bug this seems to be needed. Hdmi audio and gpu support was posted too

Edit 12th december:

Vop2 v2 is reported as broken in quartz64 channel, discussion about clock-hack on patchwork. I first need ethernet working before adding display stuff.

edit Jan 26th 2022: tried vop2v4 on 5.17-rc1: works with 1080p+4k resolution

Edit Feb12th: Have now hdmi-audio working too tested with “speaker-test -Dhw:CARD=HDMI,DEV=0 -c2 -t wav”, headphone is working too, but microphone is not switched from board to headphone (gpio always 0,with pullup conf too)

edit Feb 17: with reduced quartz64 defconfig, gpu works

    OpenGL Information
    GL_VENDOR:     Panfrost
    GL_RENDERER:   Mali-G52 r1 (Panfrost)
    GL_VERSION:    3.1 Mesa 21.3.6 - kisak-mesa PPA
[build] use-vbo=false: FPS: 342 FrameTime: 2.924 ms
[build] use-vbo=true: FPS: 388 FrameTime: 2.577 ms
[texture] texture-filter=nearest: FPS: 645 FrameTime: 1.550 ms
[texture] texture-filter=linear: FPS: 651 FrameTime: 1.536 ms
[texture] texture-filter=mipmap: FPS: 647 FrameTime: 1.546 ms
[shading] shading=gouraud: FPS: 250 FrameTime: 4.000 ms
[shading] shading=blinn-phong-inf: FPS: 253 FrameTime: 3.953 ms
[shading] shading=phong: FPS: 236 FrameTime: 4.237 ms
[shading] shading=cel: FPS: 237 FrameTime: 4.219 ms
[bump] bump-render=high-poly: FPS: 90 FrameTime: 11.111 ms
[bump] bump-render=normals: FPS: 673 FrameTime: 1.486 ms
[bump] bump-render=height: FPS: 664 FrameTime: 1.506 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 510 FrameTime: 1.961 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 206 FrameTime: 4.854 ms
[pulsar] light=false:quads=5:texture=false: FPS: 612 FrameTime: 1.634 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 183 FrameTime: 5.464 ms
[desktop] effect=shadow:windows=4: FPS: 387 FrameTime: 2.584 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 57 FrameTime: 17.544 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 8 FrameTime: 125.000 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 66 FrameTime: 15.152 ms
[ideas] speed=duration: FPS: 249 FrameTime: 4.016 ms
[jellyfish] <default>: FPS: 324 FrameTime: 3.086 ms
[terrain] <default>: FPS: 17 FrameTime: 58.824 ms
[shadow] <default>: FPS: 162 FrameTime: 6.173 ms
[refract] <default>: FPS: 22 FrameTime: 45.455 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 553 FrameTime: 1.808 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 553 FrameTime: 1.808 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 557 FrameTime: 1.795 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 552 FrameTime: 1.812 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 459 FrameTime: 2.179 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 466 FrameTime: 2.146 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 548 FrameTime: 1.825 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 539 FrameTime: 1.855 ms
                                  glmark2 Score: 366 

With 4k fullscreen i get a score of 56

Used a ubuntu 21.10 with wayland/weston and mesa from this ppa: https://launchpad.net/~kisak/+archive/ubuntu/kisak-mesa