- 03 Oct, 2019 1 commit
-
-
Neil Armstrong authored
Change-Id: I69acff87fca63b901b68890c3b38e86fc4698baa
-
- 11 Jul, 2019 2 commits
-
-
Mykhailo Sopiha authored
This commit adds support for LCD panel as internal connector. Change-Id: Iccb96526ee11bc4a9b53fc8dcd9ba0ea218d41b6 Signed-off-by:
Mykhailo Sopiha <mykhailo.sopiha@linaro.org>
-
Mykhailo Sopiha authored
This patch adds non hwfb filter to generic drm importer with additional property "hwc.drm.exclude_non_hwfb_imports". By default this is set to false, and no logic changes are happening. On setting this option to 1 the filter is being activated on Init() function. Change-Id: I7a718a66cb6214c051335a4589d60b5833e5c545 Signed-off-by:
Mykhailo Sopiha <mykhailo.sopiha@linaro.org>
-
- 21 Jun, 2019 1 commit
-
-
Neil Armstrong authored
Currently LocalDisplayAdapter in AOSP filters out similar modes based on their currently limited supported attributes: width/height/refresh. This leads to a situation where important modes are discarded, like the preferred mode and/or the active mode, leading SurfaceFlinger to select an unwanted and potentially invalid mode in the list provided by drm-hwcomposer to HWC2. Let's pre-filter the modes provided to HWC2 by : - systematically adding the preferred mode - systematically adding the current active mode, if different from preferred mode - keeping the interlaced modes filtering-out if no other non-interlace modes with same widthXheight exists (for HD-Ready 1080i TVs or CVBS) - discarding modes if a similar mode with same widthXheight@refresh was already selected for HWC2 This mimics the behavior of LocalDisplayAdapter filtering algorithm, but keeps the important modes from the DRM Point Of View and drops the duplicate modes while keeping the mode ordering from DRM in account. This local filtering should ultimately go out when HWC2 can actually handle mode Attributes to describe Preferred mode, Interlaced, 3D... and LocalDisplayAdapter uses these Attributes for filtering duplicate modes. Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com> Tested-by:
John Stultz <john.stultz@linaro.org>
-
- 11 Jun, 2019 3 commits
-
-
Sean Paul authored
This is way overdue Signed-off-by:
Sean Paul <seanpaul@chromium.org> Change-Id: I1bcbd8fdb0bb03feafd76bc41f6f11c03cdf9c25
-
This specific platform handler is dedicated for the Amlogic SoC, and more precisely for the Amlogic G12A family. OpenGL/Mali allocation is done via a slightly modified ARM Gralloc module, thus needing a custom platform handler to handle the custom private_handle_t structure. This platformmeson is based on platformhisi without the AFBC YUV management (not handled by the Amlogic SoCs). Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com> Change-Id: I1a1d20b0a84b0e17aa3417c8e9633712f258523d
-
Neil Armstrong authored
HWC2 has currently no support for interlaced modes, and will conflict with non-interlaced modes for now. Drop them in DrmHwcTwo::HwcDisplay::GetDisplayConfigs(), correctly handling the two phase calls to GetDisplayConfigs() giving a valid num_configs without the interlaced modes. Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com>
-
- 07 Jun, 2019 1 commit
-
-
Mykhailo Sopiha authored
Move some common logic from Importer class implementations into DrmGenericImporter class: - reused generic constructors and destructors for derived classes - formed common Init() logic for all derived classes - removed unused gralloc_ and drm_ variables from derived classes - made drm_ protected for base class to be reused in derived Signed-off-by:
Mykhailo Sopiha <mykhailo.sopiha@linaro.org>
-
- 04 Jun, 2019 1 commit
-
-
Neil Armstrong authored
For DMT modes and HDMI modes with 1000/1001 variations, the kernel reports the vrefresh in integer, rounded up, thus 59.94Hz or 23.97Hz are reported as 60Hz and 24Hz to userspace. To solve this, recalculate the vrefresh from clock + resolution. Signed-off-by:
Neil Armstrong <narmstrong@baylibre.com>
-
- 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 3 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>
-