armbian / linux-rockchip

Improved Rockchip Linux
Other
115 stars 161 forks source link

media: rockchip: hdmirx: add VIDIOC_G_PARM #139

Closed amazingfate closed 4 months ago

amazingfate commented 7 months ago

This will let obs linux-v4l2 plugin show display from hdmirx of rk3588. OBS code using these API: https://github.com/obsproject/obs-studio/blob/master/plugins/linux-v4l2/v4l2-helpers.c#L244-L254

@ramiropolla @rigaya

amazingfate commented 7 months ago

I don't know readbuffers value exactly, it just works. Maybe not returning it will work, I will test. I will add check for type V4L2_BUF_TYPE_VIDEO_CAPTURE and remove vidioc_s_parm to see if it will work.

amazingfate commented 7 months ago

Add checking parm->type is V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, remove vidioc_s_parm and return of readbuffers. Tested on obs with mesa llvmpipe driver, panfork driver failed with gl call error.

amazingfate commented 4 months ago

This commit is not that useful on 5.10 kernel because GPU support is bad. Since we have panthor support on 6.1, I will test with panthor and create a pr for 6.1 kernel.