1
0
Fork 0
Commit graph

14 commits

Author SHA1 Message Date
Su Hong Koo
406a14f111 Add atom reporting for modes on hotplugged displays
Add and use DisplayHotplugConnectModeDetectedAtomReporter, which logs
all valid modes of a hotplugged display.

Change-Id: Ie93487ad8e4936195e3d949ce46034c5ec4fda83
2025-11-12 12:31:12 -05:00
Su Hong Koo
680790982c Add atom reporting for refresh rate changes
Add DisplayRefreshRatesChangedAtomReporter, which reports the changed
refresh rates of all the active displays managed by drm_hwcomposer.

Change-Id: I03a81c667c44160dc319a899a3bd9a8bc527a382
2025-11-12 12:31:12 -05:00
Andrew Wolfers
b7eb6f087f Cleanup includes in stats/ per IWYU style
Change-Id: I49b9bc58961ff8efee630f8eedaf6763a6a91cba
2025-11-11 19:14:24 +00:00
Andrew Wolfers
6c2df0cbdd Move CompositionPlanner from backend/ to compositor/
Change-Id: Iebd4a4d0e15c5171aa20fafe3686b7bc8c08a175
2025-11-06 18:32:05 +00:00
Andrew Wolfers
460ef8d0a8 Add explicit mappings from HwcStats enums to atom types
Change-Id: I9496a7a5c3018a3dcea8eddd2bd6b5db80467419
2025-11-06 14:59:13 +00:00
Drew Davenport
f119d34769 Rename Backend to CompositionPlanner
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
2025-10-30 12:07:09 -06:00
Andrew Wolfers
5b8fc6f028 Update reporting for new DesktopAtoms
Change-Id: I5e0053c65480b26c02377320bb9904ed141504f4
2025-10-08 16:44:41 +00:00
Andrew Wolfers
68ff3baebe Add new metrics to CompositionStats
This change adds fields for counting the total number of layers
and used planes accross compositions.

Change-Id: I7c2593f66f734a4f8ec8ddf7a2f6b5c0c8dc3cc3
2025-10-08 16:44:38 +00:00
Andrew Wolfers
48f056ff82 Track stats per unique composition attributes
This change adds a new CompositionAttributes struct which
tracks information about a given composition as it is
validated and subsequently presented.

Previously CompositionStats were tracked as totals for each
display. This change splits the stats according to the
CompositionAttributes for each presented composition.

This change only affects the reporting behavior of
CompositionStatsTracker. The stats logged by DumpState are
totaled so as to not be affected.

Change-Id: I050cce7f63891971cc807b9c5150d9b5d30f1f0b
2025-10-08 16:44:33 +00:00
Andrew Wolfers
9255d0d10b drm_hwcomposer: Migrate to android::drm_hwcomposer namespace
Change-Id: I2859aa8f55532d88231389724956fc77b0625339
2025-09-08 18:53:00 +00:00
Drew Davenport
de45e91269 drm_hwcomposer: Check for IStats service as needed
IStats service is started by system_server which is not running during
VTS tests. In this case, the IStats service is declared, but not
started, which may result in a hang when calling AServiceManager_waitForService.

Acquire the IStats client lazily when reporting atoms, and log an error
upon failure to do so. If IStats is declared, we should expect that the
service will be available under normal operation.

Another benefit of this approach is that acquiring the IStats service is
no longer blocking service initialization.

Change-Id: Ib7a38930b1a3cbcaa629e576f601d7a05980e257
2025-06-25 08:06:33 -06:00
Drew Davenport
129d12f38a drm_hwcomposer: Report composition stats as vendor atoms
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>
2025-06-10 06:59:51 +00:00
Drew Davenport
ca711e95bf drm_hwcomposer: Remove hwc2_display_t
Add DisplayHandle which is a typedef for int64_t. Use this type instead
of the HWC2 hwc2_display_t type.

Additionally, rename variable names to prefer `display_handle` over
`display_id`, since "DisplayId" is overloaded and carries a different
meaning in the Android framework.

Change-Id: I2a8ecce3b2c19fcd5e945d6c645f83d6a7d27a42
2025-05-23 09:01:26 -06:00
Drew Davenport
98360f9e0c drm_hwcomposer: Add CompositionStats
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>
2025-04-29 14:12:59 -06:00