Commit Graph

37 Commits

Author SHA1 Message Date
Steven Moreland
3556da3b4a Add include/hardware/*.h symlinks.
These are required to build. Separate CL to preserve blame history.

From running 'update-includes.sh' script here.

Bug: 37280010
Test: boot/build (sanity)
Change-Id: Id9c2dc37f674b27b947a9f823bd38a550d64d31b
2023-06-02 23:01:56 +00:00
Steven Moreland
d783cabd4d Split up headers.
This splits headers into three locations:
include - for backwards compatibility, the global include
include_all - for things system/vendor both use
include_vendor - for things that only vendors use

The goal is to gradually have system things stop referencing
(at least most) of these headers.

Bug: 37280010
Test: build (CL on top adds back in symlinks)

Change-Id: Ibf194276b7faa857e1e7605d7719f4e7d873ecba
2023-06-02 23:01:54 +00:00
Dan Stoza
d5f2f67cd2 [hwc2] Add generic layer metadata (Composer 2.4)
Bug: 139747351
Test: VtsHalGraphicsComposerV2_4TargetTest
Test: Manual verification with a modified Composer implementation
Change-Id: Id3ac89612f41ef1d4d03552cc7b0851f6aba1f77
2020-01-22 15:18:30 -08:00
Peiyong Lin
f777542fd8 Add getClientTargetProperty API entry.
getClientTargetProperty will give hardware composer the ability to request some
properties of the client target that hardware composer wants. Prior to this
API, the client will does its best to produce the client target of which the
properties are pretty much fixed.

BUG: b/145968912
Test: boot
Change-Id: Ib8ba44d274a0c8a86c3fde1d09b72f592445ee91
2020-01-14 14:38:19 -08:00
Ady Abraham
fbdca5fdaa Merge "hwcomposer2: add seamlessPossible callback" 2020-01-11 00:29:58 +00:00
Peiyong Lin
b923ad03cf [composer] Make Auto low latency mode APIs optional.
BUG: b/147365206
Test: boot
Change-Id: I54e21cbbf3b69813d8c58bd33b0c1d1e5f7a8fd8
2020-01-10 09:40:00 -08:00
Ady Abraham
c1b2f0753e hwcomposer2: add seamlessPossible callback
Add a callback to notify the client it should retry a
setActiveConfigWithConstraints call in case of SEAMLESS_NOT_POSSIBLE error.

Test: rev up composer to 2.4
Bug: 141329414
Change-Id: I102bedc9cb89f9d1886a431f8804897bb838eb8f
2020-01-07 22:35:57 +00:00
Galia Peycheva
038dfb1b1c Add ALLM and Content types in hwc2
Bug:132731049

Test: make -j$(nproc)
Change-Id: I652244d1934bef1472b7980ff7f4736b0460c53f
2019-12-17 13:51:11 +01:00
Hansong Zhang
d211ba6bab Revert submission
Based on Forrest run with earlier base build 6069142, the build with this submission failed apct/bluetooth/instrumentation_test 

Reason for revert: Break tests

Change-Id: Icccbdafc14394349baf6d116d6590552ebcbeba9
2019-12-13 22:03:07 +00:00
Galia Peycheva
f77ae43612 Add ALLM and Content types in hwc2
Bug:132731049

Test: make -j$(nproc)

Change-Id: I563f7d85f3bf92fc5a0710e45f06828cb1daa8b5
2019-12-02 20:58:48 +01:00
Ady Abraham
b1ea403d92 hwcomposer2: few changes for refresh rate switching
- getSupportedDisplayVsyncPeriods was removed as the vsync period
   can be obtained by getDisplayAttribute for each individual config.
 - renamed setActiveConfigAndVsyncPeriod -> setActiveConfigWithConstraints
   to better describe what this function does.
 - added VsyncPeriodChangeTimeline and onVsyncPeriodTimingChanged

Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: Ifec51c893bb9038e9ac48d02c1c7b0fe9e25c108
2019-11-19 23:53:53 +00:00
Ady Abraham
8324c92f2c hwcomposer2: add api to control vsync period
Add new functions to improve vsync period switching by the platform:
 - Adding a list of supported vsync periods to hwc2_config_t to avoid the need to expose
   separate hwc2_config_t for each vsync period.
 - Adding an API to set the vsync period with timeline constraints to allow better
   synchronization with vsync period change.
 - Extending HWC2_CALLBACK_VSYNC callback to provide the current vsync period.

Test: rev up composer to 2.4 and test refresh rate switching
Bug: 141329414
Change-Id: I0e3371dc41c4fbcf97073a120307f7a8923c9325
2019-10-29 10:20:46 -07:00
Dominik Laskowski
9c1266cd19 HWC2: Add getDisplayConnectionType
Bug: 134771872
Test: Build
Change-Id: I1605d6e2655031cf4bb2248788cb734c8a8303f1
2019-10-01 15:22:53 -07:00
Peiyong Lin
59dedc31e8 Deprecate getDisplayBrightnessSupport.
Brightness is already a per display capability, we don't need this API.

BUG: 130313275
Test: build
Change-Id: If1ddf2a6224c9aa86f250178fc5cae3b01334b57
2019-04-15 13:59:18 -07:00
Dan Gittik
10510ff31b Moved brightness from Lights to SF.
Test: manual.
      Check that brightness works.
Fixes: 111435292

Change-Id: I1a741bd57c8e2ce0841c5e25ee6f5c8e866f192a
2019-03-05 20:15:45 +00:00
Valerie Hau
69c53431b8 Adding Hdr10+ support
Bug: 118343714
Test: build, boot
Change-Id: Ieacf107cb9f7710ba89156209e7a2ce4c6ae5ba4
2018-12-20 07:57:25 -08:00
Peiyong Lin
f09421f093 [hwcomposer2] Introduced DisplayCapability.
Previously, capability like SkipClientColorTransform is a global capability of
device. However, the hardware is not necessarily able to apply for all
displays, for example external display. Thus, in this patch, we introduce
DisplayCapability for per display capability query.

BUG: 69911676
Test: Build, flash and boot
Change-Id: Id34c83acacb94ebfe27077122e4581522aca9d03
2018-11-30 09:33:40 -08:00
Kevin DuBois
1345887f62 graphics: Add display color sampling interface.
Add a graphics.composer@2.3 interface that will expose
color sampling hardware present on some devices to the
framework. Adds:
  getDisplayedContentSamplingAttributes
  setDisplayedContentSamplingEnabled
  getDisplayedContentSample

Test: boot up pixel3
Test: VtsHalGraphicsComposerV2_3TargetTest on revved Pixel3 hwcomposer
Bug: 116028976
Change-Id: Iab92d2d173f9ae8723f87b75c5e47db8f72baff4
2018-11-01 12:46:39 -07:00
Peiyong Lin
44819b95b3 [hwcomposer2] Add setLayerColorTransform to HWC2.
BUG: 111562338
Test: Build, flash and boot, run VtsHalGraphicsComposerV2_3TargetTest
Change-Id: I8dab62c50e44bcbba418d797fe667f81a2dd3b54
2018-09-17 13:37:12 -07:00
Dan Stoza
39e55a8758 hwc2: Fix readback docs am: af153e0a5d
am: 5ee2def1cc

Change-Id: Ia50cc8d183f3653250bbaba822555020d2e57f75
2018-05-16 16:23:00 -07:00
Dan Stoza
af153e0a5d hwc2: Fix readback docs
Fixes a couple of problems with the return codes in the readback
documentation and adds a paragraph of clarification about when
getReadbackBufferAttributes will be called.

Bug: 67048889
Test: N/A, doc fix only
Change-Id: I3ea1a6993323f7ce12c36a377bf69e2866b18082
2018-05-15 13:09:51 -07:00
Dominik Laskowski
55cf6f01e5 HWC2: Add getDisplayIdentificationData
The getDisplayIdentificationData API enables display identification for
generalized multi-display support.

Bug: 74619554
Test: None
Change-Id: I8e87312c628e30d7cae691c70dacd0f352a85133
2018-04-24 10:31:15 -07:00
Chia-I Wu
28310aa868 hwcomposer2: add render intent support
Add

 HWC2_FUNCTION_GET_RENDER_INTENTS
 HWC2_FUNCTION_SET_COLOR_MODE_WITH_RENDER_INTENT
 HWC2_FUNCTION_GET_DATASPACE_SATURATION_MATRIX

and fix HWC2_FUNCTION_SET_PER_FRAME_METADATA to be per-layer.

Bug: 73824924
Test: manual
Change-Id: I25e34c4bf3dc5d496ea23c2d13419dd28f3e6cca
2018-03-30 11:47:09 -07:00
Courtney Goeltzenleuchter
437ce43787 Add support for HDR metadata (SMPTE2086)
Add HWC interface to pass in SMPTE2086 & CTA 861.3 metadata.
Test: TBD CTS test
Bug: 29940137

Change-Id: Ib99787752441b8a883864cc8adc8431478a15ba7
2018-01-24 19:24:13 -08:00
Peiyong Lin
fd05d13edc [HWC] Add setLayerFloatColor API.
This patch adds the struct of float color, and setLayerFloatColor API so that
SurfaceFlinger can set the layer color with more bits on each channel.
Currently the display calibration tool require 10-bits support.

BUG: 69970838
Test: make locally and applied on device
Change-Id: I8bab335cc4fbc41a3eb18306a8831d1e9a9a219a
2018-01-24 18:12:41 +00:00
Fabien Sanglard
9bdc0b65f3 Add Skip Validate capability to hwc2 interface
Change-Id: I716100780f820574440abc5a247ea7071b630113
2017-06-14 11:40:16 -07:00
Brian Anderson
49018a55ae Add PRESENT_FENCE_IS_NOT_RELIABLE
Test: adb shell /data/nativetest/libgui_test/libgui_test
  --gtest_filter=*GetFrameTimestamps*
Bug: 36730849, 36887025

Change-Id: I09a543e7143542a4ed2952e7af1add17d864e3f2
2017-04-11 14:29:54 -07:00
Colin Cross
cc8d9f9fcb Avoid C-style cast warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  Use a macro to convert modules to hw_device_t** to call
the open function that works in C++ and C.

Bug: 32018017
Test: m -j
Change-Id: If68bf15581975f1217fcab366cef7bc784894641
2016-10-07 13:10:20 -07:00
Colin Cross
248ec3da8b Fix enum switch warnings
hardware/libhardware/include was being included with -isystem, which
hides warnings.  -Wswitch requires that all cases in a switch statement
on an enum be enum values.  For enums being used as bit flags, cast the
enum to an int.

Bug: 32018017
Test: m -j
Change-Id: Idb430c451d017bb7ec61a7119d6abd87b6dcdc87
2016-10-07 13:10:07 -07:00
Dan Stoza
d2168f7e47 HWC2: Add SKIP_CLIENT_COLOR_TRANSFORM capability
Adds HWC2_CAPABILITY_SKIP_CLIENT_COLOR_TRANSFORM, which indicates
that the client should never apply the color transform, even if all
layers are being composed by the client. This allows the device to
use its color management hardware in all cases to avoid any potential
mismatches between client and device application of the transform.

Bug: 29870302
Change-Id: I90234d91858206714e650eadb03227a4a180d975
2016-09-08 15:01:49 -07:00
Dan Stoza
ef264828fe HWC2: Redefine retire fence as present fence
Redefines the retire fence returned by presentDisplay to be a present
fence with more strictly defined semantics: this fence should fire
at the vsync when the frame is picked up by hardware, either for
scanout (in the case of video-mode panels) or for transfer to panel
memory (in the case of command-mode panels).

Bug: 29771461
Change-Id: Idf5f86c92a8748426cf3368242c08876a48d81dd
2016-09-08 15:01:34 -07:00
Dan Stoza
68cd3759be HWC2: Add format to VD create, surface damage
Adds a format in/out parameter to createVirtualDisplay so that the
device knows what format the consumer prefers, but can override it if
it is not capable of rendering to it.

Also adds a surface damage region to the setClientTarget call.

Bug: 22767098
Change-Id: I58801aed2d95fd7dbf63db2e303bc3079caaba25
2016-05-20 20:35:58 +00:00
Dan Stoza
3abcfa53c0 HWC2: Clarify null client target handle
Documentation-only change that clarifies that in the case where the
client isn't compositing any of the layers, the buffer handle
provided to setClientTarget may be null, and that this should not be
treated as an error by the device.

Bug: 28569722
Change-Id: Ia5825eb0a80c7f838894642654db7d7be14a3b6b
2016-05-04 12:21:06 -07:00
Dan Stoza
f601e977d5 HWC2: Add getHdrCapabilities
Adds support for querying the HDR capabilities of a connected display.

Bug: 25684127
Change-Id: I9f927f1e92ca9854cb63804177521caf77cf98f5
2016-03-28 12:16:42 -07:00
Dan Stoza
c46e96a5a2 HWC2: Add const and alphabetize
Alphabetizes the display functions and adds const to a float*
input parameter.

Bug: 22767098
Change-Id: I8cb4d6b27980753cfb17a8ad6b74cbbc984c5ac0
2016-03-24 10:12:15 -07:00
Dan Stoza
5dfbe33cf3 HWC2: Fix a doc bug in setColorTransform
Fixes a minor error in the documentation of the setColorTransform
function.

Change-Id: Id1a94d6066f642579c6b935a6cc781505f25c11d
2016-03-24 09:23:11 -07:00
Dan Stoza
4e9221bd87 Hardware Composer 2.0
Headers for version 2.0 of the Hardware Composer HAL

Change-Id: Ie5c26a11b20b7e8f8c752ca51d5cbaf2cbaa9a45
2016-01-28 14:16:22 -08:00