OSDN Git Service
John Stultz [Wed, 11 Jul 2018 18:28:40 +0000 (11:28 -0700)]
drm_hwcomposer: Drop -Wno-unused-* build options and remove unused variables
This patch drops the -Wno-unused-* build options and removes
the currently unused variables that would keep things from
building.
Signed-off-by: John Stultz <john.stultz@linaro.org>
John Stultz [Fri, 6 Jul 2018 17:34:42 +0000 (10:34 -0700)]
drm_hwcomposer: Really fail on CreateComposition failures
The current logic in Validate assumes that if CreateComposition()
fails, it was due to overlay planes as sets the avail_planes to 1.
With most multi-plane compositions, this will then cause the
avil_planes to be later decremented to zero (to reserve the client
composited plane), resulting in all the layers to be set as
client composited.
However, in the case where there is only one layer, such as with
the Android BootAnimation, if CreateComposition fails, we set
avail_planes to one, and since there is only one layer, we don't
decrement it further, resulting in the layer to be validated as
a Device rendered layer, as if CreateComposition succeeded.
This adds an extra flag we don't mix up a single layer failure
as a success.
On HiKey/HiKey960, this patch fixes the issue where the
BootAnimation wouldn't display.
Change-Id: I58bf5f332667a46e8e997d1743b73dd4a768657f
Signed-off-by: John Stultz <john.stultz@linaro.org>
John Stultz [Thu, 24 May 2018 23:43:35 +0000 (16:43 -0700)]
drm_hwcomposer: Avoid filling the log with warnings when test compositions fail
We frequently test compositions that might fail due to various
reasons. On db820 we see:
W HwcComposer: command 0x4010000 generated error 8
E hwc-drm-display-compositor: Alpha is not supported on plane 29
E hwc-drm-two: Failed to apply the frame composition ret=-22
over and over
So to avoid filling the log with errors when those test
compsitions don't work out, this patch tries to quiet down those
error messages when we are doing test compositions.
Change-Id: Iab19628bd7488c7d104e2c775310989bb59e140d
Signed-off-by: John Stultz <john.stultz@linaro.org>
John Stultz [Fri, 1 Jun 2018 00:37:21 +0000 (17:37 -0700)]
drm_hwcomposer: platformhisi: Add support for importing DRM_FORMAT_YVU420 buffers
When trying to play fullscreen video, I started seeing import
errors, which were caused by us trying to call drmModeAddFB2()
with fmt DRM_FORMAT_YVU420 but only setting the a single set of
handle/pitch/offset values.
In the kernel, the framebuffer_check() function would then fail
with "no buffer object handle for plane 1" since we only passed
one plane in.
Thus this patch calculates and sets the pitch/offset values for
the separate planes in the single gem_handle buffer.
Many thanks to Stefan Schake and Rob Herring for helping me
understand some of the subtleties of image plans vs display
planes, etc.
Change-Id: I2d9bdfc66c504e6446a4f9c6287ab675201afa30
Signed-off-by: John Stultz <john.stultz@linaro.org>
John Stultz [Fri, 1 Jun 2018 00:46:50 +0000 (17:46 -0700)]
drm_hwcomposer: platformdrmgeneric: Handle closing gem_handles if we have duplicate handles
In some cases some multi-plane bo's may have multiple
gem_handles/offsets/pitches set. And its possible to have
multiple planes that use the same gem_handle with different
offsets/pitches.
Thus, when closing the gem_handles, if we're not careful
we could close the same handle multiple times. So this
patch avoids this by taking some old code from the nv
importer:
https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/blob/
aeccd89eaafec467cb9449cce5c64152a240c138/platformnv.cpp#L176
Many thanks to Stefan Schake for pointing me to that code.
Change-Id: Ifecd0f95de5ada5280a0af807005d0b0186a068c
Signed-off-by: John Stultz <john.stultz@linaro.org>
Alexandru Gheorghe [Wed, 13 Jun 2018 15:46:36 +0000 (16:46 +0100)]
drm_hwcomposer: Set client composition buffer at the bottom.
Currently, we allocate layers to device composition from bottom to
top and save the last DrmPlane from the top to be used by the client
target buffer.
However, we don't know much about client layer, so information for
layers which we decided to set as ClientComposition, will be lost.
For example, in BlendMode case if we have the following scene, with 2
DrmPlanes available.
z0: LAYER0 AR24 BlendNone.
z1: LAYER1 AR24 BlendPremulti.
z2: LAYER2 AR24 BlendPremulti.
We decide:
z0: LAYER0 DeviceComposition
z1: LAYER1 ClientComposition
z2: LAYER2 ClientComposition
LAYER1+LAYER2 will be in client target buffer, but we don't know
nothing about the blending for client_target_layer. Which Android
actually expects to be still BlendPremulti. So, we are kind of stucked
we the default value which is BlendNone.
I think there are two ways to solve this issue:
1) This commit, allocate layers as DeviceComposition
from top to bottom and save the bottom for ClientComposition.
2) A smarter logic for detecting what should be the actual properties
of client_layer_target, but I still think it makes more sense to
actually have the client_layer_target at the bottom.
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Rob Herring [Thu, 17 May 2018 19:33:02 +0000 (14:33 -0500)]
drm_hwcomposer: Support assigning planes in ValidateDisplay
In order to assign planes to layers in ValidateDisplay, testing
compositing with a DRM atomic modeset test is needed as PresentDisplay
is too late. This means most of PresentDisplay needs to be run from
ValidateDisplay, so refactor PresentDisplay to a common function adding
a test only option.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Wed, 9 May 2018 20:18:36 +0000 (15:18 -0500)]
drm_hwcomposer: remove separate_rects
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>
Rob Herring [Fri, 4 May 2018 21:34:19 +0000 (16:34 -0500)]
drm_hwcomposer: Remove GL compositing support
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>
Rob Herring [Thu, 3 May 2018 19:38:49 +0000 (14:38 -0500)]
Revert "drm_hwcomposer: Cleanup gl precompositor init and provide uses_GL flag"
This reverts commit
3b0c69d3477d3601b1dbcb75fdd748254e297e7e.
Rob Herring [Thu, 3 May 2018 19:38:46 +0000 (14:38 -0500)]
Revert "drm_hwcomposer: Fall back to client compositon if the gl precompostior fails"
This reverts commit
acc4dcf1787b9fc43c5748ce06e79f045e07a3ff.
John Stultz [Tue, 29 May 2018 23:50:23 +0000 (16:50 -0700)]
drm_hwcomposer: Try to fix clang-format pipeline
The clang-format pipeline generates false negatives
sometimes, with:
$ git diff -U0 --no-color master...HEAD | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch
fatal: ambiguous argument 'master...HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
as seen here:
https://gitlab.freedesktop.org/john.stultz/drm-hwcomposer/-/jobs/932
This tries to address the issue by explictly fetching
freedesktop/master and referencing FETHC_HEAD instead of master
which doesn't always exist.
Change-Id: I7a07d412eae164841427da90dfc7298697c5e783
Reviewed-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Andrii Chepurnyi [Thu, 17 May 2018 15:34:01 +0000 (18:34 +0300)]
drm_hwcomposer: Remove gralloc from generic code
Clean up direct gralloc usage from generic code.
Because of gralloc0/gralloc1 difference, it should
be only used by platform* part.
Signed-off-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
Andrii Chepurnyi [Tue, 20 Mar 2018 17:41:18 +0000 (19:41 +0200)]
drm_hwcomposer: Use GraphicBufferMapper for copy buffer handle
Due to gralloc0/gralloc1 API incompatibility(register/unregister
vs retain/release) it is preferred to use generic
GraphicBufferMapper API for copy buffer handle. It will use
an appropriate adapter for the present version of gralloc.
For the reference: hardware/interfaces/graphics/mapper
Change-Id: Ia4740ed3b2ffd43fa3c107eb22d792eaabd4df40
Signed-off-by: Andrii Chepurnyi <andrii_chepurnyi@epam.com>
Stefan Schake [Thu, 10 May 2018 00:03:36 +0000 (02:03 +0200)]
drm_hwcomposer: Ignore context in clang-format-diff
Signed-off-by: Stefan Schake <stschake@gmail.com>
Alexandru Gheorghe [Tue, 27 Mar 2018 13:09:17 +0000 (14:09 +0100)]
drm_hwcomposer: vsyncworker: Fix deadlock on exit path
vsyncworker::Routine assumes that when -EINTR is returned by
WaitForSignalOrExitLocked the lock as been released, which is not
true, so it hangs if a vsyncworker is never enabled and Exit is
called.
Fixed by releasing lock in vsynworker::Routine on all code paths.
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Stefan Schake [Sat, 5 May 2018 00:39:33 +0000 (02:39 +0200)]
drm_hwcomposer: Add pass/fail CI step for clang format-diff
Signed-off-by: Stefan Schake <stschake@gmail.com>
Sean Paul [Fri, 4 May 2018 20:18:21 +0000 (20:18 +0000)]
drm_hwcomposer: Add README.md
Although we had CONTRIBUTING.md, gitlab didn't really highlight it. So I tried putting this info in the wiki, but that was equally hard to discover. _then_ I thought gitlab pages was the right way to go, but no.
Turns out README.md will be harvested by gitlab and shown on the project's frontpage \o/
Signed-off-by: Sean Paul <seanpaul@chromium.org>
John Stultz [Fri, 4 May 2018 20:22:45 +0000 (13:22 -0700)]
drm_hwcomposer: Make sure we check for new 16bit alpha value
In commit
025d0a65 ("Use 16 bit value for plane alpha"),
the alpha value was bumped to a 16bit value.
Unfortunately in drmdisplaycompositor.cpp we are still
comparing it against a 8bit 0xff value, which now fails
causing the display to not start.
So fix this comparing to the 16bit 0xffff value.
With this change the display starts up again.
Change-Id: Ic796b16fb57ae7cea58b5c66c456a58e3fb57ba5
Signed-off-by: John Stultz <john.stultz@linaro.org>
Chih-Hung Hsieh [Tue, 21 Nov 2017 22:53:29 +0000 (14:53 -0800)]
drm_hwcomposer: Use -Werror in external/drm_hwcomposer
* 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>
Bill Yi [Tue, 13 Feb 2018 22:36:31 +0000 (14:36 -0800)]
drm_hwcomposer: License NOTICE file and metadata from AOSP
This is a forward ported patch from the AOSP/master
branch which adds the Apache2 license notice and
a empty MODULE_LICENCE_APACHE2 file.
I'm submitting these to try to align aosp/master
with upstream fdo/master
BUG:
67772237
Change-Id: I65396852e1b64d2052232b38740e6ede20e81776
Signed-off-by: John Stultz <john.stultz@linaro.org>
Stefan Schake [Fri, 4 May 2018 16:03:00 +0000 (18:03 +0200)]
drm_hwcomposer: Use 16 bit value for plane alpha
The upstream version of the alpha property uses 16 bits to make it future
proof. Since HWC2 already passes in a float expand our internal
representation instead of just shifting for DRM.
Signed-off-by: Stefan Schake <stschake@gmail.com>
Stefan Schake [Fri, 4 May 2018 16:00:42 +0000 (18:00 +0200)]
drm_hwcomposer: Remove unused init from HWC1 layer
The HWC1 code isn't being compiled anymore.
Signed-off-by: Stefan Schake <stschake@gmail.com>
Alistair Strachan [Wed, 2 May 2018 23:53:20 +0000 (16:53 -0700)]
drm_hwcomposer: Remove NVIDIA importer header
Commit
0f7487f drm_hwcomposer: remove NVIDIA importer removed most of
the implementation, but not the platformnv.h header file. Remove this
header now.
Cc: John Stultz <john.stultz@linaro.org>
Cc: Rob Herring <rob.herring@linaro.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: Robert Foss <robert.foss@collabora.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>
Alistair Strachan [Thu, 3 May 2018 00:01:49 +0000 (17:01 -0700)]
drm_hwcomposer: Add platform backend for minigbm
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>
Alistair Strachan [Wed, 2 May 2018 23:56:12 +0000 (16:56 -0700)]
drm_hwcomposer: Drop obsolete drm_gralloc include path
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>
Alistair Strachan [Wed, 2 May 2018 23:55:22 +0000 (16:55 -0700)]
drm_hwcomposer: Mark tests as vendor, fix build
After commit
94bb596, the tests for drm_hwcomposer no longer build,
because the build system detects that they are linking other vendor
modules (but installing themselves elsewhere).
This change also adds the libhardware include path explicitly, as the
implicit include of hardware/libhardware/include is going away.
Cc: John Stultz <john.stultz@linaro.org>
Cc: Rob Herring <rob.herring@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Sean Paul <seanpaul@google.com>
Cc: Robert Foss <robert.foss@collabora.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>
John Stultz [Thu, 26 Apr 2018 19:05:57 +0000 (12:05 -0700)]
drm_hwcomposer: Fall back to client compositon if the gl precompostior fails
If the gl precompositor isn't being used, we cannot accept
every layer as a device composited layer.
Thus this patch adds some extra logic in the validate function
to fall back to client side compositing if the gl precompositor
did not initialize properly.
This does force everything to a single plane even if we have
a few available, but a deeper rework of the validate step
planning is needed before we can reliably make use of them.
Credit to Rob Herring, who's single plane patch was what this
was originally based on.
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>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
John Stultz [Thu, 26 Apr 2018 19:05:56 +0000 (12:05 -0700)]
drm_hwcomposer: Cleanup gl precompositor init and provide uses_GL flag
The drm_hwcomposer has its own GL pre-compositor which is used
to squish layers when there are more layers then planes on the
display hardware. In many ways this duplicates the client-side
GL compositing that is done in SurfaceFlinger, but in theory can
be more highly optimized for the hardware.
Unfortunately, due to these optimizations, the drm_hwcomposer's
pre-compositor becomes somewhat hardware specific (originally
targeting nvidia hardware, I believe).
So on some hardware, the gl precompositor may not actually
initialize due to hardware missing features, or the hardware
supporting different shader APIs.
Rather then try to rework the drm_hwcomposers precompositor
to be more generic, I instead suggest that when the
precompositor fails to initialize, we simply fall back to the
already more widely compatible client compositor in
SurfaceFlinger.
Thus, this patch cleans up some of the precompositor
initialization, which didn't handle failures well.
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>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
John Stultz [Thu, 26 Apr 2018 19:05:55 +0000 (12:05 -0700)]
drm_hwcomposer: Use log/log.h instead of cutils/log.h
When enabling Treble, Android builds are complaining about using
cutils/log.h so instead use log/log.h
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: John Stultz <john.stultz@linaro.org>
Sumit Semwal [Thu, 26 Apr 2018 19:05:54 +0000 (12:05 -0700)]
drm_hwcomposer: Andorid.mk : Mark libdrmhwc_utils as vendor module
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>
Alexandru Gheorghe [Wed, 11 Apr 2018 15:22:14 +0000 (16:22 +0100)]
drm_hwcomposer: drmeventlistener: Set nl_pid to 0
By setting nl_pid to 0, we let the kernel to assign a port for us.
In the current implementation there is no way we could create more
than one instance for drmeventlistener.
Acked-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Alexandru Gheorghe [Wed, 11 Apr 2018 15:22:12 +0000 (16:22 +0100)]
drm_hwcomposer: vsyncworker: Fix uninitialized enabled_ field
Acked-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
John Stultz [Tue, 3 Apr 2018 03:57:21 +0000 (20:57 -0700)]
drm_hwcomposer: Rework platformdrmgeneric.cpp to use libdrm's gralloc handle
Rework the platformdrmgeneric buffer importer to use the libdrm
generic gralloc handle definition.
This is just to get the drm_hwcomposer project building in AOSP
along with the libdrm freedesktop/master branch. Similar changes
may also be needed to gbm_gralloc and other projects not used
in AOSP.
Mostly just sending this out for review feedback.
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Rob Herring <rob.herring@linaro.org>
Cc: Sean Paul <seanpaul@google.com>
Cc: Stefan Schake <stschake@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Thu, 22 Mar 2018 18:22:57 +0000 (18:22 +0000)]
Delete CONTRIBUTING, migrated information to the gitlab wiki
John Stultz [Tue, 13 Mar 2018 23:51:12 +0000 (16:51 -0700)]
drm_hwcomposer: Add platformhisi buffer importer for hikey and hikey960
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>
Rhys Kidd [Mon, 26 Feb 2018 06:18:54 +0000 (01:18 -0500)]
drm_hwcomposer: Enable and refactor Separate Rects test
Plumb through the existing test based on known sample data for the
Separate Rect algorithm via Android's NATIVE_TEST harness.
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Rhys Kidd [Mon, 26 Feb 2018 06:17:42 +0000 (01:17 -0500)]
drm_hwcomposer: Fix comment on worker_test
Reflect the boolean logic of the accompanying code, which is run after
Worker.InitWorker() has completed in test setup.
Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Rob Herring [Mon, 12 Feb 2018 22:03:35 +0000 (16:03 -0600)]
drm_hwcomposer: fix check for valid fence fd for in fences
The check for a valid fence fd is inverted, so we're failing to pass
IN_FENCE_FD's to the kernel when we have a valid fence.
Reported-by: Alexandru-Cosmin Gheorghe <Alexandru-Cosmin.Gheorghe@arm.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
John Stultz [Tue, 23 Jan 2018 23:16:36 +0000 (15:16 -0800)]
drm_hwcomposer: Make sure we set the active state when doing modesets
In trying to use drm_hwcomposer with HiKey/HiKey960 boards, I
found that the crtc wouldn't intitalize and the atomic commit
calls were failing.
I initially chased this down to following check in the kernel
drm_atomic_crtc_check() function failing:
if (state->event && !state->active && !crtc->state->active) {
DRM_DEBUG_ATOMIC("[CRTC:%d:%s] requesting event but off\n",
crtc->base.id, crtc->name);
return -EINVAL;
}
Where because a fence was submitted state->event was set, but
the crtc state was not active. This results in the atomic commit
to fail and no mode to be set.
After hacking around this in the kernel, Sean Paul helped me
understand that it was the kernel complaining about the crtc
state being provided in the atomic commit which did not have the
active flag set.
Thus, the proper fix is to make sure when we do the modesetting
that we also set the crtc state active flag in property set.
With this change, the kernel no longer rejects the atomic commit
and the crtc initializes properly.
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>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Mauro Rossi [Fri, 5 Jan 2018 23:59:59 +0000 (00:59 +0100)]
drm_hwcomposer: Update external connectors list
DVID, DVII and VGA are required by discrete and integrated GPUs.
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Rob Herring [Wed, 29 Nov 2017 16:19:57 +0000 (10:19 -0600)]
drm_hwcomposer: fix warnings on unused variables and parameters
AOSP master now builds by default with -Werror, so fix all the warnings.
All the warnings are related to unused variables and parameters.
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Robert Foss [Wed, 1 Nov 2017 17:50:04 +0000 (12:50 -0500)]
drm_hwcomposer: Add HDMI connector as a valid type
Accept DRM_MODE_CONNECTOR_HDMIA connector type.
Look for primary DrmConnector amongst external connectors
after looking for primary amongst internal ones first.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Wed, 1 Nov 2017 16:21:48 +0000 (11:21 -0500)]
drm_hwcomposer: correct handling of DRM_MODE_ROTATE_0
If the rotation property is supported for a plane, then the rotation
value must be non-zero. For the case of 0 degree rotation,
DRM_MODE_ROTATE_0 needs to be set.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Wed, 25 Oct 2017 00:06:43 +0000 (19:06 -0500)]
drm_hwcomposer: remove unnecessary external includes
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>
Adrian Salido [Mon, 2 Oct 2017 18:31:27 +0000 (11:31 -0700)]
drm_hwcomposer: make sure primary plane is allocated for squash
There are instances where the primary plane may have been disabled, look
through disabled planes as well to find primary plane to use for squash.
Signed-off-by: Adrian Salido <salidoa@google.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Rob Herring [Fri, 9 Jun 2017 20:15:55 +0000 (15:15 -0500)]
drm_hwcomposer: fix return values for ValidateDisplay
According to the API documentation, if we've set num_types, then the
return value should be HWC2::Error::HasChanges.
Signed-off-by: Rob Herring <robh@kernel.org>
Rob Herring [Fri, 6 Oct 2017 22:02:03 +0000 (17:02 -0500)]
drm_hwcomposer: remove NVIDIA importer
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>
Rob Herring [Fri, 6 Oct 2017 22:20:05 +0000 (17:20 -0500)]
platformdrmgeneric: get the gralloc usage directly from the handle
There's no point in using a gralloc perform() op to retrieve the usage as
it is already stored in the handle like width, height, format, etc. So just
copy it to the hwc_drm_bo_t and get it directly.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Tested-by: Robert Foss <robert.foss@collabora.com>
Rob Herring [Fri, 6 Oct 2017 21:46:48 +0000 (16:46 -0500)]
drm_hwcomposer: use upstream DRM_MODE_{ROTATE, REFLECT} defines
The DRM_REFLECT_* and DRM_ROTATE_* defines were not upstream, but now
they are. Convert to using the upstream version which are defined as a
bit mask rather than a bit position.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Tue, 28 Feb 2017 18:17:34 +0000 (13:17 -0500)]
drm_hwcomposer: Remove threading
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>
Robert Foss [Wed, 27 Sep 2017 17:28:15 +0000 (19:28 +0200)]
drm_hwcomposer: Add out-fence support
Add support for out-fences through the OUT_FENCE_PTR property.
Out-fences signal when their associated buffer may be read by a device.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Robert Foss [Thu, 20 Oct 2016 15:07:57 +0000 (11:07 -0400)]
drm_hwcomposer: Add crtc() fetcher to DrmResources
This is a fetcher for getting the vector of DrmCrtc objects
in DrmResources.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Robert Foss [Thu, 20 Oct 2016 14:14:43 +0000 (10:14 -0400)]
drm_hwcomposer: Add FENCE_OUT_PTR property to DrmCrtc
Add support for handling the FENCE_OUT_PTR property to DrmCrtc
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Robert Foss [Wed, 19 Oct 2016 14:46:22 +0000 (10:46 -0400)]
drm_hwcomposer: Submit in-fence to DRM
Add support for in-fences through the IN_FENCE_FD property. In-fences signal
when their associated buffer may be read by DRM/KMS.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Robert Foss [Fri, 30 Sep 2016 14:27:23 +0000 (10:27 -0400)]
drm_hwcomposer: Add support for IN_FENCE_FD property to DrmPlane
Add support for the IN_FENCE_FD property to DrmPlane.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Rob Herring [Fri, 15 Sep 2017 13:48:55 +0000 (08:48 -0500)]
drm_hwcomposer: move library to /vendor
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>
Robert Foss [Fri, 22 Sep 2017 00:35:07 +0000 (02:35 +0200)]
drm_hwcomposer: Add CONTRIBUTING file
Some basic guidelines for contributions could come in handy.
These are copied from IGT and modified to be suitable.
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Adrian Salido [Thu, 21 Sep 2017 23:53:48 +0000 (16:53 -0700)]
drm_hwcomposer: reorder source layers according to zorder
Precomp layers may be added to the back at different points which may
cause elements to be unsorted. Make sure that these are sorted after
provisioning planes to ensure right composition based on zorder.
Signed-off-by: Adrian Salido <salidoa@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Thu, 21 Sep 2017 21:46:11 +0000 (14:46 -0700)]
drm_hwcomposer: Remove OWNERS
Where we're going, we don't need no stickin' OWNERS.
Now that drm_hwcomposer is hosted on fdo, we're going to support the
de-centralised committer model.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Adrian Salido [Fri, 1 Sep 2017 20:22:17 +0000 (13:22 -0700)]
drm_hwcomposer: fix typo in formats switch statement
Change-Id: I71e116fff098860a2aecf587298e7696d4bef012
Adrian Salido [Tue, 29 Aug 2017 20:28:18 +0000 (13:28 -0700)]
drm_hwcomposer: enumerate additional formats for tegra downscale limits
There are additional formats that can be provided and are not handled.
Bug:
36731060
Change-Id: I9f1356762df71e38402ad01f96a650adf2a3cbdc
Signed-off-by: Adrian Salido <salidoa@google.com>
Adrian Salido [Tue, 22 Aug 2017 00:07:18 +0000 (17:07 -0700)]
drm_hwcomposer: skip layers with non-premult blending
Tegra driver assumes that all layers with alpha component have premult
alpha. This can cause issues if blending is different since the alpha
component is supposed to be ignored in that case.
Fixes:
62401826
Test: share location in hangouts and drag around map
Change-Id: Iff870697f7efbf5d075a5925d63a8f0f672ee725
Signed-off-by: Adrian Salido <salidoa@google.com>
Adrian Salido [Tue, 18 Jul 2017 00:58:50 +0000 (17:58 -0700)]
drm_hwcomposer: add checks for tegra hardware limitation
Current approach is to allow atomic_check figure out any issues with
composition strategy and fallback to squash if there the atomic_check
fails. This leads to issues when there's a protected content as it
cannot be handled in squash.
Adding a new provisioning stage to check for hardware limitations and
address them early so a proper fall back can be in place.
Bug:
36731060
Change-Id: I6482953044bcea9c9a655f28672927b32ac57097
Sean Paul [Fri, 12 May 2017 18:07:07 +0000 (14:07 -0400)]
drm_hwcomposer: Add Marissa and remove Haixia
Adding Marissa to OWNERS to get her listed on reviews.
While I'm in here, remove Haixia from OWNERS.
Change-Id: I6e07a686796c1d0cf3539be9bbdfc2b46dfb9938
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Thu, 4 May 2017 18:03:11 +0000 (18:03 +0000)]
Merge "drm_hwcomposer: Add support for GetColorModes & SetCursorPosition"
Adrian Salido [Tue, 25 Apr 2017 20:23:45 +0000 (13:23 -0700)]
drm_hwcomposer: avoid potential race condition between worker init and exit
Protect worker initialization and exit with lock in case Exit is called
in different thread.
Change-Id: Ibddfce192deeea9d33575de8abf859fdca5f74ed
Signed-off-by: Adrian Salido <salidoa@google.com>
Adrian Salido [Thu, 16 Feb 2017 18:29:46 +0000 (10:29 -0800)]
drm_hwcomposer: refactor Worker
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
Kalyan Kondapally [Thu, 10 Nov 2016 18:59:50 +0000 (10:59 -0800)]
drm_hwcomposer: Add support for GetColorModes & SetCursorPosition
For now we just return HAL_COLOR_MODE_NATIVE and store cursor
position.
BUG=None.
TEST=None.
Change-Id: Id6a7e157dbd9fc41fc53c0e33a6eb523632b9b7a
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Sean Paul [Thu, 10 Mar 2016 21:00:26 +0000 (16:00 -0500)]
drm_hwcomposer: Partially implement HWC2 API
Implement the HWC2 API for drm_hwcomposer. There are still
a few TODOs sprinkled around, the biggest of which is virtual
display support.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ib3d48dabce1941b341d5a966d767baab8db1db10
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Thu, 10 Mar 2016 20:35:40 +0000 (15:35 -0500)]
drm_hwcomposer: Initial stub HWC2
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>
Rob Clark [Wed, 19 Oct 2016 14:48:14 +0000 (10:48 -0400)]
drm_hwcomposer: Move eglCreateImageKHR into Importer
Since NV has a "special" nonstandard way to get an EGLImage from a
handle, move this into Importer where the other NV specialness is
abstracted. For the platformdrmgeneric case, use the dmabuf EGL
Extension.
Change-Id: I5353f4c95f55174df55ba92931cdc9a9eab80dca
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Wed, 12 Apr 2017 16:40:51 +0000 (16:40 +0000)]
Merge "drm_hwcomposer: Move some utilities out of hwcomposer.cpp"
Sean Paul [Wed, 12 Apr 2017 16:40:33 +0000 (16:40 +0000)]
Merge "drm_hwcomposer: Remove source_damage from DrmHwcLayer"
Sean Paul [Wed, 12 Apr 2017 16:40:18 +0000 (16:40 +0000)]
Merge "drm_hwcomposer: Break out of sync_wait loop on success"
Sean Paul [Wed, 12 Apr 2017 16:40:00 +0000 (16:40 +0000)]
Merge "drm_hwcomposer: Harvest min/max resolutions from drm"
Sean Paul [Wed, 12 Apr 2017 16:39:43 +0000 (16:39 +0000)]
Merge "drm_hwcomposer: Don't pass hwc_procs_t to VsyncWorker"
Sean Paul [Wed, 12 Apr 2017 16:38:32 +0000 (16:38 +0000)]
Merge "drm_hwcomposer: Clean up error conditions"
Adrian Salido [Tue, 11 Apr 2017 04:44:21 +0000 (21:44 -0700)]
drm_hwcomposer: fix pre comp regions during protected playback
During protected video playback an issue could happen when there are layers
below the protected video surface. The current logic in protected plane
provisioning logic includes all layers below the protected layer in precomp
plane in order to draw holes in these. However, when there are other layers in
place, in particular one that has blending (ex. PREMULT). For example:
Layers: count=3
[0] blending[a=255]=NONE display_frame[x/y/w/h]=0/125/2560/1438
[1] protected blending[a=255]=NONE display_frame[x/y/w/h]=0/181/2560/1438
[2] blending[a=255]=PREMULT display_frame[x/y/w/h]=0/0/2560/1800
Planes: count=3
[0] plane=17 type=LAYER source_layer=1
[1] plane=22 type=LAYER source_layer=2
[2] plane=23 type=PRECOMP source_layer=0
Squash Regions: count=0
Pre-Comp Regions: count=0
In this case, layer[0] is below protected surface (layer[1]). This causes
issues because precomp plane is setup to be on the highest z-order all the
time, and any time it isn't it expects any layers with higher z-order will
obscure some contents of the precomp layer. But in this case the layer on top
(layer[2]) has blending enabled (PREMULT) and is transparent so expectation is
that layer[0] is also rendered and blended with layer[2].
By merging any layer that is of higher z-order (layer[2] in example) to precomp
plane, all these layers can be handled during pre composition.
Bug:
36879178
Change-Id: I9b63b37fef0ae828c4a781e0d1da264d8a3d7a76
Daniel Stone [Fri, 7 Apr 2017 14:37:48 +0000 (15:37 +0100)]
drm_hwcomposer: Use correct DRM event context version
Explicitly declare which DRM event context version we want to use,
rather than just the latest one libdrm supports. New versions may change
semantics, or extend the structure, in ways we're unaware of.
Stick with version 2, which is the version that introduced
page_flip_handler.
Change-Id: I71e33f787b2b724596f8289d95311730f7aff8ff
Signed-off-by: Daniel Stone <daniels@collabora.com>
Sean Paul [Thu, 10 Mar 2016 20:35:13 +0000 (15:35 -0500)]
drm_hwcomposer: Move some utilities out of hwcomposer.cpp
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>
Sean Paul [Thu, 10 Mar 2016 20:20:41 +0000 (15:20 -0500)]
drm_hwcomposer: Remove source_damage from DrmHwcLayer
We don't use it, so get rid of it.
Change-Id: I63fc6bd06c0bfd4e7ad8315856e8f2372133624e
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Thu, 10 Mar 2016 20:18:42 +0000 (15:18 -0500)]
drm_hwcomposer: Break out of sync_wait loop on success
Don't call sync_wait kAcquireWaitTries times if it returns successfully.
Change-Id: Iebdc2229966bfce4aaf35a07ef59aef405e301c6
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Wed, 10 Feb 2016 23:35:17 +0000 (15:35 -0800)]
drm_hwcomposer: Harvest min/max resolutions from drm
Store the minimum and maximum resolutions from drm in DrmResources
BUG=None
TEST=None
Change-Id: I21b9a3fc5f220585295733cc754fe0f6df0abae9
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Wed, 10 Feb 2016 18:00:08 +0000 (10:00 -0800)]
drm_hwcomposer: Don't pass hwc_procs_t to VsyncWorker
Introduce a new class to limit the hwc_procs_t callback
structure scope to hwcomposer.cpp
Change-Id: I68ec62e7947ca87702b3d6d0169ae850cfbf5d85
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Sean Paul [Tue, 28 Feb 2017 18:25:26 +0000 (13:25 -0500)]
drm_hwcomposer: Clean up error conditions
Clean up error checking for some failure cases.
BUG=None
TEST=Tested on Qemu+drm_hwcomposer
Change-Id: I98bca1aef09060b5a023375dce564252a6073b96
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Robert Foss [Mon, 20 Feb 2017 16:43:48 +0000 (11:43 -0500)]
drm_hwcomposer: Add missing assert.h include
drm_hwcomposer fails to compile on aosp/master due to
assert.h not being included.
This patch fixes this issue.
BUG=None
TEST=make
Change-Id: Icb5d5d8a33c9898a5aefa00c1bdbf29965de62a7
Signed-off-by: Robert Foss <robert.foss@collabora.com>
Adrian Salido [Fri, 21 Oct 2016 02:35:55 +0000 (19:35 -0700)]
drm_hwcomposer: fix type size check for separate rects
Bug:
32218819
Change-Id: Ic8f2c5d078a5ee9a48862a8e8faca051f199b78e
Signed-off-by: Adrian Salido <salidoa@google.com>
Sean Paul [Thu, 23 Jun 2016 03:26:29 +0000 (23:26 -0400)]
drm_hwcomposer: Count all layers with content in SquashFrame
SquashFrame previously didn't run if there was only one overlay
layer in the layer stack. This would cause false failures when
the incoming composition was composed of one or more layers with
a precomposition or squash layer.
To fix this, count all layers which are not disabled, and only
skip squashing if there is just one content layer.
BUG=b/
29122961
TEST=Tested on smaug with vertical multi-window YouTube
Change-Id: Icb175b7701928136730442a39c4717a780d34cfd
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Thu, 23 Jun 2016 02:48:22 +0000 (22:48 -0400)]
drm_hwcomposer: On error, free active composition
If we drop a frame while compositing, free the active composition.
Assume a frame pipeline of A->B->A. If we drop frame B, it will become
the active composition, which means the fences for A will not be released,
causing us to block A on A --> DEADLOCK.
BUG=b/
29122961
TEST=Tested on smaug, no longer hangs
Change-Id: I98817bb361f1d0669395ddac5d96cf4f19d4b26a
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Thu, 12 May 2016 18:28:05 +0000 (14:28 -0400)]
drm_hwcomposer: Use Planner interface to provision planes
Use the new Planner interface to handle the layer->plane mapping.
This allows us to simplify the Plan() function by offloading the
plane provisioning to the platform specific code.
BUG=b/
28117135
TEST=Tested on ryu with a variety of window layouts/workloads
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I75a0c5d87a9096e7a83ecbc848c75fee42ee1131
Sean Paul [Tue, 10 May 2016 08:19:24 +0000 (04:19 -0400)]
drm_hwcomposer: Introduce Planner interface
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
Sean Paul [Tue, 3 May 2016 23:40:59 +0000 (16:40 -0700)]
drm_hwcomposer: Don't use Plan() in SquashAll
Simplify the SquashAll() function by generating the composition
without using Plan(). This allows us to specify exactly what we
want on the screen without involving the normal plane provisioning
code.
BUG=b/
28117135
TEST=Tested on ryu, squashing still works
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ieec9c323941e2a80252b33d14563c4d218d38dfb
Sean Paul [Tue, 10 May 2016 08:17:31 +0000 (04:17 -0400)]
drm_hwcomposer: Move SeparateLayers into a member function
Instead of passing a bunch of member data to a static function, make
SeparateLayers a member of DrmDisplayComposition. This will be simplified
further once the Planner interface is implemented.
BUG=b/
28117135
TEST=Tested on ryu
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ia4e15aa20b6dc14b044ee1dec7b5fce514278be7
Sean Paul [Wed, 11 May 2016 20:57:26 +0000 (16:57 -0400)]
drm_hwcomposer: Move DrmCompositionPlaneType into DrmCompositionPlane
Now that DrmCompositionPlane is classified, move the type into it
as a subclass.
BUG=b/
28117135
TEST=Tested on ryu
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I774f477e75b3a2e2916c5d98931730dac46d3877
Sean Paul [Wed, 11 May 2016 20:29:45 +0000 (16:29 -0400)]
drm_hwcomposer: Use a vector for composition source_layers
Instead of a 1:1 mapping of layer:plane, use a vector to store
source layers for a composition plane. This will allow us to
represent squash compositions more easily by adding all source
layers to the vector.
This should also facilitate hardware which allows multiple fbs per plane.
BUG=b/
28117135
TEST=Tested on ryu
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I5d4bfc6e9da022eaab047f948cc874d6a8a25746
Sean Paul [Wed, 11 May 2016 17:50:28 +0000 (13:50 -0400)]
drm_hwcomposer: Add type to DrmCompositionPlane
Instead of encoding the plane/composition type in source_layer,
move it to its own explicit type. This will allow us to expand
source_layer to include more than one layer.
BUG=b/
28117135
TEST=compiles and runs on smaug
Change-Id: I19b1ed8e395347bbefb0fb6a0ab02d6ac0e5c1c1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Wed, 11 May 2016 17:49:38 +0000 (13:49 -0400)]
drm_hwcomposer: Fix up some printf warnings and a clang-style nit
BUG=None
TEST=Compiles
Change-Id: Ie95aad60b225784c36d411ec16a34ff32ea8acc6
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Tue, 10 May 2016 08:08:10 +0000 (04:08 -0400)]
drm_hwcomposer: Update platform log tags
So they now say "platform" instead of "importer"
BUG=b/
28117135
TEST=None
Change-Id: I7fe6bc7d31ca448ef561d78f7806fa487eb612f6
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Fri, 22 Apr 2016 13:11:09 +0000 (09:11 -0400)]
drm_hwcomposer: Move drmgeneric and nv importer cpp files
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>