[PATCH v5] vb2: check for sane values from queue_setup

2018-09-17 Thread Johan Fjeldtvedt
being 0. Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index f32ec7342ef0..14cedf42e907 100644

[PATCH v4] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
being 0. v4: check num_planes, not num_buffers Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index

[PATCH v3] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
being 0. Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index f32ec7342ef0..5741e95e6af1 100644

[PATCH v2] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
Warn when driver sets 0 number of planes or 0 as plane sizes. Signed-off-by: Johan Fjeldtvedt --- drivers/media/common/videobuf2/videobuf2-core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2

[PATCH] vb2: check for sane values from queue_setup

2018-09-11 Thread Johan Fjeldtvedt
Warn when driver sets 0 number of planes or 0 as plane sizes. --- drivers/media/common/videobuf2/videobuf2-core.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c index

[PATCHv2] pulse8-cec: store logical address mask

2016-09-07 Thread Johan Fjeldtvedt
In addition to setting the ACK mask, also set the logical address mask setting in the dongle. This is (and not the ACK mask) is persisted for use in autonomous mode. The logical address mask to use is deduced from the primary device type in adap->log_addrs. Signed-off-by: Johan Fjeldtvedt &

[PATCH 2/2] pulse8-cec: store logical address mask

2016-08-30 Thread Johan Fjeldtvedt
In addition to setting the ACK mask, also set the logical address mask setting in the dongle. This is (and not the ACK mask) is persisted for use in autonomous mode. The logical address mask to use is deduced from the primary device type in adap->log_addrs. Signed-off-by: Johan Fjeldtvedt &

[PATCH 1/2] pulse8-cec: fixes

2016-08-30 Thread Johan Fjeldtvedt
Fix some small things: - clean up setup function - use MSGEND instead of 0xfe - don't assign "return value" from cec_phys_addr to err, it has return type void. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/p

[PATCH 2/2] cec-follower: extend man page

2016-08-26 Thread Johan Fjeldtvedt
The man page is extended with some more information about the tool and what it does, and a SEE ALSO section is added. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-follower/cec-follower.1.in | 45 ++-- 1 file changed, 38 insertions

[PATCH 1/2] cec-compliance: extend man page

2016-08-26 Thread Johan Fjeldtvedt
The man page is extended with a more detailed description including a more in-depth explanation of the different test result codes. An example of how to run tests is also included, and a SEE ALSO section is added. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-complian

[PATCH] cec-compliance: recognize PRESUMED_OK and REFUSED as ok

2016-08-26 Thread Johan Fjeldtvedt
It is only checked for PRESUMED_OK and REFUSED when performing remote tests, but these test result codes are also used elsewhere, so checking for them is moved to the ok function. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.cpp | 9 +++--

[PATCHv2] cec tools: exit if device is disconnected

2016-08-24 Thread Johan Fjeldtvedt
If the CEC device is disconnected, ioctl will return ENODEV. This is checked for in cec-ctl (when monitoring), cec-follower and cec-compliance, to make these exit when the CEC device disappears. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.

[PATCH] cec tools: exit when CEC device is disconnected

2016-08-24 Thread Johan Fjeldtvedt
ENODEV instead of EIO when devices are disconnected. Johan Fjeldtvedt (1): cec tools: exit if device is disconnected utils/cec-compliance/cec-compliance.h | 9 +++-- utils/cec-ctl/cec-ctl.cpp | 7 ++- utils/cec-follower/cec-processing.cpp | 14 -- 3 files

[PATCH] cec tools: exit if device is disconnected

2016-08-24 Thread Johan Fjeldtvedt
If the CEC device is disconnected, ioctl will return ENODEV. This is checked for in cec-ctl (when monitoring), cec-follower and cec-compliance, to make these exit when the CEC device disappears. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.

[PATCH] cec-ctl: print correct destination address for broadcast msgs

2016-08-24 Thread Johan Fjeldtvedt
When messages are broadcast, it is not necessary to supply a --to option to cec-ctl, but in that case the destination address was printed wrongly. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-ctl/cec-ctl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH] cec-compliance: fix Device OSD Transfer tests

2016-08-24 Thread Johan Fjeldtvedt
in interactive mode, we should wait for at least 20 s and ask the user if there was any change (according to the CEC 1.4b CTS). Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-test.cpp | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-)

[PATCHv2] cec-compliance: improve One Touch Play tests wrt. CTS 1.4b

2016-08-23 Thread Johan Fjeldtvedt
On, and changing to the correct input when receiving Image/Text View On (followed by Active Source) Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-test-power.cpp | 100 +--- 1 file changed, 67 insertions(+), 33 deletions(-) diff

[PATCH] cec-compliance: improve One Touch Play tests wrt. CTS 1.4b

2016-08-23 Thread Johan Fjeldtvedt
On, and changing to the correct input when receiving Image/Text View On (followed by Active Source) Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-test-power.cpp | 101 +--- 1 file changed, 68 insertions(+), 33 deletions(-) diff

[PATCH] cec-follower: check for Routing Information from TV

2016-08-22 Thread Johan Fjeldtvedt
A TV shall not send a Routing Information message as initiator. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-follower/cec-processing.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processi

[PATCHv2 2/4] pulse8-cec: serialize communication with adapter

2016-08-22 Thread Johan Fjeldtvedt
Make sending messages to the adapter serialized within the driver. send_and_wait is split into send_and_wait_once, which only sends once and checks for the result, and the higher level send_and_wait, which performs locking and retries. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.

[PATCHv2 3/4] pulse8-cec: add notes about behavior in autonomous mode

2016-08-22 Thread Johan Fjeldtvedt
The pulse8 dongle has some quirky behaviors when in autonomous mode. Document these. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/media/puls

[PATCHv2 0/4] pulse8-cec: Add support for storing and optionally restoring config

2016-08-22 Thread Johan Fjeldtvedt
warnings and spelling error - Add missing break - Don't propagate internal error code to user space Johan Fjeldtvedt (4): cec: allow configuration both from within driver and from user space pulse8-cec: serialize communication with adapter pulse8-cec: add notes about behavior in autonomous mode

[PATCHv2 1/4] cec: allow configuration both from within driver and from user space

2016-08-22 Thread Johan Fjeldtvedt
It makes sense for adapters such as the Pulse-Eight to be configurable both from within the driver and from user space, so remove the requirement that drivers only can call cec_s_log_addrs or cec_s_phys_addr if they don't expose those capabilities to user space. Signed-off-by: Johan Fjeldtvedt

[PATCHv2 4/4] pulse8-cec: sync configuration with adapter

2016-08-22 Thread Johan Fjeldtvedt
is unconfigured, autonomous mode is disabled. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 266 ++ 1 file changed, 228 insertions(+), 38 deletions(-) diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/d

[PATCH 2/4] pulse8-cec: serialize communication with adapter

2016-08-19 Thread Johan Fjeldtvedt
Make sending messages to the adapter serialized within the driver. send_and_wait is split into send_and_wait_once, which only sends once and checks for the result, and the higher level send_and_wait, which performs locking and retries. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.

[PATCH 4/4] pulse8-cec: sync configuration with adapter

2016-08-19 Thread Johan Fjeldtvedt
is unconfigured, autonomous mode is disabled. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 259 ++ 1 file changed, 221 insertions(+), 38 deletions(-) diff --git a/drivers/staging/media/pulse8-cec/pulse8-cec.c b/d

[PATCH 1/4] cec: allow configuration both from within driver and from user space

2016-08-19 Thread Johan Fjeldtvedt
It makes sense for adapters such as the Pulse-Eight to be configurable both from within the driver and from user space, so remove the requirement that drivers only can call cec_s_log_addrs or cec_s_phys_addr if they don't expose those capabilities to user space. Signed-off-by: Johan Fjeldtvedt

[PATCH 3/4] pulse8-cec: add notes about behavior in autonomous mode

2016-08-19 Thread Johan Fjeldtvedt
The pulse8 dongle has some quirky behaviors when in autonomous mode. Document these. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- drivers/staging/media/pulse8-cec/pulse8-cec.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/staging/media/puls

[PATCH] cec-follower/cec-compliance: fix bug in string conversion

2016-08-19 Thread Johan Fjeldtvedt
In all_dev_types2s: don't try to erase the last two characters in the string if it is empty. This was fixed in cec-ctl, so the same fix is applied to cec-compliance and cec-follower. Signed-off-by: Johan Fjeldtvedt <jaf...@gmail.com> --- utils/cec-compliance/cec-compliance.cpp | 4 +++-