Add and use DisplayHotplugConnectModeDetectedAtomReporter, which logs
all valid modes of a hotplugged display.
Change-Id: Ie93487ad8e4936195e3d949ce46034c5ec4fda83
Add DisplayRefreshRatesChangedAtomReporter, which reports the changed
refresh rates of all the active displays managed by drm_hwcomposer.
Change-Id: I03a81c667c44160dc319a899a3bd9a8bc527a382
With the legacy Backend class renamed to CompositionPlanner, rename the
PipelineCreator interface to Backend. This interface maps most closely
to the concept of the "Backend".
Add some documentation to various Backend related classes.
Change-Id: I5d6a7afcebb9d0015c3d7629bf8c10324c8f07df
Allow classes to inherit from GenericPipelineCreator and use it for
creating the DrmDisplayPipeline, but override which CompositionPlanner
is used.
Extract the GetFlattenedComposition function into a static function that
can be called from any backend.
Change-Id: Id75705b969eb6d23fbc6147c496ac3f3e9956abf
Rename the generic CompositionPlanner implementation to
GenericCompositionPlanner, and abstract the CompositionPlanner
interface.
Change-Id: I39d6fd44956d77669271999dd83fc78eebec742a
With the Backend concept expanding to also include the initial display
configuration and creation of DrmDisplayPipeline, rename the Backend
class to more precisely reflect its purpose.
Change-Id: I8a9a0d49242771e5df6e80cd50f0b2b0670c2de2
This change adds the buildflag HAS_LIBSYNC for managing
availability of libsync. This is necessary for the
unittests target for which libsync doesn't provide the
necessary variant.
DrmAtomicStateManager.cpp is the only file which depends
on libsync. Guards have been added using the HAS_LIBSYNC
flag, such that any method which would depend on libsync
is now stubbed when it is unavailable.
Change-Id: I101083074a9fad98e1c40c27b55f2eddf1c53581
In preparation for rebuilding all CI containers to use Android 16,
update CI/build variables to use Android 16 and Android SDK 36.
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
Since libbase is now part of hwcomposer.drm_defaults, meson builds also
need the `base` dependency to avoid linking errors.
Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
The IStats service provides an interface for reporting metrics from
vendor processes through the IStats::reportVendorAtom interface.
The type and ordering of the data in a VendorAtom are determined by a
proto definition which is typically OEM-specific. The code to construct
the VendorAtom is generated from the proto definition.
Add a soong config variable in the DRMHWC config namespace to enable the
atom reporting. Currently there is only one such implementation.
atom_reporter: Set this to configure OEM-specific atom reporting.
With the config variable omitted, reporting will be disabled and a stub
implementation is used, ensuring no build or runtime dependency or usage
of the IStats service.
Change-Id: I832adbd42412db1ab4c9403c1da60fa075443caa
Signed-off-by: Drew Davenport <ddavenport@google.com>
CompositionStats struct is a copy of HwcDisplay::Stats and is extracted
from HwcDisplay as a prestep for supporting stats reporting beyond
dumpsys.
CompositionStatsProvider interface can be implemented by a class that
will poll all displays and return a display->CompositionStats map for
the cumulative stats for each display.
CompositionStatsTracker is a helper class that tracks the state of the
last queried stats and calculates the delta between the last stats and
the currently pulled stats. A Callback function can be passed into the
Report function which will be called for each display, with the
cumulative and delta stats as arguments.
Change-Id: I4200df5b41a4dbc612160aec038c83336b68bc4b
Signed-off-by: Drew Davenport <ddavenport@google.com>
Implement a function to set HDR metadata on the connector. Support HDR10
and HLG, which are common HDR types.
Change-Id: Id3dbe8eea2ee6b8ba700af23845a43e2070dd14e
Signed-off-by: Sasha McIntosh <sashamcintosh@google.com>
Updating the Docker configuration to use new aospless tarball that
contains the required static libdisplay_info library for edid parsing.
Change-Id: Iccc893d4dabde36caca3da3e71d8b26193a82404
Signed-off-by: Lucas Berthou <berlu@google.com>
Check the "Present Not Reliable" property to determine if the capability
PRESENT_FENCE_IS_NOT_RELIABLE should be enabled or not.
The virtio gpu module sends frames to the host as fast as possible and
does not emulate "real display timing". Devices using the virtio gpu
module (for example, the virtual Android device Cuttlefish) should set
the following property to "true" to enable the capability:
ro.vendor.hwc.drm.present_not_reliable.enabled
For example, in an Android BoardConfig.mk:
PRODUCT_VENDOR_PROPERTIES += \
vendor.hwc.drm.present_not_reliable.enabled=true
Signed-off-by: Tim Van Patten <timvp@google.com>
Implements the HWC3 frontend by calling the HWC2 interfaces already
exposed through DrmHwc, HwcDisplay, HwcLayer, and so on.
Convert between hwc2 types and hwc3 types in ComposerClient.
The following changes from !238 were used as a basis for this change,
and squashed together:
(drm_hwcomposer: Connect ComposerClient with HwcDisplay)
(drm_hwcomposer: Implement HWC3 frontend by calling down to HWC2)
The projects [1, 2] were used as a reference for the implementation.
[1]: https://android.googlesource.com/platform/hardware/google/graphics/common/+/refs/heads/main/hwc3/
[2]: https://android.googlesource.com/device/generic/goldfish-opengl/+/refs/heads/master/system/hwc3/
Co-authored-by: Normunds Rieksts <normunds.rieksts@arm.com>
Co-authored-by: Dennis Tsiang <dennis.tsiang@arm.com>
Change-Id: I98c10175d5c5f01aec1e192863238e16aa1537ec
Signed-off-by: Drew Davenport <ddavenport@chromium.org>
Signed-off-by: Drew Davenport <ddavenport@google.com>
Adds a stub implementation of the HWC3 interface and service.
This is a barebones implementation of HWC3 interface that should contain
all the necessary code to build a HWC3 module but provides no
functionality.
The project [1] was used as a reference.
[1]: https://android.googlesource.com/platform/hardware/google/graphics/common/+/refs/tags/android-13.0.0_r18/hwc3/
Change-Id: I99754bb72f12183a94b24b7182cb7857173b31d2
Co-authored-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Signed-off-by: Normunds Rieksts <normunds.rieksts@arm.com>
Signed-off-by: Drew Davenport <ddavenport@google.com>
Using vsync means consume some CPU time every frame for
IRQ -> Kernel_Thread -> UserSpace_listener thread transitions.
Framework tries to reduce vsync usage to the minimum, by using timelines
instead.
New flattening controller thread wakes-up only once per second.
This commit also removes flattening info from dumpsys. Practice shows
that it is almost useless. Instead debugging can be done using ALOGV
dumps.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
We use too much dup() system calls for present fence propagating.
Also when propagating acquire fence we use additional logic for
skipping such propagation for the validate/test cycle.
Both issues can be solved by introducing SharedFd, which will track
reference count of fd object.
After that the UniqueFd is used very rarely and can be simplified by
wrapping it into std::unique_ptr without caring too much of adding
an extra malloc/free operation.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>