Commit graph

1526 commits

Author SHA1 Message Date
Niklas Söderlund
c6e9c750f6 libcamera: raspberrypi: Align include guard
The preprocessor directive '#pragma once' is non-standard, replace it
with the include guard used elsewhere in libcamera.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 22:25:48 +02:00
Laurent Pinchart
f1cac536f4 libcamera: Mark logPrefix() implementations with override
Virtual functions overriden in derived classes should be marked with the
override keyword. Do so for the logPrefix() implementations inheriting
from the Loggable class.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-06-05 22:07:56 +03:00
Paul Elder
b60a7d708a libcamera: ipa_context_wrapper: Fix typo in comments
Fix a typo in a comment in ipa_context_wrapper.cpp.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-05 21:01:04 +09:00
Marvin Schmidt
78150899dd libcamera: camera: Order parameter documentation correctly
Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 09:29:40 +01:00
Marvin Schmidt
99e8f21926 libcamera: ipa_module: Fix typo in function description
Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 09:29:40 +01:00
Marvin Schmidt
46b3402b59 docs: Markup LD_PRELOAD as code
LD_PRELOAD is an environment variable, use code markup to reflect that
semantic

Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 09:29:40 +01:00
Marvin Schmidt
c3c0afd94b docs: coding-style: Change full stop to colon
Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 09:29:40 +01:00
Marvin Schmidt
e18c7a14a3 docs: Remove trailing whitespace
Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 09:29:40 +01:00
Marvin Schmidt
90c7ce6ad2 docs: Remove stray HTML tags
Signed-off-by: Marvin Schmidt <marvin.schmidt1987@gmail.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-05 09:29:40 +01:00
Kieran Bingham
4bd25c6f51 libcamera: pipeline: vimc: Remove unsupportable format
The DRM(BGRA8888)/V4L2(ARGB8888) format is not supportable by the current
configurations of VIMC.

Remove it from the list of supported configurations.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-04 12:29:30 +01:00
Kieran Bingham
3d978a5655 libcamera: pipeline: vimc: Skip unsupported formats
Older kernels do not support all 'reported' formats. Skip them on those
kernels.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-04 11:03:00 +01:00
Umang Jain
a69a8ffb02 libcamera: camera: Return -EINVAL if any stream is null while configure()
Fail and return the Camera::configure() operation if any
of the stream turns out to be a nullptr even after the
PipelineHandler handler seems to have configured the config
successfully. This prevents a null-dereference below in the
loop.

Reported-by: Coverity CID=279069
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-04 11:02:39 +01:00
Umang Jain
3706b716eb test: log: log_api: Close open fds on error paths
Reported-by: Coverity CID=279091
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-04 11:02:38 +01:00
Umang Jain
5bb6607933 test: log: log_process: Close open fds on error paths
Reported-by: Coverity CID=279097
Signed-off-by: Umang Jain <email@uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-04 11:02:38 +01:00
Naushir Patuck
5dfd2bfc0d pipeline: raspberrypi: Fix for staggered write on reset
The reset function in staggered write was using the wrong index when
looking for the last updated camera parameters. This would cause
possibly stale exposure values to be written to the camera on a
mode switch for captures.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-04 09:32:54 +01:00
Laurent Pinchart
1a77984c89 libcamera: pipeline: vimc: Use appropriate media bus format
Pick the correct media bus format based on the video pixel format on the
capture node.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-06-04 11:02:33 +03:00
Jacopo Mondi
3714034eb7 libcamera: camera: Drop full stop from \return
We don't use full stops at the end of \return directives in Doxygen
documentation. Drop it.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-04 09:58:36 +02:00
Jacopo Mondi
64f4f667ed android: hal_manager: Do not hardcode properties
The CameraHalManager::getCameraInfo() method hardcodes the camera facing
side and orientation (which corresponds, confusingly, to libcamera's
location and rotation properties).

Instead of hard-coding the values based on the camera id, inspect the
libcamera properties that report the camera location and rotation in a
new initialize() method, and use them to report the android camera info
and to populate the static metadata buffer.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-04 09:58:02 +02:00
Jacopo Mondi
0ffb3a20ed android: hal_manager: Report supported API version
Report the supported API version in the camera_info structure provided
to the framework.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-04 09:51:31 +02:00
Jacopo Mondi
a7b9277e45 android: camera_device: Provide log prefix
Make the CameraDevice a Loggable subclass and provide a logPrefix()
method to identify which camera the log output refers to.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-06-04 09:50:52 +02:00
Madhavan Krishnan
5f2f9406ce test: Fixed the compilation issue
The return value of write() function is ignored, causing the following
compiler error|warning with gcc version 5.4

error: ignoring return value of 'ssize_t write(int, const void*, size_t)'

Fix this by storing the return value of write() and return a test error in
case of failure.

Reported-by: Coverity CID=284605
Signed-off-by: Madhavan Krishnan <madhavan.krishnan@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-06-02 23:40:48 +03:00
Laurent Pinchart
e239ded90b libcamera: Declare functions before variables in class definitions
The preferred coding style in libcamera is to declare private functions
before private variables in class definitions. This rule isn't followed
by some of the internal classes. Update them accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
2020-06-02 19:26:22 +03:00
Kieran Bingham
16c5f44c69 qcam: viewfinder: Use correct DRM/QImage mappings
When the native pixel formats supported by QT were introduced, the
RGB/BGR formats were inverted.

Swap the BGR888 and RGB888 mappings accordingly.

Fixes: f890a57b7a ("qcam: viewfinder: Add support for more native formats")
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-28 12:05:44 +01:00
Laurent Pinchart
2d5a369b2c v4l2: Relicense V4L2 compatibility layer under LGPL
The V4L2 compatibility layer is licensed under the GPL. It is compiled
as a binary separate from libcamera.so, and is loaded into the address
space of processes through LD_PRELOAD to intercept calls to the C
library.

It is our understanding and intent that the GPL license doesn't
propagate to the binaries whose calls are intercepted, considering those
binaries are not derivative work of the V4L2 compatibility layer and are
not designed to be linked to the V4L2 compatibility layer. There is
however a possibly grey area if binaries are packaged with a shell
script wrapper that loads the V4L2 compatibility layer. This could lead
to license-related issues if such packaging is performed by Linux
distributions or system integrators.

To clarify the intent and lift the doubts, relicense the V4L2
compatibility layer under the LGPL. The V4L2 compatibility layer code
itself still benefits from the license protection, while its usage with
third-party binaries is clearly allowed as intended.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Paul Elder <paul.elder@ideasonboard.com>
Acked-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Acked-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
2020-05-28 04:31:05 +03:00
Laurent Pinchart
2ed5259098 libcamera: pipeline: simple: Add scaling support
Use the converter to implement scaling.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-22 04:54:03 +03:00
Laurent Pinchart
fd76304e00 libcamera: pipeline: simple: converter: Add scaling support
Extend the SimpleConverter to support scaling, with reporting of the
minimum and maximum output sizes supported for a given input size.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-22 04:54:03 +03:00
Laurent Pinchart
5331051c35 libcamera: pipeline: simple: Add stride support
Report the stride when configuring the camera. The stride is retrieved
from the capture device first, and overridden by the converter if used.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-22 04:54:03 +03:00
Laurent Pinchart
09eeec1520 libcamera: geometry: Set steps to 0 in default SizeRange constructor
The default SizeRange constructor initializes the min and max members,
but leaves the hStep and vStep members uninitialized. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <email@uajain.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-22 04:54:02 +03:00
Jacopo Mondi
e8cc0a2658 libcamera: raspberry: Fix segfault in ~RPiCameraData()
The RPiCameraData class destructor tries to stop its ipa_ instance
without making sure it has been initialized.

If the RPiCameraData gets destroyed before its ipa_ member is
initialized, for example if the sensor initialization fails during the
match() function, a nullptr dereference segfault is triggered preventing
a graceful library teardown.

Fix this by checking for ipa_ to be initialized before stopping it.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-05-21 13:35:29 +02:00
Jacopo Mondi
c31785156b libcamera: camera_sensor: Update properties parsing
Update the properties parsing routine in the CameraSensor class to use
the newly defined V4L2 control V4L2_CID_CAMERA_ORIENTATION in place of
the downstream V4L2_CID_CAMERA_SENSOR_LOCATION which has now been
removed.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-05-21 13:31:59 +02:00
Jacopo Mondi
9386f9ac7a include: linux: Update v4l2 ctrls for properties
The version of the v4l2-controls.h header file shipped by libcamera had
deviated from the upstream one, as it included definitions for v4l2
controls that report camera properties, which were not accepted
upstream at the time the header file was updated.

Now that the controls definition has been accepted in the master branch
of the linux-media kernel tree, update include/linux/v4l2-controls.h with
the upstream-accepted definition of the control ids that describe camera
properties.

The control definition has been imported from the Linux kernel header
files generated from the most recent linux-media master branch, at
revision
ad3a44cbd1b2e ("media: i2c: imx219: Parse and register properties")

Instead of updating the whole header, just update the definition of V4L2
controls that describe camera properties. A full header update will be
performed at a future Linux kernel release.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2020-05-21 13:31:25 +02:00
Laurent Pinchart
dfa25e1833 libcamera: v4l2_videodevice: Use FileDescriptor "fd move" constructor
Use the newly added "fd move" constructor of the FileDescriptor class to
avoid dup() + close().

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2020-05-19 18:08:27 +03:00
Laurent Pinchart
c7463138c6 test: file-descriptor: Add "fd move" constructor test
Add a test for the newly added "fd move" constructor.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2020-05-19 18:08:11 +03:00
Laurent Pinchart
206fada99d libcamera: file_descriptor: Implement move semantics for constructor
The FileDescriptor class, when constructed from a numerical file
descriptor, duplicates the file descriptor and takes ownership of the
copy. The caller has to close the original file descriptor manually if
needed. This is inefficient as the dup() and close() calls could be
avoided, but can also lead to resource leakage, as recently shown by
commit 353fc4c223 ("libcamera: v4l2_videodevice: Fix dangling file
descriptor").

In an attempt to solve this problem, implement move semantics for the
FileDescriptor constructor. The constructor taking a numerical file
descriptor is split in two variants:

- A "fd copy" constructor that takes a const lvalue reference to a
  numerical file descriptor and duplicates it (corresponding to the
  current behaviour).
- A "fd move" constructor that takes a rvalue reference to a numerical
  file descriptor and takes ownership of it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2020-05-19 18:07:49 +03:00
Laurent Pinchart
a237dbeb7e (q)cam: Fix header guards
Several headers belonging to cam and qcam use __LIBCAMERA_*_H__ as a
header guard. They're not part of the libcamera core, use __CAM_*_H__
and __QCAM_*_H__ instead, similarly to all other headers of cam and
qcam.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-18 16:35:55 +03:00
Naushir Patuck
353fc4c223 libcamera: v4l2_videodevice: Fix dangling file descriptor
The FileDescriptor constructor used in V4L2VideoDevice::exportDmabufFd()
creates a duplicate of the fd to store in the object. The original
fd returned by the VIDIOC_EXPBUF ioctl was never closed, and left
dangling. This would cause out of memory conditions if the camera stream
was repeatedly started and stopped.

This change closes the original fd explicitly, fixing the leak.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2020-05-18 14:02:32 +03:00
Laurent Pinchart
aa7e7175c7 meson: Rename variables storing headers lists
The list of public, IPA and internal header files are stored in three
meson variables, named libcamera_api, libcamera_ipa_api and
libcamera_headers respectively. The lack of uniformity is a bit
confusing. Fix it by renaming those variables to
libcamera_public_headers, libcamera_ipa_headers and
libcamera_internal_headers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-05-18 12:56:20 +03:00
Laurent Pinchart
f934fd1cb9 libcamera: Move IPA headers from include/ipa/ to include/libcamera/ipa/
The IPA headers are installed into $prefix/include/libcamera/ipa/, but
are located in the source tree in include/ipa/. This requires files
within libcamera to include them with

 #include <ipa/foo.h>

while a third party IPA would need to use

 #include <libcamera/ipa/foo.h>

Not only is this inconsistent, it can create issues later if IPA headers
need to include each other, as the first form of include directive
wouldn't be valid once the headers are installed.

Fix the problem by moving the IPA headers to include/libcamera/ipa/.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
2020-05-16 03:38:47 +03:00
Laurent Pinchart
93e72b695e libcamera: Move internal headers to include/libcamera/internal/
The libcamera internal headers are located in src/libcamera/include/.
The directory is added to the compiler headers search path with a meson
include_directories() directive, and internal headers are included with
(e.g. for the internal semaphore.h header)

  #include "semaphore.h"

All was well, until libcxx decided to implement the C++20
synchronization library. The __threading_support header gained a

  #include <semaphore.h>

to include the pthread's semaphore support. As include_directories()
adds src/libcamera/include/ to the compiler search path with -I, the
internal semaphore.h is included instead of the pthread version.
Needless to say, the compiler isn't happy.

Three options have been considered to fix this issue:

- Use -iquote instead of -I. The -iquote option instructs gcc to only
  consider the header search path for headers included with the ""
  version. Meson unfortunately doesn't support this option.

- Rename the internal semaphore.h header. This was deemed to be the
  beginning of a long whack-a-mole game, where namespace clashes with
  system libraries would appear over time (possibly dependent on
  particular system configurations) and would need to be constantly
  fixed.

- Move the internal headers to another directory to create a unique
  namespace through path components. This causes lots of churn in all
  the existing source files through the all project.

The first option would be best, but isn't available to us due to missing
support in meson. Even if -iquote support was added, we would need to
fix the problem before a new version of meson containing the required
support would be released.

The third option is thus the only practical solution available. Bite the
bullet, and do it, moving headers to include/libcamera/internal/.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
2020-05-16 03:38:11 +03:00
Laurent Pinchart
79c5df21dd libcamera: pipeline: raspberrypi: Move StaggeredCtrl to libcamera namespace
The StaggeredCtrl class, part of the Raspberry Pi pipeline handler, is
part of libcamera. Move it to the libcamera namespace to simplify usage
of libcamera APIs.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2020-05-15 12:08:38 +03:00
Laurent Pinchart
4d536996c7 libcamera: pipeline: raspberrypi: Don't inline all of StaggeredCtrl
The StaggeredCtrl class has large functions, move them to a .cpp file
instead of inlining them all to reduce the binary size.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2020-05-15 12:08:38 +03:00
Laurent Pinchart
924778eb07 ipa: Only sign IPA modules that are being installed
The ipa-sign-install.sh script, run when installing libcamera, signs all
IPA modules present in the module directory. This would result in
third-party modules being signed if any are present in the directory.
Fix it by explicitly passing the list of IPA modules to the
ipa-sign-install.sh script.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
2020-05-13 22:06:43 +03:00
Laurent Pinchart
e8655c2161 utils: raspberrypi: ctt: Fix pycodestyle E302
E302 expected 2 blank lines, found 0

Note that issues are still flagged, due to the use of docstrings as
multi-lines comments. This will be addressed separately.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 17:00:25 +03:00
Laurent Pinchart
33c4221e87 utils: raspberrypi: ctt: Fix pycodestyle E305
E305 expected 2 blank lines after class or function definition

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 17:00:13 +03:00
Laurent Pinchart
2b21c6ac86 utils: raspberrypi: ctt: Fix pycodestyle E741
E741 ambiguous variable name 'l'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 17:00:07 +03:00
Laurent Pinchart
4939e114b6 utils: raspberrypi: ctt: Fix pycodestyle W504
W504 line break after binary operator

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 17:00:04 +03:00
Laurent Pinchart
57e999a4ae utils: raspberrypi: ctt: Fix pycodestyle E722
E722 do not use bare 'except'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 17:00:01 +03:00
Laurent Pinchart
5eae909293 utils: raspberrypi: ctt: Fix pycodestyle E721
E721 do not compare types, use 'isinstance()'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:59:58 +03:00
Laurent Pinchart
f8e9810020 utils: raspberrypi: ctt: Fix pycodestyle E713
E713 test for membership should be 'not in'

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:59:55 +03:00
Laurent Pinchart
a49fd8ea1d utils: raspberrypi: ctt: Fix pycodestyle E116 and E117
E116 unexpected indentation (comment)
E117 over-indented (comment)

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
2020-05-13 16:59:51 +03:00