summaryrefslogtreecommitdiff
path: root/libhwc2.1/libresource/ExynosResourceManager.cpp
AgeCommit message (Collapse)Author
2023-02-24libhwc2.1: move calculateHWResourceAmount() after preProcessLayer()joenchen
The calculateHWResourceAmount's original place does not have ExynosImage size information yet, so its calculation for scaling/rotation is wrong. calculateHWResourceAmount() should be moved after preProcessLayer(), and it needs to call setExynosImage() to ensure the correct scaling/rotation calculation. Bug: 191421040 Test: test multiple scaling/rotation layers by hwc-tester Change-Id: I286f74592889f57f0ec9e603efb99ee1d9381887
2023-02-24libhwc2.1: fix wrong overrinding of TDMjoenchen
calculateHWResourceAmount() function needs overrinding for each device implementation. It fixes wrong function parameters. Bug: 191421040 Test: test multiple scaling/rotation layers by hwc-tester Signed-off-by: YongWook Shin <yongwook.shin@samsung.com> Change-Id: Icc91734b014a4bb7bad6ebe6d08baa2ebe0d404d
2023-02-02Merge "libhwc2.1: update resource manager/HWC service for multi displays" ↵TreeHugger Robot
into tm-qpr-dev am: eb31096ec7 am: 21b205e050 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/20691318 Change-Id: I3cb065f27481c9c8fb9c652111ba3971542e89b0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-01-12libhwc2.1: update resource manager/HWC service for multi displayslinpeter
Checked primary displays in preAssignWindows. Checked destination scale for all primary display in validateLayer. Added display id as input in setDDIScale. Bug: 257422563 test: check boot to home Change-Id: I18813fde26ac94c8dbb685aebdf38561bc4973ce
2022-11-17Merge "libhwc2.1: reassign sandwiched layer that is not opaque" into ↵Midas Chien
tm-qpr-dev am: 950b6fe20a am: f6737e4ae2 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/20302145 Change-Id: Ib70db259cd422e55ae8c9e8bb163851aa4fda5d7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-16libhwc2.1: reassign sandwiched layer that is not opaqueMidas Chien
To keep sandwiched layer to DEVICE composition, composer request SF to clear client target with transparent pixels where this sandwiched layer region by setting HWC2_LAYER_REQUEST_CLEAR_CLIENT_TARGET. However, it is not workable for layer is not opaque, because the layer must blend with whatever is underneath. Therefore we need to reassign sandwiched layer to CLIENT composition if it is not opaque. Bug: 253304752 Test: front buffer test, play video Change-Id: I39c8e3430fee6cd4149e85f510ce2900ff46c3d0
2022-10-13libhwc2.1: support TDM based resource allocationYongWook Shin
There are limited HW resources and all layers should share it. To avoid resource limitations, HWC should support TDM based resource allocation for all layers. Bug: 191421040 Test: boot to home Signed-off-by: YongWook Shin <yongwook.shin@samsung.com> Change-Id: Icfcd879bdd7d4655f8b1e51f0ef577395b526a3f
2022-09-20Merge "libhwc2.1: allow the first power mode" into tm-qpr-dev am: d7befe8095 ↵TreeHugger Robot
am: ad70831e50 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/19262222 Change-Id: I5a5f89cdef79b1823ece9d744a35336e609dce0e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-13libhwc2.1: allow the first power modelinpeter
The first state from SF can be ON or OFF. Changing mPowerModeState as optional allows the first power mode. Bug: 237745199 test: check display power state during booting Change-Id: I7c60a8a0b13fca643dec0877d4263067043c2353
2022-08-10Merge "libhwc2.1: fix vertical ratio check after downscaling by m2mMPP" into ↵Midas Chien
tm-qpr-dev am: cb3b7ad1cf am: 88ebc993ef Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/19321379 Change-Id: I305fb5bf37bfd6ac8bc6929173d66aafd70b48c2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01libhwc2.1: fix vertical ratio check after downscaling by m2mMPPMidas Chien
Bug: 238819232 Test: play video Change-Id: Ieb4cf2ac18f268e01c70d58461e1ec26fc738265
2022-07-26Use namespace to identify the predefined array per SOCShiyong Li
Bug: 228647959 Signed-off-by: Shiyong Li <shiyongli@google.com> Change-Id: I2442cbf1ae2e589795630ce9f5279f0dc640c29c
2022-05-28[RCD] Check the RCD layer on the topYichi Chen
RCD layer can be only placed on the top of the layer stack. To maintain the correctness of blending result, we make the RCD layers fallback to client composition when they are not on the top layer. Bug: 233282377 Test: Enable RCD layer on the top Change-Id: I8f241dfb61a31ef607c979087f8c616ceb889abb
2022-02-25hwc: create validate function for RCD layersYichi Chen
According to the hardware specialist, RCD layers can only support full-screen content.The patch creates the validation function for RCD layers to ensure its content can meet the requirements. Bug: 193171134 Test: Enable RCD with different screen resolutions Test: vndservice call Exynos.HWCService 1007 i32 0 i32 0 Change-Id: Ic39e39d3a485b6b38a5626339725d42afa80b740
2022-02-22libhwc2.1: set default SDR dimming threshold to 0Long Ling
Bug: 204452826 Change-Id: Ie994a5b717a8fe79b8de41898f83017aa3642597
2022-02-08hwc: support RCD layer in hwc2.4 and hwc3Yichi Chen
To support the RCD layer, the patch checks the composition type in DISPLAY_DECORATION and assigns the layer to the special plane on the display. Bug: 193171134 Test: Trigger RCD layer by sending a R8 layer Change-Id: I5e6489d22cd79a154d9b7ef4cd0391629e529299
2022-01-21libhwc2.1: add scenario check for camera previewWiwit Rifa'i
This will prevent HWC for using G2D if there's a camera ouput buffer. Test: manual Bug: 215185822 Change-Id: I4f61f3801b40384cdc4c62fdeae9a4de9f038b47
2022-01-12Merge "libhwc2.1: remove unnecessary property_get"TreeHugger Robot
2022-01-11hwc3: support SDR and HDR blendingLong Ling
Add support for setLayerWhitePointNits, setClientTargetWhitePointNits and setDisplayBrightness commands. Bug: 196171661 Change-Id: I5b2c5510ae758805396e678f1e2d5c4ea1e716b5
2022-01-11libhwc2.1: remove unnecessary property_getWiwit Rifa'i
First, we remove property_get for checking the camera preview. This is probably a legacy code which we don't use anymore. Second, we remove unnecessary call to ExynosCompositionInfo's constructor which contains a property_get. Test: simpleperf profiler Bug: 205901755 Change-Id: I1f7aba3cdfbbb7f75f3dd39c9ed06dc5366f07ac
2021-07-16Merge "libhwc2.1: Set frame rate of m2mMPP" into sc-dev am: 8c23ebb8e0 am: ↵Midas Chien
60440fd2c6 am: e57ecbbbd2 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/google/graphics/common/+/15258561 Change-Id: I576d83165018f2dab66a15ea5ff649ad45f56292
2021-07-12libhwc2.1: Set frame rate of m2mMPPSungjun Bae
HWC sets frame rate of m2mMPP according to the capacity. This change adds API to change capacity of m2mMPP. Bug: 177216165 Test: play 1080p, 2k, 4k video with downscale request Change-Id: I7eebca3f7c25e06b94cfaa3811fa8fd4326c44fa Signed-off-by: Sungjun Bae <june.bae@samsung.com> Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2021-05-20libhwc2.1: Support SoC specific namespaceYongWook Shin
To support SoC variations, SoC specific codes will support own namespace. Common codes will use specific namespace defined by build variable such as TARGET_BOARD_PLATFORM. Bug: 186905324 Signed-off-by: YongWook Shin <yongwook.shin@samsung.com> Change-Id: I4667525730308f683555e331df92cb0e2725fa0a
2021-05-04libhwc2.1: fix double-ownership of DstBufMgrThreadSteven Moreland
This class extends (transitively) from RefBase, and it is double-owned when Thread::run is called. This is currently causing an abort on ToT. Bug: 187193336 Test: N/A Change-Id: I9dabd30f671f59bea9507ae342301c6a6ef7fa85
2021-04-20libhwc2.1: change Layer's DPU clock requirement formulaMidas Chien
Original formula doesn't consider refresh rate and we should only take vertical scaling ratio into account. We don't consider horizontal down scaling because it is just like sub-sampling from input. The new formual change to ACLK = Src Width * Src Height * FPS * Margin * Panel Height / Dst Height / PPC Bug: 182772256 Test: play 2k video in YB at 120hz Change-Id: I93a7a211194c6f2f3dd3d115186217a6876a4c41
2021-03-22libhwc2.1: Check power state to reserve MPP to primary type displayHyunKyung Kim
Bug: 162322019 Test: single/dual display boot to OS, and suspend/resume Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com> Change-Id: Ic2964d20be16852299e3aa63e34fc8723b31d40f
2021-03-22libhwc2.1: Reserve DPP to the specific displayHyunKyung Kim
This patch reserves DPP to the specific display even if the display is not connected when configuration is enabled. DPP can be used by reserved display. Bug: 162322019 Test: single/dual display boot to OS, and suspend/resume Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com> Change-Id: I3384ce98363c3c4f79ffc96e347dfef32c83f647
2021-03-22libhwc2.1: support multi display with resource tableSeungchul Kim
Bug: 162322019 Test: single/dual display boot to OS, and suspend/resume Change-Id: I06bd95f40a5c6ae923f28e34ddc4ca47926094c3 Signed-off-by: Seungchul Kim <sc377.kim@samsung.com> Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2021-03-19libhwc2.1: modify concept of display's type and IDSeungchul Kim
Bug: 162322019 Test: single/dual display boot to OS, and suspend/resume Change-Id: I4926f2b30abc2a9b4ddf1c47038ac7b9573213b1 Signed-off-by: Seungchul Kim <sc377.kim@samsung.com> Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2021-01-20libhwc2.1: Refactor the destination transform in ExynosMPPYichi Chen
Since ExynosMPP now all relies on the source image to get the transform info, it is unnecessary to have transform info on the destination image. Bug: 176158392 Test: Play 1/8 and 16x scaling in landscape mode Change-Id: I44333ffb28751aff0aa17332298e09f23c763eaa
2021-01-14libhwc2.1: Fix the orientation issue in M2M and DPP scalingYichi Chen
Since the source and destination can be in different orientations, we check the orientation of the source image before assigning its width and height to the scaled image. Bug: 176158392 Test: Play 1/8 and 16x scaling in landscape mode Change-Id: I762797ffeb3e92ff6a0e7b1b70d3579ecd3312d3
2021-01-14libhwc2.1: Refactor bandwidth calculationYichi Chen
To make bandwidth calculation more efficient, the patch creates checkDownscaleCap function to avoid repetition in calculating scaleRatio_H and scaleRatio_V. Bug: 176158392 Test: Enable YUV surface with 1/8, 1/16 downscale Change-Id: I42971e78053007bde2f3ac37c684d5042337e9fd
2021-01-14libhwc2.1: Support G2D plus DPP downscaleYichi Chen
To support YouTube mini player with over 1/4 downscale request, it is necessary to have G2D + DPP downscale to support 1/16 downscale instead of falling back to client composition. Bug: 176158392 Test: Enable YUV surface with 1/8, 1/16 downscale Change-Id: I9300a7a78143fe5d4c7a1fa3b30edb224a02cb11
2021-01-08Revert "Revert "libhwc2.1: Boot to homescreen with Gralloc 4""Anthony Han
This reverts commit 4d9fc7dbae7adf4b3f0d3b4dd7fd7fed87f346b7. Reason for revert: A fix for b/176948845 is available at ag/13301706. Change-Id: I05ee3d99bf48a92d066cb2eedc76eeb4777f4632
2021-01-07Revert "libhwc2.1: Boot to homescreen with Gralloc 4"Arc Wang
This reverts commit cb213bb87a7e84528638c0c600fefeea83faebba. Reason for revert: “DroidMonitor: Potential culprit for Bug 176948845 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.”. Change-Id: Iccd0599d41fc2eba062f29e9207cf6ba97598b93
2020-12-29libhwc2.1: Boot to homescreen with Gralloc 4Seunghwan Lee
remove GRALLOC_VERSION1 check change from libGralloc to VendorGraphicBuffer Bug: 169728681 Test: Verify can boot to homescreen with DEVICE_USES_EXYNOS_GRALLOC_VERSION set to 3 and 4. When using gralloc 4, verify VtsHalGraphicsMapperV4_0TargetTest passes. Change-Id: Id2bf90dc72a5295b5becf585f5c296ca8ba0b961
2020-12-22libhwc2.1: Support the property control for DPP downscaleYichi Chen
Before we can safely enable 1/4 DPP downscale, it is necessary to have a dynamic control to switch between 1/2 and 1/4 downscale limitation for DPP. If not specify, the downscale limitation will follow the DPP configurations in the device tree. Bug: 170821166 Test: Configure DPP downscale to 0, 1, 2 and check in HWC dump. Change-Id: I8282a6b54ad5c97f507a01e1cd8f62ff6719ba69
2020-12-14libhwc2.1: Add basic support function for AFBC color formatYichi Chen
It is necessary to consider color format with AFBC compression type since AFBC may provide different configuration especially for YUV formats. The patch extends the basic functions in ExynosHWCHelper.cpp to include AFBC compression type while checking the HAL format. Bug: 139446002 Test: AFBC video playback with DPU composition Change-Id: I23918f526ffbe655064c08ff4ef9cc7843df9188
2020-12-09libhwc2.1: Support to change scale down ratioHyunKyung Kim
Bug: 170821166 Test: Switch DPPs downscale capability by using adb commands. Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com> Change-Id: I2c8c705cd77871868955361bea1dfa4a98366146
2020-10-27Merge "libhwc2.1: Dump size restrictions of ResourceManager" into sc-d1-devTreeHugger Robot
2020-10-19libhwc2.1: Remove exception handling for blending none layerHyunKyung Kim
There was a blending issue when - BLEND_NONE layer having alpha channel is in the middle of layer stack - BLEND_NONE layer is composited by Client or Exynos composition - Target buffer of Client or Exynos composition is composited with the under layers by display The under layers of the BLEND_NONE layer were seen through BLEND_NONE layer. It was because Client and Exynos composition copied alpha channel of BLEND_NONE layer. HWC composited all of layers that are under the BLEND_NONE layer with Client or Exynos composition to fix this issue. Client composition handles BLEND_NONE layer like opaque layer in the latest SurfaceFlinger. Exynos composition handles BLEND_NONE layer like opaque layer with the patch below. libacryl: make alpha max if HWC blend mode is NONE Now, we can remove this exception handling. Bug: 167552373 Test: split screen, Youtube PIP Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com> Change-Id: Ic9febb8652c9e2352113dd829f3dc0655ea61a7e
2020-10-05libhwc2.1: Dump size restrictions of ResourceManagerYichi Chen
To understand the different size restrictions on all hw types, we enhance the dump info to provide the info from ResourceManager. Bug: 157259908 Test: dumpsys SurfaceFlinger Change-Id: Ie56e397b4ce0d46b6b067d42db036a6db924468b
2020-06-17libhwc2.1: Clean up source codeHyunKyung Kim
Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com> Change-Id: Ia8c303babc2d34890e843ade1646cf52d8d722a5
2020-06-17libhwc2.1: Change parameter of getCandidateM2mMPPOutImagesHyunKyung Kim
The number of image that getCandidateM2mMPPOutImages returns is not fixed. This patch changes parameter of getCandidateM2mMPPOutImages from array to vector. Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com> Change-Id: I16d01bf48e11e7acdc70be762a1d58e1cfbffb16
2020-06-17libhwc2.1: Add uncompressed YUV format to candidate of m2m outputHyunKyung Kim
SBWC format has dst crop alignment restriction so SBWC format could not be supported by m2mMPP in some dst size. This patch adds additional uncompressed YUV format to candidate list for m2m ouput to cover this case. SBWC format would be used only if there is m2mMPP that can support dst crop size and uncompressed YUV format would be used if there is no m2mMPP that can support dst crop size. Change-Id: Ibfc19302f458bbf3a776142221612d13d80763ce Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2020-06-17libhwc2.1: added G2D AFBC capa restrictionWoncheon Ahn
Change-Id: I1e65a26a09afa099c4974f822324b35403b517d3 Signed-off-by: Woncheon Ahn <woncheon.an@samsung.com>
2020-06-17libhwc2.1: Modify M2M capacity validationSungjun Bae
Change-Id: Ibd11c56c11b090045e0dcffc26258c7a0aa6c0f6 Signed-off-by: Sungjun Bae <june.bae@samsung.com> Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2020-06-17libhwc2.1: Add debugging code to check capacity of exynos compositionHyunKyung Kim
Change-Id: Iea15348866767f4235d6b90a242697ca466e135d Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2020-06-17libhwc2.1: Fix bug in checking capacityHyunKyung Kim
There was bug that doesn't check capacity when HWC assigns G2D_RGB and G2D_COMBO m2mMPP. This patch fixes this bug. In addition, this patch checks capacity only if m2mMPP can support required processing of layer. Change-Id: I3e9eae17a763fb60d57c893e3312db36643cee97 Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
2020-06-17libhwc2.1: Fix bug in checking required capacity for m2mMPPHyunKyung Kim
Required capacity of m2mMPP can be different according to destination format. Previous code checked required capacity with RGB destination format when it assigns resources. However destination format of m2mMPP can be YUV. This patch checks required capacity for m2mMPP according to destination format. Change-Id: Ice42f9182ecd1070ef3ecb5ea762dff3a59b6e53 Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>