- 11 Apr, 2019 1 commit
-
-
vchong authored
The AFBC modifiers in [1] are defined in aosp bionic's drm headers only if it has been updated to v4.19 kernel headers [2]. If the version used is older, drm_hwcomposer build will fail, so we extend the conditional of the AFBC logic to include one of these modifiers. [1] cc5fca4f ("drm_hwcomposer: Add support for Arm Framebuffer Compression (AFBC) modifiers.") [2] https://android.googlesource.com/platform/bionic/+/9ce28844db7cf80ee8cf7c88dab23b666eaab739 Signed-off-by:
Victor Chong <victor.chong@linaro.org>
-
- 10 Apr, 2019 2 commits
-
-
Prevent external/drm_hwcomposer from referencing device/linaro/hikey, which may not exist in all trees, by compiling most of drm_hwcomposer as a static library and then compiling just the source files that are affected by device-specific #defines and #includes in device/linary/hikey/gralloc*. Fixes: 129543119 Test: m hwcomposer.drm_hikey hwcomposer.drm_hikey960 MODULES-IN-external-drm_hwcomposer Change-Id: I800b147a40c4e368ce1a74273728f5941f6b63c4 Signed-off-by:
Colin Cross <ccross@android.com> Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
See build/soong/README.md for more information. This replaces the product and BoardConfig.mk variable conditionals with different versions of the HAL for each product, which will also allow checkbuild to verify that they build even on products that don't use them. Fixes: 122332597 Test: mma Change-Id: I8d2c8ac1bb58dcbc81ae75c2bb2c97d4485909b4 Signed-off-by:
Colin Cross <ccross@android.com> Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 30 Mar, 2019 1 commit
-
-
John Stultz authored
As requested by Sean, remove unnecessary parens around the !preferred_mode_found check. Change-Id: Ibca46c104ab54be894b860373fc42ec047afd337 Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 28 Mar, 2019 1 commit
-
-
John Stultz authored
With commit 1b1e35eb ("drm_hwcomposer: Chose preferred mode with type DRM_MODE_TYPE_PREFERRED"), we now pick a preferred mode rather then just the first mode to use. However, on some systems there may erroniously be multiple modes marked as DRM_MODE_TYPE_PREFERRED. In this case, the logic added in that commit ends up selecting the *last* preferred mode. This seems less likely to be the desired choice, compared to what we had before (which picked first mode provided). So this patch alters the selection logic to only use the first DRM_MODE_TYPE_PREFERRED mode found, rather than the last. Change-Id: Ieb3e5d946b96099f14c1c5a287ca8113360a39d1 Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 19 Mar, 2019 1 commit
-
-
Sean Paul authored
This reverts commit 11290378 . Per discussion in !47 [1], this is not needed. Signed-off-by:
Sean Paul <seanpaul@chromium.org> [1]- drm-hwcomposer/drm-hwcomposer!47
-
- 18 Mar, 2019 3 commits
-
-
Current implementation doesn't handle properly the cases where zpos range starts from 1. See drm-hwcomposer/drm-hwcomposer#19 (comment 100622) Fixes: ea1c5e5a ("drm_hwcomposer: Add z order support") Signed-off-by:
Alexandru Gheorghe <alexc.g1.ro@gmail.com> [seanpaul converted to std::tuple return type] Signed-off-by:
Sean Paul <seanpaul@chromium.org> Change-Id: I35dc2c1cfd0e38ca3a47cf4e668eeb5f3c470ddb
-
Sean Paul authored
To be a little more precise, add an 'is_' prefix Change-Id: Idd8fe45a4dfba1cd778b4ed6b761ec489697c31a Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
Sean Paul authored
To keep consistent with other functions Change-Id: I11ba07eabcee08f3db09b3a5422bc480482a62c1 Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
- 15 Mar, 2019 1 commit
-
-
Sean Paul authored
The script uses the author/committer of HEAD instead of the commit it is inspecting. This fails when a patch set has different authors/committers (such as drm-hwcomposer/drm-hwcomposer!46 ) Change-Id: I0fcd724cf372fad435c7614777f13e015c204c3d Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
- 06 Mar, 2019 3 commits
-
-
Andrii Chepurnyi authored
Propagate correct include path for gralloc_handle.h Signed-off-by:
Andrii Chepurnyi <andrii_chepurnyi@epam.com>
-
Andrii Chepurnyi authored
According to the Linux Kernel: "DRM_MODE_TYPE_PREFERRED: Preferred mode, usually the native resolution of an LCD panel. There should only be one preferred mode per connector at any given time." Will use it during preferred mode choice. Tested-by:
John Stultz <john.stultz@linaro.org> Signed-off-by:
Andrii Chepurnyi <andrii_chepurnyi@epam.com>
-
Andrii Chepurnyi authored
Unplug of the main display will not work because of Activity Manager code(ActivityStackSupervisor.java:handleDisplayRemoved). Only one display can be connected as an external display (see SurfaceFlinger::determineDisplayType). Tested-by:
John Stultz <john.stultz@linaro.org> Signed-off-by:
Andrii Chepurnyi <andrii_chepurnyi@epam.com>
-
- 05 Mar, 2019 1 commit
-
-
Andrii Chepurnyi authored
Use HWC2_VSYNC_ENABLE for correct state recognition. Tested-by:
John Stultz <john.stultz@linaro.org> Signed-off-by:
Andrii Chepurnyi <andrii_chepurnyi@epam.com>
-
- 28 Feb, 2019 2 commits
-
-
John Stultz authored
In some cases, we've seen drm_hwcomposer start to try to compose frames before anything has called SetClientTarget(). This seems to be some sort of a race, which for some reason we only see with certain dummy HDMI dongles (which provide fake EDID data) which allow our lab machines to run headless. I'm still trying to understand more about why this happens only in this case. The net of the issue is we see CreateComposition() being called, which adds the client_layer_ to the zmap. Then it creates the DrmHwcLayers copying the non-initialized buffer_ value as the sf_handle. This then later causes a crash in ImportBuffer() when we traverse the non-null (but invalid) hnd value. Thus, this patch simply initilizes the buffer_ pointer to NULL so that we error out properly in the case of the race. Reported-by:
YongQin Liu <yongqin.liu@linaro.org> Signed-off-by:
John Stultz <john.stultz@linaro.org> Change-Id: I5fde3fccde86519edb04e61cbc2842eda395ade4
-
John Stultz authored
Unfortunately with the AFBC support patches, I validated with the hikey960 (which has a gralloc that supports AFBC), but not with the original hikey board (which does not support AFBC). Since we use the same importer for both boards, conditionalize the AFBC logic if those values are not defined. This patch will also need a tweak to the hikey gralloc to add support for the handle->internal_format reference (which doesn't currently exist on hikey's gralloc). Change-Id: I31aea82b321ff7dd7608c6a3522cbc93bb629319 Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 31 Jan, 2019 1 commit
-
-
One needs to translate the Gralloc buffer flags for AFBC (eg MALI_GRALLOC_INTFMT_AFBC_BASIC) to the corresponding linux kernel drm modifiers. This gets passed to libdrm via drmModeAddFB2WithModifiers. Changes from v1:- - Moved ConvertGrallocFormatToDrmModifiers() and IsDrmFormatRgb() from 'DrmGenericImporter' to 'HisiImporter' as suggested by Sean paul - Check if the format is rgb and set AFBC_FORMAT_MOD_YTR only if any of the AFBC related Gralloc flags are set. Changes from v2:- - Changed ConvertGrallocFormatToDrmModifiers() and IsDrmFormatRgb() from 'public' to 'private' (suggested by Sean Paul) Changes from v3:- - Reordered the members of 'class HisiImporter'. Functions should go above member variables. (suggested by Sean Paul) Changes from v4:- - Rebased and some style changes (as suggested by gitlab-ci-checkcommit.sh) Signed-off-by:
Ayan Kumar Halder <ayan.halder@arm.com> Reviewed-by:
Sean Paul <seanpaul@chromium.org> /-- Note for reviewer I was able to get this working for hikey960 with aosp/master for kernel 4.14. The libdrm headers need to be updated as the AFBC modifiers are missing in the aosp/master's external/libdrm. --/ Change-Id: I66abaa08d19ce88169cc40522b167dfe5efc7036
-
- 30 Jan, 2019 1 commit
-
-
Sean Paul authored
Job 93709 [1] failed with missing committer sign-off. Ayan has their committer string set to "Ayan kumar halder <ayan.halder@arm.com>", and the Signed-off-by line on the commit was "Signed-off-by: Ayan Kumar Halder <ayan.halder@arm.com>". So grep did what we asked it to do and did not find the SoB since the case was incorrect. This patch changes to case-insensitive search and while we're at it, trims excess whitespace from both the commit body and the committer/author name. Finally, I've improved the error message so it's hopefully more clear why things fail in the future. [1]- https://gitlab.freedesktop.org/ayan.halder/drm-hwcomposer/-/jobs/93709 Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
- 15 Jan, 2019 1 commit
-
-
John Stultz authored
AOSP's toolchain throws errors on un-annotated switch case fallthroughs. Rather then adding [[fallthrough]] annotations, which would add C++17 syntax, switch to using a if statement instead. Change-Id: Id0b2bf6d365d50e637569f0c4353ceb4fda21c16 Signed-off-by:
John Stultz <john.stultz@linaro.org> --- v2: Rework conditional to be more readable as suggested by seanpaul
-
- 14 Dec, 2018 1 commit
-
-
In AOSP/master, there was a structure renamed, so try to sync AOSP/master's build fix change to freedesktop/master. NOTE: I'm not sure how to best submit this, as the upstream freedesktop/master may have users outside of AOSP/master. But I'm not sure what devices on an official release are using drm_hwc so it seems like this would be more useful then not. Bug: 116154944 Test: builds Change-Id: I244bd049afae6ba8310f6b6bf2d3b1ee2e891de3 Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 03 Dec, 2018 1 commit
-
-
Alexey Firago authored
With CanImportBuffer() in place we don't need fake importing anymore. Buffers should be checked before supplied to ImportBuffer() and plane planner. Instead of fake importing return -EINVAL for non HW_FB buffers in ImportBuffer() and skip non HW_FB in planner. Additionally, return error from planner if we didn't emplace any layer to force client compositing. Signed-off-by:
Alexey Firago <alexey_firago@mentor.com>
-
- 27 Nov, 2018 1 commit
-
-
Alexey Firago authored
Add CanImportBuffer() function to the Importer interface. Platform specific importer should check in this function if it can import given buffer_handle_t. For example platformhisi will return false for buffers without GRALLOC_USAGE_HW_FB. This function should be used on ValidateDisplay step to avoid the need of 'fake-importing' of buffers. Signed-off-by:
Alexey Firago <alexey_firago@mentor.com>
-
- 09 Oct, 2018 2 commits
-
-
Alexandru Gheorghe authored
Currently, the planner just pops the first available drm plane and if that can't be used for the DrmHwcLayer it just returns error. This proposes a slighlty smarter way to do that by trying to see if any of the DrmPlane can be used for the DrmHwcLayer in question. More, if the drm_plane doesn't have a fix zorder then we could re-add him to the list of unused planes, so it could be used for hosting other less demanding DrmHwcLayers. Signed-off-by:
Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-
Alexandru Gheorghe authored
All existing stage planers(PlanStageGreedy, PlanStageProtected, PlanStageHiSi) silently ignore if they couldn't allocate a drmplane for a drmhwclayer and return success. That doesn't go well with the assumptions from ValidateDisplay, where if the atomic check succeeds we just assume that we could do Device composition for a maximum of num_of_drm_planes layers. But, since we silently dropped some drmhwclayer we never put those in the atomic check and we won't put it in the final atomic commit, so we end up with a wrong composition on the screen. What this proposes is propagating the error, which will make ValidateDisplay to fallback on client composition. Signed-off-by:
Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-
- 05 Sep, 2018 2 commits
-
-
Sean Paul authored
Check the subject prefix starts with "drm_hwcomposer: " and we have Signed-off-by tags for both author and committer. Change-Id: Ib26b8e5cbeae2156014f2bbfb8703545bdc1decb Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
Sean Paul authored
This will be useful for adding more functionality to it. It's not very practical to script inside the yml. Change-Id: I71aa6b40d282f750eb9bce65dd2cfd9e2828905b Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
- 04 Sep, 2018 1 commit
-
-
The upstream version of pixel blend mode property will be added to the DRM core. So added support for pixel blend mode property to the DrmPlane. Created ValidatePlane() function in Planner to do the blend check, and also moved rotation and plane alpha property check there. Fixed the Emplace() call in platformhisi.cpp as was done with the other planner implementations. Change-Id: I7e6714699cf7c222a83de472060d4625e1e6945a Reviewed-by:
Sean Paul <seanpaul@chromium.org> Reviewed-by:
Liviu Dudau <liviu.dudau@arm.com> Signed-off-by:
Lowry Li <lowry.li@arm.com> Tested-by:
John Stultz <john.stultz@linaro.org>
-
- 03 Sep, 2018 1 commit
-
-
Andrii Chepurnyi authored
Current .clang-format requires clang-format 5.0 Signed-off-by:
Andrii Chepurnyi <andrii_chepurnyi@epam.com>
-
- 31 Aug, 2018 4 commits
-
-
John Stultz authored
Originally-by:
Alistair Strachan <astrachan@google.com> With Android P, the GraphicBufferMapper ImportBuffer interface has changed, which breaks the current drm_hwcomposer master branch: https://android.googlesource.com/platform/frameworks/native/+/dbbe33b95336efa74e8bb4ebcf6cba50919aa247 Alistair has updated the AOSP/master branch of drm_hwcomposer to make it build: https://android.googlesource.com/platform/external/drm_hwcomposer/+/4f73630dcdab6604a3f4b3e7d59068633d923745%5E2..4f73630dcdab6604a3f4b3e7d59068633d923745/ But since we need to keep older users working, so I've forward ported and conditionalized the code so both new and old users can properly build. Change-Id: I2089c1105a7074ff13b5ddfe2d2eb7129917794f Signed-off-by:
John Stultz <john.stultz@linaro.org> --- v2: * Fix up LOCAL_CPPFLAGS typeo and unsued variable errors both found thanks to Alexandru Gheorghe v3: * Reordered so this patch comes last * Squish layer_count calculation patch into this one
-
John Stultz authored
The new GraphicBufferMapper ImportBuffer takes a pixel_stride as an argument, so we need to caluclate that and store it in the hwc_drm_bo at import so we can use it here. I'd still welcome better ideas to calculate pixel_stride for generic drm importer. Change-Id: Iea2c483f3750dd5bed38740802b560911bc54ef2 Signed-off-by:
John Stultz <john.stultz@linaro.org> --- v2: * Utilized pixel stride values already in some gralloc handle implementations * Fixed embarasing bit/byte math snafu (preserving bits per pixel since YUV conversions using bytes doesn't seem sane) - Extra review still would be appreciated here! v3: * Renamed to use Drm... instead of DRM...
-
John Stultz authored
The new GraphicBufferMapper ImportBuffer takes a format as an argument, but I believe it wants the HAL_PIXEL_FORMAT_* and not the DRM_FORMAT value. So stash the HAL_PIXEL_FORMAT_* into the hwc_drm_bo so we can pass it along when needed. Change-Id: Id5b8e0d8c624e26c2c6307f85489665c88a9e75d Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
John Stultz authored
Add HWC_DRM_BO_MAX_PLANES to avoid open coded num_gem_handles calculations. Change-Id: Iebdaa67518e75f5b7f4445d92b97ca72e625c04b Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 28 Aug, 2018 1 commit
-
-
John Stultz authored
The dummy HiSi Planner is careful to not try to emplace layers that aren't HW_FB. However, in some cases we might have a single layer to draw. In that case the dummy importer will pretend it imported the buffer, and the planner will skip over it and not emplace it. Since there were no errors and the layers_ count is the same as the available planes, we won't force client composition, and will try to do device composition for the buffer we didn't really import. This results in the drm layer going a bit wonky. Thus, this patch tries to fix this by erroring out if we try to plan only a single layer, but don't emplace anything. This results in the CreateComposition() function failing, which will force client rendering, making it work (with only minimal logcat noise - only in the single layer case). Change-Id: I563dbba3c2adce5617fae61cb0440368053e5bff Signed-off-by:
John Stultz <john.stultz@linaro.org>
-
- 27 Aug, 2018 3 commits
-
-
Sean Paul authored
hikey can only display layers which do not have gralloc usage HW_FB (hint: that leaves just the client target layer). As such, there's no benefit trying to import them since it'll just fail. So if we encounter a layer such as this, fake the import (the release will be a noop since gem_handles will be 0). Also, as a belt-and-suspenders move, replace the greedy planner with one that only displays (usage != HW_FB) to be doubly sure that we don't try to display the no-op layers Change-Id: I7bf88cfb7bda1dd5f47b741709619494431558a2 Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
Sean Paul authored
Run the new clang-format style over the codebase to make things compatible. Change-Id: I267d5070929aaa7965d58655da841402debdcb6c Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
Sean Paul authored
Updating clang-format to 5.0 to get a bit more control over our styling. Two things that will be beneficial: - Alphabeticalize headers - More control around line breaking, especially preferring val = SomeFunction(arg1, arg2); vs: val = SomeFunction(arg1, arg2); It's still not perfect, but it seems greatly improved. Signed-off-by:
Sean Paul <seanpaul@chromium.org>
-
- 13 Jul, 2018 4 commits
-
-
Alexandru Gheorghe authored
Flattening of a scene is triggered if it doesn't change for a while. As of now there is a separate thread which triggers flattening if the scene did not change in last 60 vsyncs. There are two options for flattening a scene: * Serial, by using a writeback connector attached to the same crtc as the one driving the display. This happens only if possible_clones mask reports that the display encoder and writeback encoder could work simultaneously. The steps for achieving this are: 1. Build a commit that enables writeback connector, we don't need to build a commit that contains the entire active_composition, just set the writeback specific properties a let the kernel duplicate the rest of the state. 2. Commit and wait for writeback_fence to fire. 3. Setup a composition with just one plane enabled. 4. Apply the composition if a new one has not been applied meanwhile. * Concurrent, by comitting the scene to a new unused crtc (state != DRM_MODE_CONNECTED) and getting the result back through a writeback connector. The steps for achieving this are: 1. Copy layers from active composition. 2. Plan layers of copy on the unused crtc. This is realized by using a newly created DrmDisplayCompositor object. 3. Commit copy to the unsed crtc and get the result as a drmhwclayer. 4. Setup a composition with just one plane enabled. Re-importing the buffers might be needed since we might have been using a different dri node. 5. Apply the composition if a new one has not been applied while doing the flattening Signed-off-by:
Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-
Alexandru Gheorghe authored
ApplyFrame holds the lock just when it swaps the value of active_composition_, in a multithread context we could end up in a situation where something is shown on the screen, but something else is set in active_composition_. Fix it by holding the lock during CommitFrame. Signed-off-by:
Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-
Alexandru Gheorghe authored
When writeback connectors are available assign them to displays, in order to be able to use them for flattening of the current displayed scene. The pipeline for each display will look like this: CRTC ---- encoder ------------ display connector. |------- writeback enc ------ writeback connector. However, the writeback connector will be later used/enabled only if one of the following conditions are met: - Could be a clone of the display connector, as pointed by the possible_clones property. - The display_connector is disconnected, so we are safe to use it for flattening the scene that's already presented on another display. Signed-off-by:
Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-
Alexandru Gheorghe authored
drmModeEncoder has a field called possible_clones. It's a bit mask which tells if the encoder could be simultaneously connected, to the same CRTC, with the encoders specified in the possible_clones mask. Signed-off-by:
Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
-