Age | Commit message (Collapse) | Author |
|
As part of removing GL compositing, separate_rects.cpp is no long
needed. Use hwc_rect_t and hwc_frect_t in places instead of our own
class.
Signed-off-by: Rob Herring <robh@kernel.org>
|
|
The GL based compositing adds alot of complexity and was only ever well
tested on closed stacks. It also only supports GLES3.x and still relies
on sw_sync timeline which is now a debugfs feature. Those are just the
known issues.
Removing the GL compositor means everything related to squashing layers
and pre-compositing can be removed. The planner is left as it may be
useful when adding back support for overlay planes. With this change,
only a single plane is supported until ValidateDisplay learns to do
atomic modesetting test for overlay planes.
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
|
|
* Suppress non-critical warnings.
I'm submitting this patch to try to align aosp/master
with the upstream fdo/master branch.
Bug: 66996870
Change-Id: I48e87526e408980c90e8a45e134f95da7a89a19d
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
|
This adds support for the chromiumos (not AOSP) version of minigbm. Like
hisi, the gralloc handle is not the same as the common libdrm handle
(just yet), so we do need a separate backend for now.
Tested with a pending change to the 'cuttlefish' android virtual device
in AOSP with its custom gralloc switched to minigbm.
Cc: John Stultz <john.stultz@linaro.org>
Cc: Rob Herring <rob.herring@linaro.org>
Cc: Sean Paul <seanpaul@google.com>
Cc: Greg Hartman <ghartman@google.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
|
|
In commit d12274d, "drm_hwcomposer: Rework platformdrmgeneric.cpp
to use libdrm's gralloc handle", the use of drm_gralloc was removed.
Cc: John Stultz <john.stultz@linaro.org>
Cc: Rob Herring <rob.herring@linaro.org>
Cc: Sean Paul <seanpaul@google.com>
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Stefan Schake <stschake@gmail.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
|
|
To allow drm_hwcomposer to build with Treble, set
the libdrmhwc_utils library as a vendor module.
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>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
[jstultz: commit message tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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
|
|
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>
|
|
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>
|
|
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
|
|
It is spelled "separate", not "seperate".
Change-Id: Id92d12aba42989a8a72e4596d425b2a9eea4e5ec
|
|
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
|
|
This reverts commit 1c5e55680d9165d8f9bb2bc6e2c4261574b5d41d.
|
|
This reverts commit d078e4cab78f81057cd25355199caba5a147342e.
|
|
This reverts commit abebc7a78fe8a4df6495c8e5064719dc92b04004.
For now until we figure out a more stable solution for SF/hwc
Change-Id: I7a505fc67873f943704e8b48db4167b9beca7691
|
|
They are dead code now that DrmDisplayCompositor uses GL directly.
Change-Id: Ie4beeab60440a51bd87486847b5453e20288d1d8
|
|
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
|
|
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
|
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
This will allow us to move the importer functionality into the
drmcompositor.
Change-Id: I4274ebd1776c4d7879342c54a2b7c4095ebc50f4
Signed-off-by: Sean Paul <seanpaul@chromium.org>
|
|
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
|
|
This will allow us to spin up threads more easily.
Change-Id: I74add3d20ab14a61f3c646877a3ee17d0bd99ac4
Signed-off-by: Sean Paul <seanpaul@chromium.org>
|
|
into mnc-dev
|
|
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
|
|
This was dead a long time ago.
Bug: http://b/15193147
Change-Id: I9de3ad7fb14f987d36823e6fc4a60a33c92ddf4f
(cherry picked from commit 59368c2ccea1b108a580cab11443ca9630658cb7)
|
|
To avoid compiling on unwanted platforms.
Change-Id: Iec8122d32c25ea10fc68fa78e6e051e186ff0efb
Signed-off-by: Sean Paul <seanpaul@chromium.org>
|
|
Change-Id: I4b743e442e140f8fe5452fba3dd718995fe77b1b
(cherry picked from commit af3c4ecc830bef9d538333d0bf200fed39ae3649)
|
|
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>
|
|
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>
|
|
Once drm supports passing sync through, we'll move onto that.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I78bd5d380212b4aaec4b41dcba6cc882f1e5cc20
|
|
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
|
|
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
|
|
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
|
|
This adds a very basic hwcomposer implementation on top of
libdrm.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I472feb9bc08a4c4cd9849370c849d266ea58da9c
|