Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media: rockchip: hdmirx: add VIDIOC_G_PARM #139

Closed
wants to merge 1 commit into from

Conversation

amazingfate
Copy link
Collaborator

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

Copy link
Contributor

@ramiropolla ramiropolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a kernel dev, but after a quick glance and checking how other drivers do it, I see at least two issues:

  • hdmirx_g_parm() is not checking for parm->type like other drivers
  • if changing parameters is not supported, then we shouldn't implement vidioc_s_parm() (although I see there's a function called hdmirx_s_dv_timings())
  • I'm not sure about the readbuffers. where did you get that info?

@amazingfate
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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 amazingfate marked this pull request as ready for review January 12, 2024 12:30
@amazingfate amazingfate changed the title media: rockchip: hdmirx: add VIDIOC_S_PARM and VIDIOC_G_PARM media: rockchip: hdmirx: add VIDIOC_G_PARM Jan 12, 2024
@amazingfate
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants