s5p-mfc: Fix encoder control 15 issue
PATCH 1/1 s5p-mfc: Fix encoder control 15 issue
mfc-encoder is not working in the latest kernel giving the erorr "Adding control (15) failed". Adding the missing step parameter in this control to fix the issue.
--- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 + 1 file changed, 1 insertion(+)
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +1 -0
@@ -232,6 +232,7 @@ static struct mfc_control controls[] = { .minimum = 0, .maximum = 1, .default_value = 0, + .step = 1, .menu_skip_mask = 0, }, {
Signature · 1 line
1.7.9.5
Hi Arun,
Quoted 3 lines · Arun Kumar K
mfc-encoder is not working in the latest kernel giving the erorr "Adding control (15) failed". Adding the missing step parameter in this control to fix the issue.
Do you mean this problem was not observed in 3.8 kernel and something has changed in the v4l2 core so it fails in 3.9-rc now ? Or is it related to some change in the driver itself ?
Quoted 10 lines
Signed-off-by Arun Kumar K<[email protected]>--- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +0
-0
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c static struct mfc_control controls[] = { · line 238
Quoted 7 lines
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +1
-0@@ -232,6 +232,7 @@ static struct mfc_control controls[] = { .minimum = 0, .maximum = 1, .default_value = 0, + .step = 1, .menu_skip_mask = 0, }, {
Regards,
Sylwester
Hi Sylwester,
Quoted 5 lines · Sylwester Nawrocki
Hi Arun,
Quoted 1 line · Arun Kumar K
Quoted 8 lines
Quoted 3 lines
mfc-encoder is not working in the latest kernel giving the erorr "Adding control (15) failed". Adding the missing step parameter in this control to fix the issue.
Do you mean this problem was not observed in 3.8 kernel and something has changed in the v4l2 core so it fails in 3.9-rc now ? Or is it related to some change in the driver itself ?
v4l2_ctrl_new() uses check_range() for control range checking (which is added newly).
This function expects 'step' value for V4L2_CTRL_TYPE_BOOLEAN type control. If 'step' value doesn't match to '1', it returns -ERANGE error.
Its a change in v4l2 core.
Regards,
Shaik Ameer Basha
Quoted 29 lines
Quoted 13 lines
Signed-off-by Arun Kumar K<[email protected]>--- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 1 + 1 file changed, 1 insertion(+)drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +0
-0drivers/media/platform/s5p-mfc/s5p_mfc_enc.c static struct mfc_control controls[] = { · line 238
Quoted 7 lines
drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +1
-0@@ -232,6 +232,7 @@ static struct mfc_control controls[] = { .minimum = 0, .maximum = 1, .default_value = 0, + .step = 1, .menu_skip_mask = 0, }, {Regards,
Sylwester--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Sylwester,
Quoted 3 lines
Do you mean this problem was not observed in 3.8 kernel and something has changed in the v4l2 core so it fails in 3.9-rc now ? Or is it related to some change in the driver itself ?
I saw this problem in 3.9rc1 and also in 3.8 stable.
But I havent seen this in media-tree v3.9 staging branch.
I didnt dig in much into what changed in v4l2 framework for this to happen now.
Regards
Arun
Quoted 6 lines · Shaik Ameer Basha
v4l2_ctrl_new()usescheck_range()for control range checking (which is added newly).
This function expects 'step' value forV4L2_CTRL_TYPE_BOOLEANtype control. If 'step' value doesn't match to '1', it returns-ERANGEerror.Its a change in v4l2 core.
Yes, I suspected the issue appeared after recent change
commit 88e85861b4f77ae29495ee05574c98dd0c6c3037
[media] v4l2-ctrl: Add helper function for the controls range update
Then it is related to to 3.9-rc1+ kernels only. I have verified it on 3.8 based kernel and there is no issue with drivers that do not initialize step value for boolean type controls properly. It only appears after the above commit is applied.
I've picked your fixup patches into v3.9-fixes branch and will try to send them out this week, together with other patches from our side.
Regards,
Sylwester
Quoted 7 lines · Arun Kumar K
Quoted 3 lines
Do you mean this problem was not observed in 3.8 kernel and something has changed in the v4l2 core so it fails in 3.9-rc now ? Or is it related to some change in the driver itself ?
I saw this problem in 3.9rc1 and also in 3.8 stable.
But I havent seen this in media-tree v3.9 staging branch.
I didnt dig in much into what changed in v4l2 framework for this to happen now.
Thanks Arun. This is strange though, I haven't observe the problem in 3.8. The issue seems to be related to
commit 88e85861b4f77ae29495ee05574c98dd0c6c3037
[media] v4l2-ctrl: Add helper function for the controls range update
which appeared in 3.9-rc1 only.
Regards,
Sylwester