summaryrefslogtreecommitdiff
path: root/Android.mk
AgeCommit message (Collapse)Author
2018-03-14drm_hwcomposer: Add platformhisi buffer importer for hikey and hikey960John Stultz
This allows for importing buffers allocated from the hikey and hikey960 gralloc implementations. Cc: Marissa Wall <marissaw@google.com> Cc: Sean Paul <seanpaul@google.com> Cc: Dmitry Shmidt <dimitrysh@google.com> Cc: Robert Foss <robert.foss@collabora.com> Cc: Matt Szczesiak <matt.szczesiak@arm.com> Cc: Liviu Dudau <Liviu.Dudau@arm.com> Cc: David Hanna <david.hanna11@gmail.com> Cc: Rob Herring <rob.herring@linaro.org> Cc: Alexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com> Cc: Alistair Strachan <astrachan@google.com> Acked-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
2017-10-25drm_hwcomposer: remove unnecessary external includesRob Herring
Linking to libraries will add necessary include paths, so we don't need to list them explicitly. Still need libsync for sw_sync.h until this dependency is removed. Tested-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Rob Herring <robh@kernel.org>
2017-10-09drm_hwcomposer: remove NVIDIA importerRob Herring
There's no opensource implementation for the NVIDIA gralloc implementation, so remove it as it is not testable. As all of the gralloc perform() operations are specific to it, they can be removed, too. Signed-off-by: Rob Herring <robh@kernel.org> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Robert Foss <robert.foss@collabora.com>
2017-09-28drm_hwcomposer: Remove threadingSean Paul
Since HWC2 doesn't require the use of threads to implement correct synchronization, remove some of these threads. Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-09-24drm_hwcomposer: move library to /vendorRob Herring
As part of Treble project in Android O, all the device specific files have to be located in a separate vendor partition. This is done by setting LOCAL_PROPRIETARY_MODULE (the name is misleading). This change will not break existing platforms without a vendor partition as it will just move files to /system/vendor. Signed-off-by: Rob Herring <robh@kernel.org>
2017-04-25drm_hwcomposer: refactor WorkerAdrian Salido
Make use of standard library mutex and conditions which simplifies use of condition variables and benefits from things like scoped locking. Also add tests to make sure it runs as expected. Change-Id: Iaf92e17e1f6757dce490eddee61f84cb1f953b0c
2017-04-13drm_hwcomposer: Initial stub HWC2Sean Paul
This patch adds the HWC2 interface to drm_hwc, and stubs out all functionality. Change-Id: I65b09e7266e887dd184c0c345016d5a768f6349a Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Robert Foss <robert.foss@collabora.com>
2017-02-28drm_hwcomposer: Move some utilities out of hwcomposer.cppSean Paul
There are some utility functions in hwcomposer.cpp that will be useful for hwc2. Move them into hwcutils.cpp so they can be used when hwcomposer.cpp is not compiled. Change-Id: I66a332e3e6afc4dc64217a528db50d5adbe02ef6 Signed-off-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Robert Foss <robert.foss@collabora.com>
2016-05-16drm_hwcomposer: Introduce Planner interfaceSean Paul
This patch introduces a new Planner interface to the platform specific code. This new interface will allow for platform-specific plane provisioning decisions to cover various hardware quirks. Each platform must provide a Planner with one or more PlanStage steps. These stages are run in order and are used to move the given layers onto composition planes. There are two generic stages provided by the platform: - Protected: Places layers on dedicated planes - Greedy: Provisions as many layers to planes and sticks the rest in precomp There is also one platform-specific stage included: - ProtectedRotated: Places any protected & rotated layer on the primary plane BUG=b/28117135 TEST=Tested on ryu with a variety of window layouts Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: Ib6062ab4779166753afaf122450bb63126bf9161
2016-05-10drm_hwcomposer: Move drmgeneric and nv importer cpp filesSean Paul
Final step in the platform renaming, move the drmgeneric and nvimporter files to their new place. BUG=b/28117135 TEST=compiles Change-Id: Ied60a82526f42f13a64192373cb49f3dfffef74f Signed-off-by: Sean Paul <seanpaul@chromium.org>
2016-03-24drm_hwcomposer: Add DrmEventListener workerSean Paul
This patch adds a worker which listens to drm events. If the drm event has a handler associated with it, the listener will call the handler. BUG=chrome-os-partner:41682 TEST=Tested on ryu with DP Change-Id: I5d691d191425604766a00be3e72111095d025d06 Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-11-13drm_hwcomposer: add AutoLock to automatically handle pthread_mutex_lockZach Reizner
For functions that need to hold locks and also handle errors, using AutoLock will make them much simpler and less prone to mutex handling errors. Change-Id: Ida6545850e89186c552e3d58b2973c14852494ad
2015-11-02drm_hwcomposer: fix spelling of "separate".Haixia Shi
It is spelled "separate", not "seperate". Change-Id: Id92d12aba42989a8a72e4596d425b2a9eea4e5ec
2015-10-07drm_hwcomposer: support virtual displaysHaixia Shi
Virtual display support is mandatory for HWC version 1.4. As a minimal implementation, we use frambuffer target and let SF take care of GLES composition. We still need to handle the acquire and release fences for both the virtual display and all layers in a separate worker thread. BUG=24609829 TEST=screen casting to chromecast Change-Id: Idb962f4b5bb852c9ec9ebcaa1679a653c01737fb
2015-08-07Revert "Revert "drm_hwcomposer: remove compositor interface""Zach Reizner
This reverts commit 1c5e55680d9165d8f9bb2bc6e2c4261574b5d41d.
2015-08-07Revert "Revert "drm_hwcomposer: remove GLCompositor and the GLWorker thread""Zach Reizner
This reverts commit d078e4cab78f81057cd25355199caba5a147342e.
2015-07-30Revert "drm_hwcomposer: remove GLCompositor and the GLWorker thread"Puneet Kumar
This reverts commit abebc7a78fe8a4df6495c8e5064719dc92b04004. For now until we figure out a more stable solution for SF/hwc Change-Id: I7a505fc67873f943704e8b48db4167b9beca7691
2015-07-22drm_hwcomposer: remove GLCompositor and the GLWorker threadZach Reizner
They are dead code now that DrmDisplayCompositor uses GL directly. Change-Id: Ie4beeab60440a51bd87486847b5453e20288d1d8
2015-07-13drm_hwcomposer: Split the drm compositor into per-display threadsSean Paul
This patch splits out the current single drm compositor with per-display compositors, each with their own thread. The per-display compositors are hidden behind a singleton drm compositor. This allows us to maintain a whole-world view of all displays involved in a frame. This becomes useful if we start switching up crtcs/encoders for the displays. This also allows us to issue one DrmComposition when the frame is being assembled. The single DrmComposition handles the plane allocation (since they might switch between displays), and contains per-display compositions which are used to store the layer->plane/crtc information for each frame. The display compositors use the per-display compositions to display the frame on their output. Each display compositor receives a shared pointer to the frame's DrmComposition on QueueComposition. As a result, both the composition, and the per-display compositions, live for as long as any one display is still using it. While this is sub-optimal (since a display might never update again), this is probably fine for now. Finally, splitting things up per-display will allow us to inject non-compositing jobs into the composite queue. An example would be turning the display off, or setting the mode. This ensures that all frames in the composite queue are displayed before the mode changes or the display is disabled. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: I8a233ea64710b238f70acbcde1f6d771e297b069
2015-07-08drm_hwcomposer: Add glworkerZach Reizner
The glworker allows signalling the fence synchronously once the GL work is done. It also helps performance by putting all GL in a separate thread, which avoids (costly on some GPUs) makecurrent. Change-Id: Ia4ee137df5c9a4b1afcf6180407371d6ba7f699a
2015-06-11drm_hwcomposer: integrate GLCompositor with hwcomposerZach Reizner
This patch makes it such that HWC will always composite all layers even if there are too few HW planes. Any layers that do not fit in a plane get rendered into a screen sized buffer by GLCompositor, the result of which uses up one of the available HW planes. Change-Id: Ibd560ae4c536632ac32d965152ceacd92bbba39f
2015-06-08drm_hwcomposer: Don't compile all importers at onceSean Paul
Choose based on the BoardConfig flags. I'd like to revert this once drm_gralloc is available in all working branches. Change-Id: I171d8f9146bdca0f0671092b8e539031c2f64f0f Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-06-04drm_hwcomposer: Move event worker into VSyncWorkerSean Paul
Using the new Worker interface, split out the event worker now that it just handles vsyncs. Change-Id: I7ebc6237b10411fdba3b8826935921b8c83c4b6c Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-06-04drm_hwcomposer: Use hw planes + drm atomic interfaceSean Paul
Replace the basic, single overlay, modeset/flip implementation with a new Compositor instantiation for drm. The new compositor uses the drm atomic interface to composite layers to multiple hardware planes. This change also introduces an importer argument in Compositor::CreateComposition. By specifying the importer, Compositor instances are responsible for cleaning up buffer objects submitted via Composition::AddLayer. Change-Id: Ic292829cd93475d754294b00428de132301092b2 Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-06-04drm_hwcomposer: Wrap the importers in a classSean Paul
This will allow us to move the importer functionality into the drmcompositor. Change-Id: I4274ebd1776c4d7879342c54a2b7c4095ebc50f4 Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-06-03drm_hwcomposer: Allow importer to be specified from BoardConfigTomasz Figa
Use BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER from BoardConfig to determine which importer to use. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: Ia081628830b78187ea1f8a3e3e4260188e130324
2015-05-13drm_hwcomposer: Add Worker class to abstract thread nastiesSean Paul
This will allow us to spin up threads more easily. Change-Id: I74add3d20ab14a61f3c646877a3ee17d0bd99ac4 Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-05-11Merge "drm_hwcomposer: Wrap libdrm ops (minus modeset/flip) in C++ classes" ↵Sean Paul
into mnc-dev
2015-05-11drm_hwcomposer: Wrap libdrm ops (minus modeset/flip) in C++ classesSean Paul
This allows us to compartmentalize a bunch of code/logic from hwcomposer.cpp into drm classes. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: Id3f912126f1fdcd44d32c3eb4fba646f77590278
2015-05-07Stop using stlport.Dan Albert
This was dead a long time ago. Bug: http://b/15193147 Change-Id: I9de3ad7fb14f987d36823e6fc4a60a33c92ddf4f (cherry picked from commit 59368c2ccea1b108a580cab11443ca9630658cb7)
2015-04-15drm_hwcomposer: Gate compilation on BOARD_USES_DRM_HWCOMPOSERSean Paul
To avoid compiling on unwanted platforms. Change-Id: Iec8122d32c25ea10fc68fa78e6e051e186ff0efb Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-04-10drm_hwcomposer: add compositor interface headerZach Reizner
Change-Id: I4b743e442e140f8fe5452fba3dd718995fe77b1b (cherry picked from commit af3c4ecc830bef9d538333d0bf200fed39ae3649)
2015-02-14drm_hwcomposer: Support Nvidia grallocLauri Peltonen
When using an Nvidia gralloc implementation, ask Nvidia gralloc to import the buffer_handle_t to the hwcomposer's drm device. Arguably, the code to perform the import would more naturally belong to drm_hwcomposer than Nvidia gralloc. But letting Nvidia gralloc do it has two advantages. First, drm_hwcomposer doesn't need to include vendor headers or link against vendor libraries. This means that it's easy to support both drm_gralloc and Nvidia gralloc from the same default build of drm_hwcomposer. Second, Nvidia gralloc will take care of properly setting up any vendor specific metadata (such as tiling parameters) of the imported GEM handle. Change-Id: I0f77fb301e7e0bff2a8cd7befeae4bc4892220ad Reviewed-on: https://chrome-internal-review.googlesource.com/195115 Reviewed-by: Stéphane Marchesin <marcheu@google.com> Commit-Queue: Stéphane Marchesin <marcheu@google.com> Tested-by: Stéphane Marchesin <marcheu@google.com>
2015-02-14drm_hwcomposer: Support other drm nodes than card0Lauri Peltonen
On dragon, card0 = Nouveau, card1 = TegraDRM. Change-Id: Ie69639e40162ceb4ab99025dd9406ae44b7204c8 Reviewed-on: https://chrome-internal-review.googlesource.com/196021 Reviewed-by: Stéphane Marchesin <marcheu@google.com> Commit-Queue: Stéphane Marchesin <marcheu@google.com> Tested-by: Stéphane Marchesin <marcheu@google.com>
2015-02-04drm_hwcomposer: Implement release and retire fences using sw_syncSean Paul
Once drm supports passing sync through, we'll move onto that. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: I78bd5d380212b4aaec4b41dcba6cc882f1e5cc20
2015-02-04drm_hwcomposer: Use queue buffer for pending setsSean Paul
Instead of just using a front and back buffer, use a queue buffer to allow more than one pending set. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: I451acbcb08fac5191b76ec2e372fe612d227167c
2015-02-04drm_hwcomposer: Split gralloc out into an importerSean Paul
Add the concept of an importer so we can plug in different sources of bo. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: I4f741ef4fa7c44e9cb31db61a146aed273854a69
2015-02-04drm_hwcomposer: Add a new set thread to post bo'sSean Paul
Adds a new set thread to wait on acquire fence, flip the bo, and wait for it to be presented on screen. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: Ia931a7cbe287f4c744068fc80e476f81880bf608
2015-02-04drm_hwcomposer: Initial implementationSean Paul
This adds a very basic hwcomposer implementation on top of libdrm. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: I472feb9bc08a4c4cd9849370c849d266ea58da9c