summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_layers.cpp
AgeCommit message (Collapse)Author
2017-10-19Merge "hwc2: Parameter validation and bounds checks"Linux Build Service Account
2017-10-18hwc2: Clean up acquire fence handlingPrabhanjan Kandula
Simplify closing of acquire fences of all displays. Close hwc layer's acquire fence fd only when new fence is set on hwc layer or while deleting layer. Change-Id: Iebd5e0eacb863ee36780aec414b8b5abbbcb9748 CRs-fixed: 2111956
2017-10-10hwc2: Parameter validation and bounds checksVarun Arora
- Introduce use of GetDozeSupport Change-Id: Ic7edcd14b0c390fbd58f6be05b983a40b75c90eb CRs-Fixed: 2114346
2017-10-05hwc2: Skip validation fixesNaseer Ahmed
* Disable skip validation for solid fill during calibration. * Require validation when the client changes the composition type CRs-Fixed: 2122072 Change-Id: I9ded200e5c15701f653c73d67c18c41de8278d52
2017-08-27hwc2: Extend GetClientTargetSupport APIArun Kumar K.R
- Refactor the utility to retrieve csc from android_data_space_t - Add RGB1010102 as supported client-target, except BT2020 standard - Mark layers for GPU composition when client-target is RGB1010102. Change-Id: I3e4b32893cf2e349500bbae3e4fda7f6369209ff Crs-fixed: 2078101
2017-08-11hwc2: Donot dup ion fd.Pullakavi Srinivas
This reverts I98c473ad24bbc0e1f999d41b218615c8f9f7cd10 CRs-Fixed: 2089213 Change-Id: Iab0253b03f4542f7991b8c59109c6be1c23db238
2017-08-09sdm: hwc2: Support Skip Validate featureSushil Chauhan
1. Set HWC2_CAPABILITY_SKIP_VALIDATE cap in GetCapabilities api. 2. If HWC2_CAPABILITY_SKIP_VALIDATE cap is exposed by HWC HAL, then SF just calls PresentDisplay api. It is the responsibility of HWC HAL to request for ValidateDisplay, if it is required. If the cap is not exposed by HWC HAL, then there will be ValidateDisplay call followed by PresentDisplay. 3. In case of Surface Damage update on a layer, SDM needs a Validate call to program SDE driver for Partial Update feature. 4. SDM needs Validate call to enter in safe Mode for use cases like Idle / Thermal fallback, HDMI and Virtual Connect/Disconnet, etc. 5. In case of layer buffer geometry, metadata or secure attributes change, SDM needs Validate call to program the SDE driver. 6. SDM needs Validate call if GPU tonemapping is required on a layer during HDR Video playback. 7. Read user defined underscan width and height, when the External display gets created and initialized. 8. SDM needs Validate call for few APIs which are exposed by the Binder Interface or by HWComposer APIs, since they need re-configuration of SDE driver or they modify Panel / LayerMixer / Display configuration. 9. The feature is enabled by default. "sdm.debug.disable_skip_validate" system property can be set to '1' to disable the feature. CRs-Fixed: 2071632 Change-Id: I68f0db3af16afa4ad4eb789cd1f6b12caf6381e4
2017-08-09hwc2: Handle corner and error conditions properly.Arun Kumar K.R
- Make changes as per the hwc2 header to return correct error codes. - Check for comp types in SetLayerColor and SetCursorPosition and error out if they are not as the expected. - As per the HWC2 header, SetCursorPosition cannot be called after validateDisplay, hence return error when its called after validate and before present. - Handle Create and Destroy Virtual Displays accordingly. - Includes 017ba1f and 5e5da2(partially) from lnx.3.9-rel. Change-Id: I02814a266cf9d03017cdbb454233540cd01b1fed Crs-fixed: 2068942
2017-08-02hwc2: Correct frame rate declaration.Anjaneya Prasad Musunuri
Declare proper type for frame rate. In-correct type declaration is leading to invalid frame rate read from metadata. Change-Id: I5e7a8dc014d9d070ba447c12db162fb45b3b5ad6 CRs-Fixed: 2086269
2017-07-24hwc2: Use CSC information from android dataspaceArun Kumar K.R
- Get the CSC information from android_data_space_t, use from metadata only when data space is not specified by client. - Make an exception from HDR with BT2020 as android dataspace doesn't support mastering display and light luminance. - Mark the layers as skip when dataspace is not supported. - Also includes commit: 96e73dac from 3.9-rel .Check for composition types in ValidateAndSetCSC .Layers not marked for device can always be supported Change-Id: Icbb2fe14aae784314700c183e6f3f8384719d295 Crs-fixed: 2074205
2017-07-14hwc2: Copy UBWC Compression stats from Metadata to layer_bufferGurunath Ramaswamy
CRs-Fixed: 2073410 Change-Id: Ie7b84686a54ecdfec2fd4a885e1a294b51c6397e
2017-07-09Merge "hwc2: Check composition type in SetLayerBuffer"Linux Build Service Account
2017-07-04sdm: Handle InverseMount adjustments in SDM.Pullakavi Srinivas
Map all dirty rects w.r.t panel orientation. Crop source rects considering ROI & panel orientation. CRs-Fixed: 2048467 Change-Id: I3634037ce898179e9b7587117a46cb2cc87bd144
2017-06-19hwc2: Check composition type in SetLayerBufferNaseer Ahmed
SetLayerBuffer may be null if the layer is client/sideband/color Change-Id: I09e21e97c75f4e14e684a402b7d002ba98a27a3b
2017-06-12Merge "hwc2: Reset SDM layer per frame data while creating layer-stack"Linux Build Service Account
2017-06-02Merge "sdm: Use color metadata if Android framework metadata is not set"Linux Build Service Account
2017-06-01Merge "sdm: Add support for new pixel formats in hwc2"Linux Build Service Account
2017-05-31hwc2: Reset SDM layer per frame data while creating layer-stackPrabhanjan Kandula
Sdm can modify layer transform and position on display while adjusting for panel orientation. Reset transform and display frame from hwc layer everytime while creating input layer-stack for SDM. Change-Id: I8dcdc4f072012e50bae57f30ad261664e0e6b74d CRs-fixed: 2051379
2017-05-25sdm: Add support for new pixel formats in hwc2Camus Wong
Add support for new color formats in HWC2. The new format will be used by camera application. Change-Id: I36c81f84a7e2593565c3098b52cb4e41c8ff8387 CRs-Fixed: 1116491
2017-05-19sdm: Support cursor without h/w cursorSaurabh Shah
Support cursor with any pipe type. Simplify design to factor in h/w cursor presence much later in draw cycle during resource allocation. Change-Id: If10866516d95cb3f8f33021a25ec6237b35ac32c CRs-fixed: 1114808
2017-05-18sdm: Use color metadata if Android framework metadata is not setSushil Chauhan
Only use color metadata if Android framework metadata is not set. Featurize it with FEATURE_WIDE_COLOR flag for dataspace support. CRs-Fixed: 2049386 Change-Id: I3bae3563ff76d00abe36cfd67aca730eed920070
2017-05-10hwc2: Additional dataspace checksNaseer Ahmed
* Fix BT2020 * Add more transfer functions CRs-Fixed: 2045293 Change-Id: Id87c88ee671a0d4965e07391f6f9c4b5a65d9c73
2017-05-05hwc2: Fix side effects of legacy dataspace conversionNaseer Ahmed
Legacy formats should be converted at the first SetLayerDataspace call itself Change-Id: Id4fd91a6556b1befb026bcf77a9602a589acca5c CRs-Fixed: 2043519
2017-04-24hwc2: Fix dataspace comparisonNaseer Ahmed
The values in graphics-base are already shifted. CRs-Fixed: 2037770 Change-Id: If6c7d52a39a5deef27b8dc48b6bec6e72c74c6f2
2017-04-21hwc2: Default handling for dataspacesNaseer Ahmed
CRs-Fixed: 2030917 Bug: 35985399 Change-Id: Idb4aa9914da2f843cf76160afb337365c3c39ea2
2017-04-14hwc2/gralloc1: Create libgrallocutilsSaurabh Shah
--For gralloc1, create a libgrallocutils that provides helpers to calculate various buffer related info --Make hwc2/gralloc1 structures independent of libdrmutils and fb_id / gemhandles --Implement GetBufferLayout API from BufferAllocator that can be called by DAL before creating fb_id Change-Id: I0aede7d1ea87302ecda593047728d381383484b9 CRs-fixed: 1114808
2017-03-30Merge "sdm/gralloc: Use correct DRM format enums for RGB formats"Linux Build Service Account
2017-03-28display: Use getMetaData in hwc2Arun Kumar K.R
Use getMetaData API to get the metadata information in hwc2. As it maps the metadata in the process before accessing it. Change-Id: I346d223058e6eadb00f16bb9f2be8a46e87fbdef CRs-fixed: 2019985
2017-03-27display-hal: Add support for P010 ubwc formatRohit Kulkarni
This patch adds support for handling P010 ubwc format in display-hal libs. Change-Id: I1c7489be859a608566240c3b6722c84bb9a468ca CRs-fixed: 2018756
2017-03-23display: Add missing TP10 formats checksArun Kumar K.R
Add missing TP10 format checks in Gralloc1.0 and HWC2.0 to support TP10 video playback. Change-Id: Ie5948a6693cad04be6556a89d54450c64003a206 Crs-fixed: 2023968
2017-02-17sdm: enable gralloc1 from hwc2Naseer Ahmed
Add support for hwc2 to call into gralloc1 CRs-Fixed: 2007392 Change-Id: Iade3b7cba7d3b99685530a8f4dcde67228e78f68
2017-02-07sdm: drm: Add support for default non-atomic modeSaurabh Shah
Add support for booting up with default non-atomic mode Add libdrmutils that currently has: DRMMaster: Creates a master DRM session Converts ION handles to DRM FB_ID DRMResMgr: Enables a default display path by providing APIs for connector id, crtc id, mode etc Change-Id: I1dc697d2cc5e3fa744c99e2c9ddd57bf06e78c4f CRs-fixed: 1114808
2016-12-16sdm: Add Layers to HWLayersInfo IntfArun Kumar K.R
- HWLayersInfo will carry the Layers vector which will be used Resource and HW Intf - Remove referring to the Layer from the LayerStack using index. - Helps in de-coupling original Layers being modified due to any strategy optimization - Data type of the "input_buffer" is not a pointer Change-Id: I33c07f692f39c37bc49551e0c0bee2a884ec244b Crs-fixed: 1092912
2016-12-16sdm: Use ColorMetadata in SDMArun Kumar K.R
- Replace LayerCSC with ColorMetadata which has other color parameters such as range, matrix co-effs and HDR info. - Add appropriate mapping in SetCSC. Change-Id: Ic21b285e0828b25bcb719372351f685bd92cec26 Crs-fixed: 1085366
2016-11-04sdm: gralloc: Add support for Secure Camera use-caseSushil Chauhan
1. Add support for Secure Camera use-case in SDM and gralloc. 2. Set the appropriate ION Heap ID, secure camera/preview ION flags and the alignment requirement for Secure Camera use-case. CRs-Fixed: 1065934 Change-Id: I9e80f3093d598eec7bf717ddd0e3adbbc3382d5e
2016-11-01hwc2: Set layer buffer sizeNaseer Ahmed
The layer buffer size is used by the rotator CRs-Fixed: 1084674 Change-Id: I1db5497de26b17e8d6a640a46a3b2e1296726528
2016-09-28sdm: Add rect mapping and interface to store actual resolutionRamkumar Radhakrishnan
1. Add rectangle mapping function to map a rectangle from one coordinate system to another coordinate system. 2. Add unaligned_width and unaligned_height in layer buffer to store the actual buffer resolution without alignment. 3. Populate unaligned width and height information of SDM layer buffer from private handle Change-Id: Ic4c03cc5779418959732332d26b8ecb59c2483b5 CRs-Fixed: 1040942
2016-08-31hwc2: Workaround use after free by surfaceflingerNaseer Ahmed
Works around bug 30281222 by dup'ing the ion fd we get in SetLayerBuffer so that it isn't closed during the commit cycle. Bug: 31016569 Bug: 30281222 CRs-Fixed: 1061972 Change-Id: I98c473ad24bbc0e1f999d41b218615c8f9f7cd10
2016-08-31hwc2: Update composition types on AcceptDisplayChangesNaseer Ahmed
When AcceptDisplayChanges is called, the layer composition type on the client side is deemed to have been changed to the composition changes that were requested. Update the device state accordingly. Move the configuration of the layer flags to BuildLayerStack so that the client accepted composition type is accounted for. Bug: 30880078 Bug: 30119044 CRs-Fixed: 1059410 Change-Id: I09eab9dcc8d169acc761e84a6c76712712c2b934
2016-08-02hwc2 : Allow only top most cursor layerPrabhanjan Kandula
Reset cursor flag if it is not top most layer and allow only top most cursor layer for HWCursor pipe. Change-Id: Iccd72e0cab9c43f20df0ca44b3e3a1c9a5d90bb6
2016-07-27hwc2: Fix solid fillNaseer Ahmed
* Solid fill layers need a valid src rect * Fix color values and packing Bug: 30255380 Bug: 30257604 Change-Id: Iee92a053e145898688a9b3494d2d9cbdffdf9f56 CRs-Fixed: 1045472
2016-06-24hwc2: Fix incorrect indexNaseer Ahmed
Loop from [0 to numRects) Change-Id: I7d8651dc2c17e84a7d9c09286c36b638e5f187ac CRs-Fixed: 1034144
2016-06-23hwc2: Use csc,igc from layer bufferNaseer Ahmed
Fixes build breakage for HWC2. Change-Id: Icb36d23ea683fda9221eb68da2ef34585e065e21 CRs-fixed: 1032329
2016-06-17sdm: hwc2: Handle Tranform::NoneArun Kumar K.R
Remove default and handle Transform::None in SetLayerTransform Change-Id: I69c23c61a3761b1475a4b56defb9b6da4b71c61a Crs-fixed: 1026496
2016-06-16sdm: hwc2: Set transform correctlyArun Kumar K.R
- Use correct mapping for transforms set by client. - 180 deg can be supported by h_flip|v_flip - 270 deg can be supported by 90|h_flip|v_flip - Add transform to HWCLayer dump Change-Id: I3c160eb42b028b5f02b9dfd45ee18a4cdcf5e0e3 Crs-fixed: 1026496
2016-06-08hwc2: Return an error for a zero acquire fenceNaseer Ahmed
Prevent an acquire fence of value 0 from being programmed into the layer stack. Change-Id: I0e2a0ba622c61c105bbe44ffa9ca986388e8557f CRs-fixed: 1025574
2016-06-06sdm: hwc2: Enable LayerCachingArun Kumar K.R
- Track geometry changes of a layer based on property change. - Remove legacy caching code. - Set layer updating flag based on the DR. Change-Id: I042438093a58ba38edd0ba77610bfc47430d69f0 Crs-fixed: 1021559
2016-06-06sdm: Fixes for HWC2Arun Kumar K.R
- Return HWC2::Error::HasChanges from Validate(), when the composition types changes compared to requested. - Reset release_fence_fd after pushing to queue so that it doesn't get pushed again. - Clear dirty and visible regions on every call to set them. - Maintain client requested and SDM selected comp types. Change-Id: Iff2a52c99a15cdbfccc4c0206f3958d0a2eb1642 Crs-fixed: 1023408
2016-06-02hwc2: Use floating value refresh rateNaseer Ahmed
Matches corresponding changes in metadata on hwc1 Change-Id: I305a4d1f47cf3854f79456584ac013d15b57e9bc CRs-Fixed: 1023652
2016-05-04hwc2: Address remaining review commentsNaseer Ahmed
* Fix incorrect definition of GeometryChanges enum * Fix initializations * Fix plane alpha rounding * Add missing 10 bit formats * Fix hotplug reporting Change-Id: I3b531fea019fc6032148814c4cc27238e89aeb8e