fix(imx296): 降低 vertical_blankin 最小值以恢复 60fps 帧率#9
Open
ypwhs wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
IMX296 驱动中
V4L2_CID_VBLANK(vertical_blanking)的最小值被错误地设为默认值1162,导致:v4l2-ctl无法将vertical_blanking设置到 1162 以下。驱动注释本身已经写明对应关系:60fps -> vblank=37,50fps -> 262,30fps -> 1162。因此最小值应为 37,而非 1162。
修复方案
在
drivers/media/i2c/imx296.c中:IMX296_VBLANK_MIN 37U。V4L2_CID_VBLANK控制器的最小值从IMX296_VBLANK_DEFAULT改为IMX296_VBLANK_MIN,默认值保持 1162 不变。这样用户可以按需降低 vblank 以提升帧率:
测试验证
当前已在设备端确认
vertical_blanking控制范围最小为 1162,设置更低值会被钳位回 1162。合并本补丁后需要重新编译烧录boot.img,并验证:v4l2-ctl -d /dev/v4l-subdev3 --set-ctrl=vertical_blanking=37成功。