1
0
Fork 0
Commit graph

10 commits

Author SHA1 Message Date
Andrew Wolfers
9255d0d10b drm_hwcomposer: Migrate to android::drm_hwcomposer namespace
Change-Id: I2859aa8f55532d88231389724956fc77b0625339
2025-09-08 18:53:00 +00:00
Drew Davenport
5c7f0d6e53 drm_hwcomposer: const-correctness
Make AtomicCommitArgs const in the different helper functions to build
the AtomicRequest. Additionally, reorder the parameters to reflect the
convention that input parameters are listed first, and out parameters
are listed after.

Change-Id: I0277ec4129fbcd6312e6df9ae3f15600e9755520
2025-09-05 14:57:03 -06:00
Drew Davenport
e60540fa10 drm_hwcomposer: Add DrmMode::SameSize
Helper function to check if two modes have the same size by comparing
the vdisplay and hdisplay of the underlying drmModeModeInfo.

Change-Id: Idb1923e6f7ff42d886f9e851e15fdac99af54fb9
Signed-off-by: Drew Davenport <ddavenport@google.com>
2025-02-07 12:20:29 -07:00
Drew Davenport
8053f2eddb drm_hwcomposer: Calculate vsync period consistently
Calculating the vsync period can yield different results depending on
floating point precision and ordering of operations.

Calcuate the vsync period in one place for consistency.

Change-Id: I968e4976ec5d546f66ffe3e0f7dd404cd934a60c
Signed-off-by: Drew Davenport <ddavenport@google.com>
2024-10-08 09:36:41 -06:00
Roman Stratiienko
df3120f9f3 drm_hwcomposer: Rework DrmMode class
Simplify code and raise-up clang-tidy level of DrmMode class
to 'normal'.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2022-12-11 21:19:43 +02:00
Roman Stratiienko
bde95666cf drm_hwcomposer: Use pragma once instead of include guards
Some of existing include guards were copy-pasted without modification,
therefore have incorrect name. Switch to 'pragma once' in order to fix
it and avoid such copy-paste issues in the future.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2022-12-10 20:37:34 +02:00
Roman Stratiienko
e78235c0be drm_hwcomposer: CI: Raise clang-tidy level from NONE to COARSE for *.h
To improve CI coverage.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-01-12 10:33:55 +02:00
Roman Stratiienko
a148f21336 drm_hwcomposer: Rework display modes handling
Android likes to adapt display output frequency to match window context
frequency. Unfortunately platform code has some limitations, therefore
hwcomposer HAL should be careful with reporting supported display modes.

Known platform limitations:
1: Framework doesn't distinguish between interlaced/progressive modes.
2. Framework will not switch display frequency in case margin in FPS rate
   is very small (<1FPS or so). Not a big issue, but that is causing
   some CTS tests to fail.

In addition to that VRR technology (or seamless mode switching) require
hwcomposer to group modes which tells the framework that seamless mode
configuration change is supported within a group of display modes.

By this commit do the following:
1. Group modes by the resolution:
   E.g.

    Group 1:
    1024x768i@60
    1024x768i@90
    1024x768@50
    1024x768@50.1

    Group 2:
    1920x1080@60
    1920x1080@24.3
    1920x1080i@60
    1920x1080i@120

2. Disable modes in a way that each group keeps only interlaced or proressive
   modes enabled. In case KMS reported preferred mode is interlaced - prefer
   interlaced for the whole group, otherwise prefer progressive.

3. Disable mode in case different mode in the same group has similar frequency
   with delta less than 1FPS.

4. Report only modes which remain enabled to the framework.

Test: atest CtsGraphicsTestCases

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2021-12-02 14:35:08 +02:00
Roman Stratiienko
40b374b140 drm_hwcomposer: Move CreateModeBlob to DrmMode class
CreateModeBlob doesn't architecturally belongs to DrmDisplayCompositor.
+ align DrmMode internal types with libdrm types to avoid compilation errors.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2021-10-23 20:13:05 +03:00
Roman Stratiienko
13cc3666c6 drm_hwcomposer: use CamelCase in source/header files related to class
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
2020-09-08 22:34:52 +03:00
Renamed from drm/drmmode.h (Browse further)