diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-12-10 14:23:07 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2020-12-10 14:23:07 +0100 |
commit | e0e4114f971407acfdf1e8173c86e2e08fa01077 (patch) | |
tree | 333c84a644ee429f049404f98d2810429e6b65c6 /utils/v4l2-compliance | |
parent | 56175f62bef28490aac748ca2edbc5908df928ff (diff) |
v4l2-compliance: fix two S_EDID tests
The final two S_EDID tests check what happens if the edid pointer
is NULL or 0x0eadbeef, but if no EDID is loaded when v4l2-compliance
is run, then 'blocks' is 0, and in that case the edid pointer is
ignored (S_EDID is interpreted as 'clear the EDID' in that case).
So set 'blocks' to 1 instead to ensure that these two tests actually
use the edid pointer and so return EFAULT.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils/v4l2-compliance')
-rw-r--r-- | utils/v4l2-compliance/v4l2-test-io-config.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/v4l2-compliance/v4l2-test-io-config.cpp b/utils/v4l2-compliance/v4l2-test-io-config.cpp index 677a3ac5..6f2a9ba9 100644 --- a/utils/v4l2-compliance/v4l2-test-io-config.cpp +++ b/utils/v4l2-compliance/v4l2-test-io-config.cpp @@ -577,7 +577,7 @@ static int checkEdid(struct node *node, unsigned pad, bool is_input) fail_on_test(edid.blocks == 0 || edid.blocks >= 256); fail_on_test(edid.pad != pad); } - edid.blocks = blocks; + edid.blocks = 1; edid.pad = pad; edid.edid = nullptr; ret = doioctl(node, VIDIOC_S_EDID, &edid); |