Age | Commit message (Collapse) | Author |
|
1. Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
2. Remove DrmDevice self-reference.
3. Replace shared_ptr reference to DrmDevice in DrmFbImporter with a
pointer, making ResourceManager only owner of DrmDevice and its
chilren.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Implement DrmCrtc instantiation through CreateInstance() static method,
which helps to reduce complexity of DrmDevice::Init() function.
Move CRTC-to-Display binding information to the DrmDevice class.
Move drm/DrmCrtc.h to Normal clang-tidy checks list by fixing
clang-tidy findings.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
This allow to throw away few lines from DrmDevice::Init() making it less
complicated.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Previously, the fractional part was truncated.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Some of files require small adjustments to move into NORMAL checks list.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
In addition move logging to GetPlaneProperty(), which allow to reduce
number of LoC by ~50 LoC and increase readability.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
This logic was removed accidentaly during cleanup. Restore it.
Enables hardware-accelerated composition on raspberry-pi 4.
Fixes: 5063d53ddf7d ("drm_hwcomposer: Improve handling of blending mode")
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Benefits:
1. Improve readability.
2. Less logic in runtime slightly reduces overhead on CPU.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Adding enum value into map looks ugly.
Create a wrapper in order to fix it.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
A few rearrangements to reduce LoC and increase readability.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
1. Convert to DrmHwcBlending inside HWC hook.
2. Use map for enum_values for cleaner atomic commit preparation.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Should slightly reduce CPU load at runtime + improve
atomic commit readability.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Part of "frontend" isolation activities.
Also allows to additionally simplify atomic commit.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Remove unnecessary property getter/setters from DrmPlane class.
As result: Removed ~50 unnecessary LoC. Improved readability.
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
|
|
Remove DrmHwcBuffer class. Wrap remaining logic into
DrmHwcLayer class.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
The first tuple element returned by GetEnumValueWithName is just the index
of that enum, which is not useful.
Signed-off-by: Benjamin Li <benl@squareup.com>
|
|
Currently we only check for the presence of any rotation support -- but
hardware may choose to, say, only support 180 degree rotation. Respect
the specific rotation capabilities reported through DRM properties.
Signed-off-by: Benjamin Li <benl@squareup.com>
|
|
It is more common to validate the layer for the proper object.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
Build bufferinfo/BufferInfoGetter.cpp and drm/DrmPlane.cpp
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Our code isn't ready for the following checks therefore keep disabled
-cppcoreguidelines-pro-bounds-array-to-pointer-decay
-cppcoreguidelines-pro-bounds-constant-array-index
-cppcoreguidelines-pro-bounds-pointer-arithmetic
-cppcoreguidelines-pro-type-cstyle-cast
-cppcoreguidelines-pro-type-vararg
-cppcoreguidelines-avoid-magic-numbers
-cppcoreguidelines-macro-usage
-cppcoreguidelines-avoid-c-arrays
+ fixed existing tidy warnings for these checks.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Drm hwcomposer project has some code-style inconsistencies.
This is the initial step to unify code-style of the code.
Clang-tidy is a great tool which can not only suggest correct styling,
but also allow predicting the errors in the code and suggest correct
coding approaches to avoid potential weaknesses.
CI was tuned to check clang-tidy recommendation for some part of the
code which is ready ATM (can be built outside AOSP tree).
For this part a limited set of clang-tidy checks has applied (coarse check).
Header files aren't checked at all.
Starting from now new code files must be included into the list that is
checked by almost all clang-tidy checks (fine checklist). New header files
should be also included into this list.
See '.gitlab-ci-clang-tidy-fine.sh'.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Build android-agnostic code in linux environment.
Enable static code analysis using clang-tidy.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
|
|
Starting from the linux-v4.17, the DRM module has support for different
non-RGB color encodings that are controlled through plane-specific
COLOR_ENCODING and COLOR_RANGE properties.
This patch creates a matching between the HWC layer dataspace which is
supported by DRM driver and DRM plane properties.
Signed-off-by: Matvii Zorin <matvii.zorin@globallogic.com>
|
|
There are some use-cases for checking formats supported by given
plane. drmModePlane already contains reqired data, so it simply could
be saved into DrmPlane, no need to query any additional stuff.
Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
|
|
Main goal is to increase readability of file names.
AOSP uses camelcase for files in many projects.
Lets do the same for drm_hwcomposer.
Keep platform/ directory as is, since class names is different from file names.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Change-Id: I7e992357851c2a86711f4da1241c4d507359e56b
|