- 07 Jul, 2022 1 commit
-
-
John Stultz authored
In commit e9fbd8d6 ("drm_hwcomposer: Set return type to std::optional for BufferInfoGetters") the final return for BufferInfoMaliMeson::GetBoInfo() erroneously was changed to return {} instead of the calculated BufferInfo object. This simply fixes the issue, returning the BufferInfo. Change-Id: I03789b48dc4a0df64432f7ff31661746163a96b8 Signed-off-by:
John Stultz <jstultz@google.com>
-
- 30 Jun, 2022 2 commits
-
-
John Stultz authored
Since commit d0494d9b ("drm_hwcomposer: Fixes for display hotplug / headless mode"), which introduced an extra call to de-active the display on de-init, we've seen regressions on db845c with the VtsHalGraphicsComposerV2_3TargetTest test set. This seems to be due to an issue on db845c, where after putting the lt9611 bridge to sleep, the connection detection stops working even after the chip is reset. However, on changing the kernel driver to avoid putting the bridge to sleep so connect detection works, we start to see SIGSEGV crashes in drm_hwcomposer, due to the service expecting the hwmodule to finish registercallback during client detaching within 1 second. Exceeding this values causes VTS to crash. And msm driver introduces delay enough to exceed the limit. So this patch is a workaround to restore previous behavior to avoid the regression until we can sort out a proper fixes to db845c and drm_hwcomposer. Signed-off-by...
-
Roman Stratiienko authored
When drm_hwcomposer is used with drm/sun4i driver, 'adb shell stop && adb shell start' sequence causes noise on the unused planes during the bootanimation. It looks like some bug in the drivers or DRM frontend itself, which keeps the plane assigned to the CRTC if the atomic commit contains CRTC deactivation. We need more time to investigate it. For now we can split disposal into 2 atomic commits, which fixes the noise issue. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 22 Jun, 2022 1 commit
-
-
clock_nanosleep return errno directly instead of -1 with errno set Signed-off-by:
Keith Mok <keithmok@google.com> [jstultz: Fixed minor style issues] Signed-off-by:
John Stultz <jstultz@google.com> Change-Id: I779f2a8234b3dae46d64efee2210b7a2c5a92043
-
- 30 May, 2022 1 commit
-
-
Roman Stratiienko authored
Pipeline is null in the headless mode, therefore any attempt to import the buffer causes a null-pointer dereference crash. Fixes: 4b2cc484 ("drm_hwcomposer: Reorganize struct DrmHwcLayer") Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 17 May, 2022 6 commits
-
-
Roman Stratiienko authored
This allows saving for about 2-6% of frame time spending in the HWC API thread (value depends on CPU maturity). Framework does not create a new buffer for every frame. Instead in 98% of cases it sends the same buffers over and over (doing circular shifting of the swapchain). We can avoid redundant BufferInfo getting and FrameBuffer importing for the whole layer. To do this properly first we have to ensure we're having a deal with the swapchain, not a set of unique buffers. This procedure internally called the swap chain reassembling. After we ensure CLIENT is using swapchain, we can safely store BI and FB for every chain element and reuse it. Example for single layer: Frame # | Buffer Unique ID | State -- | -- | -- 1 | 301 | Reassembling... 2 | 302 | Reassembling... 3 | 303 | Reassembling... 4 | 301 | Caching... (Chain reassembled!) 5 | 302 | Caching... 6 | 303 | Caching... 7 | 301 | Reusing cached data 8 | 302 | Reusing cached data 9 | 303 | Reusing cached data ... | ... | ................... 999 | 304 | Not in cache, purge the cache. 1000 | 305 | Reassembling... Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
dmabuf stats inode field can be used as unique buffer id. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
1. Move BlendMode, ColorSpace, SampleRange fields to the struct BufferInfo, allowing extraction of the data from native_handle using Metadata@4 API. Use it when data from HWC2 API can't be used (Currently it's a BlendMode case for CLIENT layer) 2. Rename DrmHwcLayer to LayerData and move it to compositor/ directory. (I was confused in the past because of similarity of names DrmHwcLayer vs HwcLayer, so this step should meke it easier for newcomers to understand the code) 3. Allow clonning of the LayerData to propagate it through the composition pipeline. Thus LayerData can be used by both HwcLayer to track state and by the compositor. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
This is a bit of code modernization. Further changes will require indication that buffer_info is valid, and using std::optional is the most correct approach to do that. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
... to emphasize its purpose. - Rename struct HwcDrmBo -> struct BufferInfo - Remove unused BufferInfo::acquire_fence, BufferInfo::hal_format and BufferInfo::usage fields Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
This metrics are useful to check time the FB cache saves for HWC. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 10 May, 2022 2 commits
-
-
Roman Stratiienko authored
This change fixes FPS drop on multidisplay devices. Also in some cases it gives graphics pipeline more free time to draw in advance. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
GetReleaseFences() should return release fence for the prior buffer (not for the one assigned to layer at the moment of GetReleaseFences call). Once not provided, old front buffer can be damaged before new buffer presented. (Such issues start to appear once we started using non-blocking DRM/KMS commits). Using present (out) fence is a perfect solution, since it is signaled once old buffer replaced with the new one. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 09 May, 2022 3 commits
-
-
Roman Stratiienko authored
This is useful for accessing the main lock from drm / compositor related code blocks. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Additionally: 1. Fix new clang-tidy findings 2. Disable readability-identifier-length check for all tidy levels Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Return Error::Unsupported in headless mode and if no EDID blob returned by the kernel. With this change GraphicsComposerHidlTest#GetDisplayIdentificationData VTS no longer fails. Also fix outPort assignment to avoid setting negative values (handle_ is 0 for primary display). Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 16 Apr, 2022 1 commit
-
-
Roman Stratiienko authored
Test: atest VtsHalGraphicsComposerV2_1TargetTest Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 28 Mar, 2022 1 commit
-
-
Roman Stratiienko authored
Further testing showed that several issues is still present: 1. Boot without display doesn't work. 2. Unplug/plug primary display has some flaws due to incomplete HwcDisplay disposal. 3. In case creation of the pipeline fails, hwcomposer crashes. This commit aims to address them. Fixes: bb594baa ("drm_hwcomposer: Rework HwcDisplay disposal to avoid races") Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 18 Feb, 2022 2 commits
-
-
Roman Stratiienko authored
The code prior to this commit has a flaw: HwcDisplay::~HwcDisplay() { ... auto &main_lock = hwc2_->GetResMan().GetMainLock(); /* Unlock to allow pending vsync callbacks to finish */ main_lock.unlock(); At this point display is no longer in displays_[] list. After lock is released, hwc2 API thread starts to process transactions which may fail with BAD_SIAPLAY responce and cause SF to crash. vsync_worker_.VSyncControl(false); vsync_worker_.Exit(); main_lock.lock(); } 1. Rework the logic in order to avoid such scenariuos: 1.a. Temporary switch non-primary unplugged displays to headless state allowing remaining transactions to succeed without impacting the pipeline. 1.b. Give 100mSec delay before destroying / removing display from the displays_[] list to allow all pending hwc2 transactions to complete. 2. Support hotswap of the DrmDisplayPipeline, which makes primary display reattaching process smoother. Now SF should be able to gracefully remove all layers. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Dumping uevents is useful for debugging purposes. 1. Extract logic related to uevent socket into utils/UEvent.h class. 2. Use it by both UEventListener.cpp and tests/uevent_print.cpp. Bump clang-tidy level of UEventListener.cpp to normal. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 15 Feb, 2022 3 commits
-
-
Roman Stratiienko authored
Fixes drm_hwcomposer build for Android-9. Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com> Change-Id: I14e931c37c3d09284dfd338e6482a27cf21e0e10
-
d26619b5 ("drm_hwcomposer: CI: Upgrade clang-* to v12") declared 'ret' as ssize_t but after commit 1e053b4e ("drm_hwcomposer: Make uevent listener standalone") drm/UEventListener.cpp is affected by the following builing error: external/drm_hwcomposer/drm/UEventListener.cpp:82:28: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'ssize_t' (aka 'int') [-Werror,-Wsign-compare] for (uint32_t i = 0; i < ret;) { ~ ^ ~~~ 1 error generated. Fixes: 1e053b4e ("drm_hwcomposer: Make uevent listener standalone") Signed-off-by:
Mauro Rossi <issor.oruam@gmail.com> [RomanS: Fixed CI nitpicks] Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com> Change-Id: Ia97d9019c21ac68be386a627cb101f6e423bbfc7
-
Fixes the following building error: external/drm_hwcomposer/DrmHwcTwo.cpp:985:14: error: decomposition declarations are a C++17 extension [-Werror,-Wc++17-extensions] for (auto &[handle, layer] : layers_) { ^~~~~~~~~~~~~~~ 1 error generated. Signed-off-by:
Mauro Rossi <issor.oruam@gmail.com> Signed-off-by:
Roman Stratiienko <r.stratiienko@gmail.com> Change-Id: I236f16969e4500ff2efb79c06500bc4d3a3d810c
-
- 09 Feb, 2022 2 commits
-
-
Roman Stratiienko authored
Primary responsibilities of this class are: 1. Send composition/mode/active state over DRM atomic commit IOCTL to the kernel 2. Track commit state and keep planes owned by the Pipeline while they are either displayed or staged for displaying. 3. Keep framebuffers alive while they are in use or staged. Not much related to composition itself, therefore rename it to DrmAtomicStateManager and move it to drm folder. Bump clang-tidy level of DrmAtomicStateManager.c to normal by fixing minor clang-tidy findings. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Now we can use empty DrmKmsPlan to achieve the same goal. + Remove unused HwcDisplay::ClearDisplay() Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 04 Feb, 2022 4 commits
-
-
Roman Stratiienko authored
We are not testing it for more than year, therefore it's better to use generic logic for 'rcar-du' instead. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Rewrite Layer-to-Plane planner. Get rid of ~200 redundant lines of code + added plane sharing functionality. Closes: #11 Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Enough to get 100% passes in Composer 2.4 VTS. Some SOCs require a VTS fix to pass [1] [1]: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1954544 Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Composer 2.4 will require another vsyncworker callback to send VsyncPeriodTimingChanged event. It makes sence to use single VSyncWorker and flags to indicate which actions are required to perform. This should also save some runtime resources. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 02 Feb, 2022 3 commits
-
-
Roman Stratiienko authored
The following use scenarios are now possible: 1. When no display connected, primary HwcDisplay is created in headless mode. 2. When user connects first display, it binds to primary slot, replacing headless HwcDisplay. 3. When user connects another display it binds to the new HwcDisplay slot, creating new display for the framework. 4. When user disconnects first (Primary) display, drm_hwc detaches second display and attaches it to the Primary slot. In this case framework is notified as Primary display resolution updated (Plugged->Plugged transition). And second display is disconnected (Plugged->Unplugged transition). DrmDisplayPipeline is now created on demand (after hotplug event). HwcDisplay class is now destructed on connector unplug, which will give us ability to destroy any resource caches (will be required for FB caching logic). Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
HwcDisplay can now take all necessary objects from DrmDisplayPipeline. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
We should assign weak pointer object to really take ownership. Fixes: cad8e0ca ("drm_hwcomposer: Introduce DrmDisplayPipeline class") Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
- 31 Jan, 2022 8 commits
-
-
Roman Stratiienko authored
Create systematic way of binding DRM objects (Crtc,Encoder,Planes...) to the pipeline using RAII. Use it to create the pipeline. + Allow pipeline creation to fail. Closes: #14 Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
1. Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing clang-tidy findings. 2. Remove DrmDevice self-reference. 3. Replace shared_ptr reference to DrmDevice in DrmFbImporter with a pointer, making ResourceManager only owner of DrmDevice and its chilren. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Implement DrmConnector instantiation through CreateInstance() static method, which helps to reduce complexity of DrmDevice::Init() function. Move Connector-to-CRTC binding information to the DrmDevice class. Move drm/DrmConnector.h to Normal clang-tidy checks list by fixing clang-tidy findings. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Implement DrmEncoder instantiation through CreateInstance() static method, which helps to reduce complexity of DrmDevice::Init() function. Move Encoder-to-CRTC binding information to the DrmDevice class. Move drm/DrmEncoder.h to Normal clang-tidy checks list by fixing clang-tidy findings. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Implement DrmCrtc instantiation through CreateInstance() static method, which helps to reduce complexity of DrmDevice::Init() function. Move CRTC-to-Display binding information to the DrmDevice class. Move drm/DrmCrtc.h to Normal clang-tidy checks list by fixing clang-tidy findings. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
This feature isn't correctly fits hwc2 and SF requirements. Primary display prioritization shall be done by introducing ability to override internal/external connector type for any connector. 'vendor.hwc.drm.primary_display_order' property is no longer relevant. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
Primary display should always be internal. Closes: #58 Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-
Roman Stratiienko authored
This allow to throw away few lines from DrmDevice::Init() making it less complicated. Signed-off-by:
Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-