summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_layers.cpp
AgeCommit message (Collapse)Author
2021-11-30sdm: mark FOD pressed layer by setting a bit on ZPOSDemon000
Change-Id: Ie1503da41766c31c9ec31bbb4282ae9ed62defce
2020-03-25hwc2: Read ColorMetaDatas from gralloc hnd when it's validArun Kumar K.R
- Read CSC, mastering display info, light levels, cRI and hdr10+ dynamic metadata from gralloc metadata when it's valid. - This handles use-cases where some clients use native window API and some use setMetadata to set gralloc metadata. - MAX_FRAME_AVERAGE_LIGHT_LEVEL is in cd/m^2 no need to * 10000 Change-Id: Ib2bec4a493eb0c1225c5404fbbef424e4c0f8b6a Crs-fixed: 2608417
2020-03-25hwc2: Initialize ColorMetadata transfer as sRGBBaldev Sahu
- SetCSC function does not assign transfer value, "transfer=0" is used as the default initialization which leads to incorrect UI layer color conversion. So initialize ColorMetadata transfer as sRGB. Change-Id: I2476a36cba00a50c394b275c40242eee0cc0bcac CRs-Fixed: 2574361
2020-03-25hwc2: Fix reading HDR10+ from gralloc metadataArun Kumar K.R
- One variable per_frame_hdr_metadata_ was used to track whether to read or avoid from gralloc color metadatas. This variable was set from both SetLayerPerFrameMetadata and SetLayerPerFrameMetadataBlobs. - Since SF calls only SetLayerPerFrameMetadata (w/o support for HDR10+ thru FW), it avoided reading HDR10+ data from gralloc metadata and hence HDR10+ dynamic metadata was not updatedi. - HDR10+ blob data from FW API has higher priority over gralloc metadata, once the FW API sets HDR10+ avoid reading it from gralloc metadata as Video HAL doesn't set both. - Composer must read color metadata from gralloc metadata unless SF sets all PerFrameMetaDataBlobs for HDR10+. Change-Id: I3e288f2947778cad5f95264dd4926ed596d24b96 Crs-fixed: 2581361
2020-03-25hwc2: Handle reading color metadataBaldev Sahu
- Read HDR static metadata and HDR10plus datas from color metadata, and dataspace from SF. - If dataspace is UNKNOWN, get dataspace from gralloc metadata. Change-Id: Ice9200fd042264d76b99b5dd2d583a705bb20009 CRs-Fixed: 2523925
2020-03-12Merge "hwc2: Add support for HDR10PLUS"qctecmdr
2020-03-12Merge "hwc2: Update video flag prior to its usage."qctecmdr
2020-03-09hwc2: Update video flag prior to its usage.Pullakavi Srinivas
CRs-Fixed: 2497512 Change-Id: I84d31241648a261780e41492ca5a73f827ec11a1
2020-03-09hwc2: Add support for HDR10PLUSBaldev Sahu
- Add support HDR10PLUS hdr capability. - Add support for SetLayerPerFrameMetadataBlobs from composer 2.3. - Populate the dynamic metadata from the new composer API into the layer structure and set validate if the data changes. - Prioritize PerFrameMetadata/Blob over ColorMetaData. Change-Id: Idd9b6f4f104d1584cce31a4cb7022e11eb2751ad CRs-Fixed: 2545757 Signed-off-by: Karthi Kandasamy <kartka@codeaurora.org>
2020-03-09hwc2: Fix mismatch in client requested composition in dumpsysBaldev Sahu
Currently when requested layer is marked for skip by hwc, then the dumpsys shows composition types as "Client/Client" instead of "Device/Client". With this fix, we preserve the original composition requested by the client. Change-Id: I18a03cf2228bd9eac30828feba6ba4d42c7cb8f8
2020-03-09hwc2: Handle reading hdr color metadataBaldev Sahu
If client SF sets PerFrameMetadata, dataspace will be valid, so skip reading from ColorMetaData. Change-Id: I5597c3ec43ae7fea2ab008ce3f38cc923baa0550 CRs-Fixed: 2570482
2020-02-17display: Remove dead metadata codeTharaga Balachandran
The IGC field in the metadata struct is not set, so getting will just return the default value. The helper for HSIC is only called in a legacy test. CRs-Fixed: 2606686 Change-Id: Ie7786e42d917c076439ac62f5a351272ce5882a3
2019-07-10hwc2: Update the dataspace of same layer bufferAshu Sharma
SF updating the dataspace for same buffer for layers like status bar and navigation bar. Hence update the current dataspace. Change-Id: Ie1d4070f4f10574ebbdcedd53c998f0942cbeb48 CRs-Fixed: 2479047
2019-05-01sdm: Optimize the draw cycles where Frame ROI doesn't changeSushil Chauhan
With Partial Update feature enabled, SDM can skip the Validate Phase, if one or more layers have surface damage update, does not have any other LayerUpdate or Geometry change and the calculated Frame ROI haven't changed. It reduces CPU instructions in the draw cycles where only Surface Damage gets updated on the layer(s). CRs-Fixed: 2430570 Change-Id: I1e6e2712d9011f3477c3ab87b9470a0529edc8b8
2019-04-18hwc2: Avoid drawcycles with non-empty dirty regionPadmanabhan Komanduru
--Reject drawcycle if following conditions are met. 1. No change in layerstack attributes. 2. No new buffer latched. 3. No refresh request triggered by HWC. 4. This display is not source of vsync. --Do not return Present failed error if display is inactive. SF wouldn't query for release fence upon errors. CRs-Fixed: 2354696 Change-Id: I28174a09f4b5046d25c953f568f981fdb80b42a8
2019-04-01sdm: Add mask layer flag support to input buffer flags.Pullakavi Srinivas
Set DISABLE_MASK_LAYER_HINT property to disable this hint. Change-Id: I526025e2c32d386877b4b0b70c6423642421213f CRs-Fixed: 2396411
2019-03-13hwc2: Mark Solid fill as updating iff. its color changes.Pullakavi Srinivas
Unlike buffer layers, client doesn't set surface damage to solid fill layers. All attributes except color are tied to geoemtry changes. Just check for color, incase it doesnt update, mark layer as non-updating. CRs-Fixed: 2396411 Change-Id: Id77c467aae2ffd207bb95e2943610295dedc2a60
2019-01-02hwc2: Derive dataspace on ClientTarget from ColorModeArun Kumar K.R
- The dataspace of the client target depends on the current color mode. Clients calls SetClientTarget after prepare, SDM needs dataspace information in the Validate phase to set up its pipeline. Hence derive the client target dataspace based on the current color mode. - Return error if dataspace doesn't match in SetClientTarget Change-Id: I6edccf44e73c57a16e97b3c7e6d121dbc8775627 Crs-fixed: 2364498
2018-12-10hwc2: Pass appropriate datatype to avoid corruption.Pullakavi Srinivas
CRs-Fixed: 2342467 Change-Id: I9bfa9aa468d5bbb9853501ab2d7aa2718eb07c19
2018-11-26hwc2: Read Color Metadata from handle only for Video layersSushil Chauhan
Only Video module populates the Color Metadata in metadata FD of the handle, so avoid reading it for UI layers. CRs-Fixed: 2353610 Change-Id: Ib0988a06d02345931479bb6be4674a4e7e7d8b3f
2018-10-04hwc: Log acquire fence zero as warningSushil Chauhan
For zero acquire fence fd case, convert the log from Error to Warning. CRs-Fixed: 2324117 Change-Id: I475cc24c99bc8db8469dc92abc36c240cd8b8b51
2018-09-19hwc2: Add support to receive UBWC 3.0 statsVarun Arora
UBWC 3.0 should not hit invalid UBWC case. Change-Id: If608ba0fd636034402843f407b043d62ec4ab878 CRs-Fixed: 2313513
2018-09-16hwc2: Do not mark single buffered or color fill layers as skipPullakavi Srinivas
CRs-Fixed: 2225117 Change-Id: I9d924a5b16c7755ca9fb7f4cf799328456fe11c6
2018-09-04hwc2: Avoid overwriting metadata refresh rate.Pullakavi Srinivas
-- Compute sanitized metadata refresh rate. -- Populate display's operating refresh rate to all the layers that donot support metadata refresh rate. Change-Id: Iaf17e4e10da543e110fcf6ba7648d60807069f98
2018-09-03HWC: Set skip to layers with Non Integral Source Crop.Pullakavi Srinivas
HWC modifies Source Crop to floor and ceil based to LT and RB respectively. This can result in flicker if there is switch in Composition between MDP and GPU. Instead mark the layer as skip. Change-Id: I35d9461d2db44c9d9b4402b17c44a569e1f705c9 Source: I2f7a62fbf5ae2a0c0d13f15118b053afbabf99c8 CRs-Fixed: 2143554
2018-09-03hwc2: Fix interlace flag setting to SDM layersRamkumar Radhakrishnan
Read interlace flag from metadata of layer buffer and propagate it to SDM layers appropriately. Change-Id: I2f91f89ab462581ba6bc76f6881a5e7bf139ff28 CRs-Fixed: 2181284
2018-08-07sdm: Handle extended range layer.Gousemoodhin Nadaf
- Mark extended range layer as skip because it is not supported. - Remove unused NeedsHdrHandling() and NeedsGpuFallback(). Change-Id: I70132bae87d33f0136ec7ea321215b40e30b8c5d CRs-Fixed: 2287998
2018-07-26sdm: Allow Skip Validate when Partial Update is disabledSushil Chauhan
Allow Skip Validate, if the Partial Update feature is not enabled on Display and surface is getting updated on the updating layer(s). CRs-Fixed: 2280394 Change-Id: I0524818fb4cbb11dcc8fc993fa7ae536bd555709
2018-07-11hwc2: Add support for per frame layer metadataNaseer Ahmed
Change-Id: Icd7093690954b30ce99e72119a740c6bfb636a7d CRs-Fixed: 2237407
2018-06-20sdm: Avoid fb_id creation and removal in each frameSushil Chauhan
- Cache the <handle_id, fb_id> map in SDM layer. - Registry finds the handle_id in layer map. If it is found, then mapped fb_id is programmed to DRM driver. Else fb_id is created and it is added in map for the given handle_id key. This map is cleared and fb_ids are removed, when the SDM layer gets deleted. - "vendor.display.disable_fbid_cache" system prop needs to be set to disable the fb_id caching in SDM. So, fb_id will be removed and created for each SDM layer in every draw cycle. CRs-Fixed: 2235202 Change-Id: I1d6c7fbc1fc5c1f9afad36cf49f17bc8c5322fe5
2018-06-18hwc2: Move ColorMetadata/Dataspace handling to SetLayerBufferSaurabh Dubey
Parse and set new colorMetadata and dataspace in SetLayerBuffer to be able to set needs_validate_ if colorMetadata changes Change-Id: Idd68ee89a0cf221ca96edaf96434b580ca5fb2ad CRs-Fixed: 2255246
2018-06-07hwc2: Translate legacy dataspace to new values properlyArun Kumar K.R
Set and Get ClientTarget API's needs to translate the dataspace to the new values before using to avoid incorrect translation to standard/range/transfer. Change-Id: I800d4c391975757a78a7d9794267ba0c54f69899 Crs-fixed: 2241721
2018-05-10hwc2: Do not throw error on unspecified dataspace attributeSushil Chauhan
A legacy or non-WCG App may keep the Standard, Transfer or Range attribute of data-space as UNSPECIFIED, which is the default value. Do not throw error in such cases. HWC is marking such layer as SKIP. CRs-Fixed: 2239912 Change-Id: I7b508f0dc4e569936ce097e8ff32032e28f365c0
2018-04-30display: Add support for legacy Wide Color GamutArun Kumar K.R
- Add extended range in ColorMetadata. - Send ColorPrimaryTransfer info from color modes to Strategy, which will be used in determining the blend color space. - Remove handling color primaries or gamut in HWC2. - Handle invalid format or unsupported range in SDM. - Remove FEATURE_WIDE_COLOR and enable by default. Change-Id: If429e9fffdcdc59c18f1b5ef5d074efddd97f2af Crs-fixed: 2215125
2018-04-24hwc2: Handle Gamma2.8Arun Kumar K.R
Layers with gamma 2.8 were being marked as not supported and falling back to GPU, report them as supported and handle them for HW composition Change-Id: I5a94cbfc1ac9be22a6165803a79f6dca5711db34 Crs-fixed: 2220717
2018-04-05display: Set and handle default csc as BT709Arun Kumar K.R
- Some clients don't set the csc for a layer and as a result HWC will error out. Avoid this by setting the default csc as BT709 in gralloc for RGB buffers. - HWC will default to BT709 if clients have not set. Change-Id: I6f2e0f5bf39d0e06450d50f9c7da6857aaff8b8f Crs-fixed: 2218048
2018-03-21gralloc: Add allocator and mapper HALsNaseer Ahmed
Implement the hidl .hal interfaces directly instead of using the default shims. This is required since new additions to .hal will no longer be added to the legacy gralloc1 C header. Change-Id: If577a14f75d7d13da0ff656c96ab451d21c910ce
2018-03-19sdm: Fallback on scRGB layersNaseer Ahmed
We don't know how to handle blending when scRGB layers show up. Fallback entirely to GPU. Bug: 72125973 Change-Id: Ib01ac0c920bd34f011f0a4d3e76e71d4c7b036e2
2018-02-06sdm: Merge release fence after set power modeRamkumar Radhakrishnan
On SetPowerMode() with retain pipes, DRM driver triggers the kick off that enables MDP to read the previously queued buffer, Since the fence created during SetPowerMode() is not merged with the previously queued buffer, it may result in tearing. Hence get the release fence from driver on SetPowerMode and propagate it to hwcomposer to merge it with the previous release fence of all layer buffers to avoid tearing. Change-Id: I81c078a1b05dd3fb34f10b9b70e25cfbcfabd117 CRs-Fixed: 2184515
2018-01-30Merge "hwc2: Dup buffer fd in SetLayerBuffer() to avoid fb_id failure"Linux Build Service Account
2018-01-23hwc2: Dup buffer fd in SetLayerBuffer() to avoid fb_id failureRamkumar Radhakrishnan
Buffer fd for layers/client target is getting closed in ComposerClient without hwcomposer knowledge, So creation of fb_id for that buffer failed during DP disconnect. Hence duplicate the buffer fd to avoid create fb id failures. Change-Id: I7fb04aff9605ac28a64dcd615fa4804caa923996 CRs-Fixed: 2157977
2018-01-19hwc2: Update layer frame rate from metadata only if it is validSushil Chauhan
To compare for Skip Validate feature, update the layer frame rate from the buffer metadata, only if it is valid. CRs-Fixed: 2175653 Change-Id: Ia3f6a8e928ded91c26729062e7ed20a687744ad1
2018-01-05hwc2: Fix acquire fence fd leak in SetLayerBuffer()Ramkumar Radhakrishnan
Close acquire fence fd of the null buffer with client requested composition is DEVICE/CURSOR Change-Id: I40a4a0ddc413af797a04fff39a2f0b5c4c9396af CRs-Fixed: 2167175
2017-12-20Merge "sdm: Add support for single buffer layers"Linux Build Service Account
2017-12-15Merge "display: Enhance debug logging"Linux Build Service Account
2017-12-11sdm: Add support for single buffer layersRamakant Singh
Add support for single buffer layers. Graphics writes to the same buffer being read by display. For dumb panels, there should be no idle mode, smart panels should be put in an auto-refresh mode. Also such layers cannot be sent to framebuffer. Change-Id: Id4f15239d8edc258524dfddd4e9d72c67cd2406f CRs-fixed: 1114808
2017-11-30sdm: Add support for P010 Venus formatMathew Joseph Karimpanal
Add support for P010 Venus video format in SDM. Handle Qualcomm Venus h/w video decoder aligned P010 buffer format. Change-Id: I3edf21a5c3d90556c69c9944558398b65e4ed1e5 CRs-Fixed: 2149780
2017-11-28display: Enhance debug loggingSaurabh Dubey
1) Enable dynamic debugging in DRM 2) Add more Qservice debug categories, add corresponding kTags 3) Use ALOG for messages before core creation and after it is destroyed 4) Categorize existing logs correctly 5) Add more logs Change-Id: I3a9907900c6546adca907ecf720a78649fdc800b Crs-fixed: 2146757
2017-10-25hwc/gralloc: Add missing formatsSaurabh Shah
Add missing formats FP16, 1010102, P010 variants. Change-Id: I2710a0aff7f87381afb8ec6ee7cb74ecf008f0ae CRs-fixed: 2129663 2128978 2127406
2017-10-20Merge "hwc2: Clean up acquire fence handling"Linux Build Service Account