OSDN Git Service
Kalyan Kondapally [Mon, 12 Jun 2017 18:29:43 +0000 (11:29 -0700)]
Ensure we close all the gem handles.
We create gem handles in our side which need to be closed
when releasing buffer. This was not an issue on Linux as
minigbm takes care of it.
Jira: None.
Test: shmem doesn't grow when switching between apps on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Tapani Pälli [Mon, 12 Jun 2017 11:40:54 +0000 (14:40 +0300)]
fix compilation error when BOARD_USES_GRALLOC1 is set
Jira: None.
Test: Code compiles without errors on Android when
BOARD_USES_GRALLOC1 is set
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Poornima [Fri, 9 Jun 2017 10:35:39 +0000 (16:05 +0530)]
Android: Fix the cursor reorder issue
Sometimes cursor layer comes as the lowest zorder and we end up
assigning to the primary plane.
Made a change in PresentDisplay to handle the condition.
Jira: https://jira01.devtools.intel.com/browse/OAM-46186
Tests: Android boots up and issue is not see
Signed-off-by: N, Poornima Y <poornima.y.n@intel.com>
Kalyan Kondapally [Mon, 12 Jun 2017 01:27:47 +0000 (18:27 -0700)]
Cache composition results
If no layer attributes and buffer attributes have changed we can
just replay the last frame composition (i.e. ALl layers where
we falled back to 3D). In future we can finetune things based
on surface damage of each layer.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 12 Jun 2017 00:03:51 +0000 (17:03 -0700)]
Move attribute change calculations to HwcLayer.
Instead of calculating if attributes like display frame, src rect
changed every frame in OverlayLayer, lets detect any changes in
HwcLayer. This is also helps us detect the case where a layer was
re-created for some reason and will force us to invalidate the
cache in display queue. Buffer related checks are still done
in OverlayLayer.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 11 Jun 2017 22:25:41 +0000 (15:25 -0700)]
Add support for Visible Region.
For now we just use this to track if layer is visible or not.
In future we might use this to determine if previous composition
results can be reused.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 11 Jun 2017 21:50:15 +0000 (14:50 -0700)]
Store surfacedamage in vector.
This would ease up calculating damage rect, visible rect in coming up
patches.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 11 Jun 2017 05:18:10 +0000 (22:18 -0700)]
Ensure we dup all fences passed outside HWC.
This makes sure we can close our fences independent of the life
time of the client.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 11 Jun 2017 05:00:10 +0000 (22:00 -0700)]
Manage NativeFence passed to each plane in DisplayPlane.
We pass fence retrieved from 3D driver to kernel to ensure those
are signalled before scanning out the buffer for plane. We manage
these fences in NativeSurface and can close them if we need to
handle 3D composition for next frame. Lets dup the fence and
ensure it's open till the plane is updated next time.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 9 Jun 2017 23:21:01 +0000 (16:21 -0700)]
Initial support for Gralloc1.0
This is not enabled by default yet.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 9 Jun 2017 23:05:13 +0000 (16:05 -0700)]
Dont go through all layers when checking for cursor layer.
Currently, we go through all layers to figure out the cursor layer,
instead we could just use layer_begin and layer_end to detect
this as they should the current valid starting and end position.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 9 Jun 2017 22:14:51 +0000 (15:14 -0700)]
Rework handle lifetime.
We hold on to the handle passed by application which may be
deleted behind the scenes. Lets clone the handle in our side
and delete it when no more needed to ensure we always have
valid handle till we are using it.
Jira: None.
Test: Linux apps still work and no regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 4 Jun 2017 10:41:59 +0000 (03:41 -0700)]
Remove NativeFence and ScopedFD usage.
These are used only in OverlayLayer and HWCLayer. We could manage
the ownership of fd within these structs itself instead of having
to depend on NativeFence and ScopedFD. This is unnecessary
indirection and can be removed.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 3 Jun 2017 03:43:53 +0000 (20:43 -0700)]
Remove NativeSync.
We dont use this anymore.
Jira: None.
Test: Build passes on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 8 May 2017 01:30:47 +0000 (18:30 -0700)]
Use ScopedFD only if needed.
In GPUDevice, we open the fd in constructor and only close it
in destructor. Instead of using scopedfd we can manually manage
this.
Jira: None.
Tests: No regression on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 3 Jun 2017 03:41:35 +0000 (20:41 -0700)]
Use fence as expected by HWC2.0 specification.
From https://source.android.com/devices/graphics/implement-hwc:
"In HWC 2.0, release and retire fences are non-speculative.
A release or retire fence retrieved in frame N will signal
as soon as the content of the associated buffers replaces
the contents of the buffers from frame N - 1, or in other
words, the meaning of the fence is "the content of the buffer
you provided for frame N has now replaced the previous content."
This is non-speculative, since this fence should signal shortly
after presentDisplay is called as soon as the hardware presents
this frame's content."
This means we can just use NativeFence for layers also. We dont
have support to get native fence per plane to have per layer
granularity. This also means we can get rid of sw fences.
Jira: None.
Tests: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Tue, 30 May 2017 05:29:16 +0000 (22:29 -0700)]
REVERTME: Disable idle composition for now.
This patch disables composition to fall back to single plane when
system is idle instead of using multiple planes. We want to eventually
enable this but this is causing flicker and background disappears
which need to be investigated. However, with the changes we are able
to get rid of an extra thread and hence we can merge the remaining
bits now while fixing the remaining issues.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 28 May 2017 10:08:28 +0000 (03:08 -0700)]
Remove KMSFenceHandler.
We mainly relied on this to signal fences of buffers. Now, we can do this
in HandleIdleCase. Lets remove this as we can get rid of one extra
thread now.
Jira: None.
Test: No regressions on Linux and Android.
Kalyan Kondapally [Sun, 28 May 2017 08:14:12 +0000 (01:14 -0700)]
Fall back to single plane composition in Idle case.
There is no need to continue using different planes for composition
in case the system is not really updating any new content. We now
track this and if we haven't updated content for the previous three
vblanks, we fall back to single plane composition for the current
content on screen.
Jira: None.
Test: Power consumption is minimum in idle case scenarious.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Yugang [Fri, 26 May 2017 16:06:00 +0000 (00:06 +0800)]
Update bo map function for build support of gbm or mingbm.
Mesa gbm has no plane parameter defined, so add build option
for mesa gbm.
Jira: None.
Tests: Build and run testlayers normally with or without mingbm.
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Kalyan Kondapally [Sun, 28 May 2017 23:15:35 +0000 (16:15 -0700)]
Call glFinish when explicit fence support is disabled.
When Explicit fence support is disabled, we need to ensure
all rendering is flushed before flip.
Jira: None.
Test: No rendering artifacts on Android with explicit fence disabled.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 28 May 2017 23:12:11 +0000 (16:12 -0700)]
Remove eglmakecurrent during initialization.
There is no need to make current here as context will be made current
during draw.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 28 May 2017 07:18:12 +0000 (00:18 -0700)]
Move VBlankEventHandler to DisplayQueue.
This helps in followup patches which enable support for handling
composition during Idletime.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kedar [Mon, 8 May 2017 05:04:25 +0000 (10:34 +0530)]
Enabling HWC standalone test for Android
Jira: None.
Test: Able to compile tests on Android.
Signed-off-by: Kedar <kedar.j.karanje@intel.com>
Signed-off-by: Yogesh <yogesh.marathe@intel.com>
Yugang [Mon, 22 May 2017 10:15:36 +0000 (18:15 +0800)]
Move color correction auto tests to testlayers as a manual test.
Deleted igt test lib as the manual test no need compare the CRCs.
Jira: None.
Tests: Run testlayers with tests/jsonconfigs/colorcorrection.json,
the disolays will show solid Red, Green and Blue rectangles.
Users can update the gamma value to show different levels of
gradient RGB colors.
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Kalyan Kondapally [Tue, 23 May 2017 16:38:19 +0000 (09:38 -0700)]
Fix build.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 8 May 2017 03:27:42 +0000 (20:27 -0700)]
Fix error when initializing virtual display.
SurfaceFlinger expects SetActiveConfig to pass but we returned
false here.
Jira: None.
Test: Dont see any HWC failures when initializing Virtual Display.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Yugang [Wed, 17 May 2017 17:00:03 +0000 (01:00 +0800)]
Add Travis CI support with packaged depends.
Only build HWC and use Travis docker to build and collect headers
and libs, then Travis will install the headers and libs to CI system,
and do HWC config and build. travisci/travisci.md also hosts the steps
about how to build and collect headers and libs.
Jira: None.
Tests: Enable Travis CI for the branch and check if can process build
for new commmits.
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Zhongmin Wu [Mon, 15 May 2017 00:58:15 +0000 (08:58 +0800)]
Enable Systrace for Android platform
For Android platform, we can make CTRACE output the
atrace logs which can be shown in systrace.
Jira: None.
Test: No impact on Linux and Android.
Signed-off-by: Zhongmin Wu <zhongmin.wu@intel.com>
Kalyan Kondapally [Sat, 6 May 2017 06:55:32 +0000 (23:55 -0700)]
Use NativeBufferHandler for allocating buffers in Tests.
This is first step to get tests working on Android.
Jira: None.
Tests: Build passes on Linux and no new regressions.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 7 May 2017 01:00:31 +0000 (18:00 -0700)]
Use int32_t instead of 64 bit for OUT_FENCE_PTR.
OUT_FENCE_PTR was changed to int32_t with this patch:
https://patchwork.kernel.org/patch/
9515719/
Jira: None.
Tests: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 6 May 2017 06:02:10 +0000 (23:02 -0700)]
Tests: Removed unused code.
Jira: None.
Tests: Build passes on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 8 May 2017 02:55:01 +0000 (19:55 -0700)]
Revert "HWC: Add spinlock for scopedfd"
Caused performance drop and doesn't seem to be needed
with latest code.
This reverts commit
d54cb7e43d34df5b8ca29d827ab3238e9c7fc747.
Shobhit Kumar [Wed, 22 Mar 2017 08:34:20 +0000 (14:04 +0530)]
Enable HWC as a shared library instead of static library
use ./configure --prefix==$WLD
make
make install
This will install all HWC related headers and shared library in the
default path ($WLD) for use. Alternative for testing you can also do
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./libs if you run test from HWC
base folder
Jira: None
Test: Build and test installtion. All headers and library should be
installed as per above instructions.
testlayers -j jsonconfigs/kmscube1layer.json should work
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Shobhit Kumar [Wed, 22 Mar 2017 05:06:43 +0000 (10:36 +0530)]
Update Makefile.am to install public header files as well
These can then be included in target application code
Jira: None
Test: make install should install headers in prefix header path
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Shobhit Kumar [Fri, 5 May 2017 08:03:30 +0000 (13:33 +0530)]
Disable build for color autotests if building with gbm
This fixes build break when --enable-gbm is used introduced by following
patch -
commit
7f8ab5f7f0e25757aae3237ce1a535a29cb1c810
Author: Yugang, Fan <yugang.fan@intel.com>
Date: Wed Mar 29 00:52:23 2017 +0800
Add color correction tests to check gamma color remap
Jira: None
Test: Do build with GBM using ./configure --enable-gbm
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Kalyan Kondapally [Sat, 6 May 2017 05:45:06 +0000 (22:45 -0700)]
Linux: Remove unused test app.
Jira: None.
Tests: Build passes on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 28 Apr 2017 08:28:08 +0000 (01:28 -0700)]
Parital Revert of SurfaceDamage.
We failed to take into account alpha changes of layers here.
Instead of reverting the whole commit, disabling this optimization
for now.
Jira: IAHWC-51.
Tests: No regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 28 Apr 2017 04:01:07 +0000 (21:01 -0700)]
Fix ownership of ImportedBuffer in NativeSurface.
OverlayLayer takes ownership of the buffer when ImportedBuffer
assigned to a particular layer. However, we where still tracking
ImportedBuffer in NativeSurface and deleting it. This caused
double deletion issues.
Jira:IAHWC-70
Tests: Linux test multiplelayersnovideo_powermode doesn't crash.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Pallavi G [Sun, 23 Apr 2017 09:59:53 +0000 (02:59 -0700)]
Add surface damage support
Added the basic support to avoid complete validation
if the given layers are same as previous one.
Jira: IAHWC-51
Test: No regressions with Linux app and Android.
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Tapani Pälli [Tue, 25 Apr 2017 10:00:57 +0000 (13:00 +0300)]
Support DRM_FORMAT_YVU420_ANDROID enum
Support minigbm specific format by switching it to standard
one when importing image.
Jira: None.
Test: Working video playback after minigbm rebase.
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Kalyan Kondapally [Tue, 25 Apr 2017 06:03:01 +0000 (23:03 -0700)]
Release surfaces before disabling pipe in DisplayQueue.
We release all surfaces in DisplayPlaneManager once pipe is
disabled. In DisplayQueue however, we where trying to SetInUse
flag to false after disabling the pipe. Instead, just clear
the in_flight_surfaces before disabling the pipe in
HandleExit Call.
Jira: None.
Test: No crash after resuming system from Doze mode.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Ragha Khandenahally [Fri, 21 Apr 2017 00:43:43 +0000 (17:43 -0700)]
Add null pointer check
Broadcast RGB properties are not defined for DSI display panel
Jira: AIA-109.
Test: MIPI DSI panel works.
Signed-off-by: Ragha Khandenahally <Ragha.Khandenahally@intel.com>
Mingwei Wang [Tue, 25 Apr 2017 01:11:36 +0000 (09:11 +0800)]
Add support to toggle Explicit Sync support runtime.
Jira: None
Test: pass test with AndroidIA and Android Things
Signed-off-by: Mingwei Wang <mingwei.wang@intel.com>
Aravindan M [Fri, 21 Apr 2017 10:21:55 +0000 (15:51 +0530)]
Hot plug event handler modified to reduce cycles consumed
HotPlugEventHandler is in runtime path for all usecases and hence matters for performance.
Moved memset and fd query out of the loop
Reduced buffer size to 256
Test:Device boots to home screen
Perf bench marks with AIA
Result: Improves performance.
Signed-off-by: Aravindan M <aravindan.muthukumar@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Kalyan Kondapally [Mon, 24 Apr 2017 08:02:57 +0000 (01:02 -0700)]
Dont call Compositor related APIS when not falling back to 3D.
These API's dont need to be called when we are not falling back
to 3D composition.
Jira: None.
Test: No regressions on Android and Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 24 Apr 2017 07:18:37 +0000 (00:18 -0700)]
Decrease lock wait time in KmsFenceHandler.
Instead of holding the lock in HandleRoutine, we can make a copy
of the data and release the lock. This ensures we dont wait
unnecesarily in WaitFence.
Jira: None.
Test: Enable Function call trace and check time spent in WaitFence
and EnsureReadyForNextFrame has decreased.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 23 Apr 2017 20:23:34 +0000 (13:23 -0700)]
Remove DISABLE_EXPLICIT_SYNC usage.
Instead lets make this a run time decision, we try to use
Explicit sync support only if OUT_FENCE_PTR is supported.
Jira: None.
Tests: No regressions on Linux and Android.
Kalyan Kondapally [Sun, 23 Apr 2017 19:35:14 +0000 (12:35 -0700)]
Remove usage of DISABLE_OVERLAY_USAGE.
Instead lets make this a run time decision, we try to use
Overlays only if OUT_FENCE_PTR is supported.
Jira: None.
Tests: No regressions on Android and Linux.
Kalyan Kondapally [Sun, 23 Apr 2017 19:19:37 +0000 (12:19 -0700)]
Cleanup: Remove unused API.
Jira: None.
Tests: Build passes on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 23 Apr 2017 05:34:35 +0000 (22:34 -0700)]
UnRegister Buffers in DisplayQueue.
We unregister buffers in KmsFenceHandler Thread, forcing lock to be
held in overlay manager for every API call. Instead, lets release
these buffers by calling DisplayQueue as we can have much finer
control on when we are calling APIS associated with BufferManager
here and remove all the locks in OverlayBufferManager.
Jira: None.
Tests: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 23 Apr 2017 04:45:19 +0000 (21:45 -0700)]
Check for OUT_FENCE_PTR support during runtime.
Explicit sync support contains two parts:
1) 3D driver support
2) KMS support.
With this patch we let kms property support queried during run
time rather than having it enabled/disabled by a build option.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 23 Apr 2017 04:37:49 +0000 (21:37 -0700)]
Move ValidateCachedLayers to DisplayQueue.
Simplifies logic in DisplayPlaneManager, now we either query for
cached layers or ask display plane manager to validate layers
based on the initial result.
Jira: None.
Tests: No regressions on Android and Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 23 Apr 2017 03:48:02 +0000 (20:48 -0700)]
Track if layer has changed over frames within OverlayLayer.
Currently, we check in displayplanemanager if layer attributes
have changed over frames and decide if we can use previous frame
test results. We move all these calculations into overlaylayer
itself and provide API to query if layer attributes, position has
changed compared to previous frame. This helps optimize these
checks when surface damage support is added and also move building
retrieving cached layers from planemanager to display queue in
follow up patch.
Jira: None.
Tests: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 21 Apr 2017 16:06:57 +0000 (09:06 -0700)]
Reset inflight surfaces appropriately.
When HandleExit is called we should reset state of everything we
keep a track of in DisplayQueue. We missed resetting the state of
in_flight_surfaces_. This patch fixes it.
Jira: None.
Test: No regressions with apps on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Pallavi G [Fri, 21 Apr 2017 10:30:10 +0000 (16:00 +0530)]
Avoid virtual display error prints
In android we dont compose the virtual display output all the
layers are marked as client and surafceflinger does the composition.
so just return from present display call otherwise we end up with
unnecessary error logs
Jira: None
Test: Able to dump the screenrecord output
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Kalyan Kondapally [Thu, 20 Apr 2017 06:43:16 +0000 (23:43 -0700)]
Let native surface track its buffer.
Currently, these are tracked by overlaybuffermanager. However, we
dont ever delete these buffers till NativeSurface is destroyed.
Also, this would reduce the look ups everytime a buffer needs
to be destroyed/refcounted.
Jira: None.
Tests: No regressions with Linux test apps and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Thu, 20 Apr 2017 03:41:45 +0000 (20:41 -0700)]
Squash BeginFrameUpdate into CommitFrame.
We where basically setting cursor/Overlay plane to be disabled
in BeginFrameUpdate and nothing else. This can be handled as
part of commit instead of having a separate call.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Harish Krupo [Thu, 20 Apr 2017 08:14:32 +0000 (13:44 +0530)]
The string comparision must check for zero for equality.
Jira: AIA-386
Tests: Board boots to home screen.
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Signed-off-by: Yogesh Marathe <yogesh.marathe@intel.com>
Terry Heo [Wed, 19 Apr 2017 06:38:00 +0000 (15:38 +0900)]
Do not build PIC code for Android
The recent Android platform doesn't allow to have text relocations.
https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md#Text-Relocations-Enforced-for-API-level-23
To comply the rule, removed "-fPIC, -fPIE" options.
Also added LOG_TAG definition to show module name on Android logcat.
Bug:
37487613
Change-Id: Id5278b2e131d2a635546595ef38f154c238f7c9d
Kalyan Kondapally [Thu, 20 Apr 2017 01:53:44 +0000 (18:53 -0700)]
Remove wait for each layer used for 3D Composition.
In this case, We already pass aquire fence to the kernel which
should ensure all 3D jobs related to the nativesurface are handled
before it's scanned out. Let's remove this extra waits here and
handle it in kernel side.
Jira: IAHWC-69
Tests: No tearing on Linux/Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Harish Krupo [Wed, 19 Apr 2017 17:54:56 +0000 (23:24 +0530)]
Store size of the static buffer in a variable
As the buffer is statically allocated, store the size in a variable.
Also, doing a strlen after memset would always return 0. This also fixes the
over heating issue addressed in the below jira.
Jira: IAHWC-69
Tests: Board should boot to home screen and in idle state temperature should
be between 40 to 50 degrees. check /sys/class/thermal/thermal_zone0/temp for
cpu temperature
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Pallavi G [Wed, 12 Apr 2017 09:52:54 +0000 (15:22 +0530)]
Modified the nativesurface handling
Added the release of the nativesurface as part of the display queue.
Jira: None
Test: Android is booting fine and did basic sanity of opening & switching
mutiple apps
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Kalyan Kondapally [Mon, 17 Apr 2017 14:33:04 +0000 (07:33 -0700)]
Use Poll in EnsureReadyForNextFrame.
Currently, we check if we are able to acquire lock in this
function and use that to ensure kms_fence has been signalled.
This consumes cpu cycles, instead of that we now use poll on
kms_fence fd from previous commit also here and wait for it
to be signalled before going ahead with a new commit.
Jira: None.
Test: No regressions on Android and Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 17 Apr 2017 14:07:00 +0000 (07:07 -0700)]
Remove "DOUBLE_BUFFERED" option.
Seems un-necessary with latest code base.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 17 Apr 2017 13:54:11 +0000 (06:54 -0700)]
Rename PageFlipEventHandler as VblankEventHandler.
This missed out in commit
f79b6ea.
Jira: None.
Test: Build passes.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 17 Apr 2017 13:29:53 +0000 (06:29 -0700)]
Remove SignalBuffersIfReady.
This simplifies buffer tracking and ensuring that we dont have a
case where signal might already be signalled for a buffer. This
also ensures we dont accidently write to a buffer while it might
still be reading from it.
Jira: None.
Test: No regressions in benchmarks.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 17 Apr 2017 12:44:38 +0000 (05:44 -0700)]
Mark pointers const.
This is to ensure we dont change the memory location pointed to
accidently or manipulate the data when we shouldn't.
Jira: None.
Test: No regressions on Android and Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 17 Apr 2017 11:37:00 +0000 (04:37 -0700)]
Cleanup: Remove unused API.
Jira: None.
Test: Builds on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Pallavi G [Fri, 7 Apr 2017 05:22:30 +0000 (10:52 +0530)]
Fix for the blank shade behind the cursor
Pushed the cursor plane to the end of the composition planes
submitted for the flip solved the issue.
Regression introduced by the cursor plane 3d fallback fix
Jira: IAHWC-67
Tests: No Shade observed during mouse movement on Android
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Randy Xu [Wed, 5 Apr 2017 03:48:43 +0000 (11:48 +0800)]
HWC: Add spinlock for scopedfd
The fence fd will be accessed/udpated by surfaceflinger main and
binder thread, and race condition may cause binder sessin crash
Test: run 3d gles and vulkan app without tearing
JIRA: https://01.org/jira/browse/AIA-332
Signed-off-by: Randy Xu <randy.xu@intel.com>
Pallavi G [Wed, 5 Apr 2017 10:10:52 +0000 (15:40 +0530)]
Revert "Add surface damage support"
with the HWcursor fix the surfacedamge is not working.
Hang in the Animation itself. Need to debug
This reverts commit
3323f07aa3d70c5bd2910a3fbcbd59e8a17127ce.
Pallavi G [Mon, 6 Mar 2017 10:06:16 +0000 (15:36 +0530)]
Add surface damage support
Added the basic support to avoid the complete validate and present
if the given layers are same as previous one.
Jira: IAHWC-51
Test: No regressions with Linux app and on Android
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Pallavi G [Tue, 4 Apr 2017 03:01:53 +0000 (08:31 +0530)]
Fix the cursor handling if the HW cursor is not working
Cursor is not positioned correctly when we fall back to the
3D composition fixed it by moving the cursor as a normal layer
and also handle like rest of input layers.
Now cursor can be assigned to overlay plane or 3D composition based
on the available input layers which will avoid unnecessary composition
due to cursor change every time.
Jira: AIA-334/IAHWC-64
Test: Now cursor and navigation bar is visible as expected in most of the apps
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Yugang, Fan [Fri, 31 Mar 2017 09:44:53 +0000 (17:44 +0800)]
Update parameter type of gamma to float.
Fixed wrong parameter type of gamma even though it isn't impact
the test.
JIRA: IAHWC-55
Test: Build and run colorcorrection_autotest, it can get "PASSED"
result as before.
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Yugang, Fan [Fri, 31 Mar 2017 09:41:38 +0000 (17:41 +0800)]
Add color correction and broadcast rgb test to layers test app.
Moved test parameters of color correction APIs, broadcast rgb API
and power mode APIs to json file. test parameters of color correction
APIs, broadcast rgb API and power mode APIs will use initialized value
if the json doesn't include those parameters.
For new way to enable power mode test (Previously it was passing "-p"),
using "power_mode" key in json file to accept "on/off/doze/dozesuspend",
e.g. tests/jsonconfigs/powermode.json
Updated the original layerfromjson.cpp/.h to jsonhandlers.cpp/.h for
common using.
Updated and formated the json files for testing.
JIRA: IAHWC-55
Test: Build hwc and update the parameters of the json to check if the
test app testlayers runs normally and effect shows normally
following the parameters. No different with old json for old tests.
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Pallavi G [Fri, 31 Mar 2017 08:09:12 +0000 (13:39 +0530)]
Build fix with display dump enable
Jira: None
Test: Build Passed with Display dump enable
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Kevin Strasser [Wed, 29 Mar 2017 15:41:58 +0000 (08:41 -0700)]
vk: Free vk objects after use
It is the application's responsibility to track the lifetime of all the
objects that are allocated through Vulkan and explicitly destroy them before
their handles are lost.
These changes are needed to satisfy that requirement:
* Rework the image import api so we can keep a reference to the image
memory.
* Hoist all local handles to class member variables so they can be
tracked, and subsequently destroyed in the destructor.
* Make sure to clean up local allocations in the Draw() path.
These changes are especially important as we do a fair bit of object
creation on a per-frame basis, consistantly leaking memory.
Jira: IAHWC-40
Test: Run demo apps for several minutes and monitor memory consumption
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Kevin Strasser [Wed, 29 Mar 2017 16:57:31 +0000 (09:57 -0700)]
vk: Disable explicit sync
There doesn't seem to be any way of handling the native fence object with
the current Vulkan API. This results in the test apps hitting a
`gpu_fence_fd != -1` assertion after creating too many unhandled fence
objects. For now disable explicit sync when using the Vulkan backend.
Jira: IAHWC-40
Test: Run demo app for a minute and make sure it doesn't hit an assert
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Kalyan Kondapally [Thu, 30 Mar 2017 03:38:41 +0000 (20:38 -0700)]
Fix warnings on Android.
Jira: None.
Test: No warnings like "unused parameter" seen on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Thu, 30 Mar 2017 03:31:35 +0000 (20:31 -0700)]
Build fix.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Yugang, Fan [Tue, 28 Mar 2017 16:52:23 +0000 (00:52 +0800)]
Add color correction tests to check gamma color remap
Reused igt test kms_pipe_color/test_pipe_gamma source and check if
HWC gamma value 0 can remap gradient colors to solid. Build and run
colorcorrection_autotest binary, check if the test can print "PASSED".
JIRA: IAHWC-55
Test: build the colorcorrection_autotest successfully and run it, the
test will compare crc value of each display pipe which show solid
colors and each display pipe which show gradient colors with
gamma value 0 remapping (after remapping, the gradient will
become to solid), and print "PASSED" if test result is
successful).
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Yugang, Fan [Tue, 28 Mar 2017 16:51:32 +0000 (00:51 +0800)]
Add color correction relevant APIs.
Added three APIs for gamma, contrast and brightness to hwc display for
color correction. The gamma API accepts float value for RGB colors,
contrast and brightness APIs accept 0 ~ 255 unsigned int value, and
bigger value with stronger contrast/brightness.
Added one APIs for DRM boardcast rgb range setting, e.g. change default
"Automatic" to "Full" so that color correction gamma API can remap
gradient colors to solid color.
Added display pipe API for color correction test using which need get
crc value for each connected pipe.
Jira: IAHWC-55
Test: call color correction APIs when show colors in display in HWC
display class to check if the display hardware change the effect
on orignial colors. and some video card need set boardcast rgb to
"Full" to remap colors to 0~255 before calling color correction.
And call display API to check if the pipe number is correct.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Signed-off-by: Fan Yugang <yugang.fan@intel.com>
Johnson Lin [Mon, 27 Mar 2017 06:03:46 +0000 (14:03 +0800)]
Tests: Initialize all variables correctly.
JIRA: IAHWC-58
Tests: Build passes and no regressions on Linux.
Signed-off-by: Johnson Lin <johnson.lin@intel.com>
Bruce Beare [Sun, 26 Mar 2017 23:55:46 +0000 (16:55 -0700)]
Allow the minigbm project to be relocated in the tree
Jira: None.
Test: Build passes on Android.
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Kalyan Kondapally [Sun, 26 Mar 2017 23:21:09 +0000 (16:21 -0700)]
Make static analyzers happy.
Add checks and throw error messages as applicable.
We are still left with 7 issues mostly in tests which will be
handled in followup patches.
Jira: None.
Test: No regressions on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Mar 2017 21:29:40 +0000 (14:29 -0700)]
Add support to handle both Double Buffered & Triple buffered cases.
Different platforms can choose either to use double buffering or
triple buffering. HWC can signal buffers earlier in triple buffering
case while need to signal the fences bit later in double buffering
case. This makes a significant difference to the performance, lets
make this a build option instead of assuming either of cases being
used by the platform.
Jira: IAHWC-46
Test: No visible tearing with apps on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Mar 2017 11:26:03 +0000 (04:26 -0700)]
Add support for retire_fence.
Jira: None.
Test: No regressions in Android and Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Mar 2017 04:41:15 +0000 (21:41 -0700)]
Add OverlayBufferManager.
We need to track life time of OverlayBuffer in various cases:
1) Ensure its available until the buffer is scanned out and
is being displayed on screen.
2) Ensure its not destroyed if it's going to be re-used.
We dont have a central tracking place for all this which is
making it hard to ensure the buffers are alive. This patch
adds OverlayBufferManager which is responsible for creating
the buffers and deleting them when it's not in use.
Jira: IAHWC-46
Test: No visible tearing with apps on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Mar 2017 06:23:18 +0000 (23:23 -0700)]
Unify Hot plug logic on Linux and Android.
We currently have two different patch which is un-necessayr, lets
unify it.
Jira: AIA-170
Test: Hot plug events are working on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 25 Mar 2017 23:10:07 +0000 (16:10 -0700)]
Replace all printf with ETRACE under common/
This should ensure we get the logs printed on Android too.
Jira: IAHWC-40
Test: Build passes.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kevin Strasser [Fri, 24 Mar 2017 13:36:02 +0000 (06:36 -0700)]
vk: Make each VKSurface track its own fb
Only 1 framebuffer is being created as it's being tracked at global scope.
Add a member field to VKSurface so each instance has its own fb, and then
assign it to the global target during MakeCurrent().
While we're at it, remove dst_image_ and dst_image_view_ from global scope,
as they are only ever used inside vksurface.
Jira: IAHWC-40
Test: Try demo apps and check that there is no flickering
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Wayne Boyer [Thu, 16 Mar 2017 00:35:34 +0000 (17:35 -0700)]
ChromeOS: fix include path for drm_fourcc.h
In common/display/displayplanemanager.cpp and
tests/common/videolayerrenderer.cpp the drm_fourcc.h header file
is #included. In the ChromeOS build environment, that file has
a different path. Therefore, change the path to fix the build.
This change is similar to the one in
217b2bc7ec4e6000e81b7b9ea15d9bb3e17aab8c
JIRA: None
Test: Build succeedes on Linux & ChromeOS
Signed-off-by: Wayne Boyer <wayne.boyer@intel.com>
Kevin Strasser [Fri, 24 Mar 2017 11:11:17 +0000 (04:11 -0700)]
vk: Define missing Renderer overrides
Since commit
78a230016b RestoreState() and MakeCurrent() are required to be
redefined in classes inheriting from Renderer. There doesn't appear to be
anything needed from Vulkan for these calls, so for now add noop overrides
to make the build green again.
Jira: IAHWC-40
Test: Vulkan backend compiles
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Poornima [Thu, 23 Mar 2017 05:07:59 +0000 (10:37 +0530)]
Format check in the getclienttargetsupport API
Querying whether the client target format can be supported by
device.
Jira: https://01.org/jira/browse/IAHWC-12
Test: No regression observed on Android.
Signed-off-by: Poornima <poornima.y.n@intel.com>
Kalyan Kondapally [Fri, 24 Mar 2017 07:49:01 +0000 (00:49 -0700)]
Remove fd from our tracking list when Thread is killed.
We didnt remove the event fd when Thread was killed, causing
these warnings.
Jira: None.
Test: No error messages like "fd is already in the list" seen
when running apps on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 24 Mar 2017 06:58:24 +0000 (23:58 -0700)]
Rename pageflipeventhandler to vblankeventhandler.
Lets name this appropriately as that's what it does.
Jira: None.
Test: Build passes on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Shobhit Kumar [Fri, 10 Mar 2017 14:34:15 +0000 (20:04 +0530)]
Add support to use either of GBM or Mini GBM as needed
This only supports single planar formats yet for GBM and only enabled
gllayerrenderer over GBM. If we enable GBM support VideoLayer Renderer
and ImageLayer renderer are not available right now.
use --enable-gbm while running autogen.sh or configure.
We need to also build mesa with GBM enabled
Jira: IAHWC-53
Test: Test KMS Cube test application works without any crash.
Signed-off-by: Shobhit Kumar <shobhit.kumar@intel.com>
Kalyan Kondapally [Thu, 23 Mar 2017 02:37:51 +0000 (19:37 -0700)]
Wait on kms fence in a separate thread.
This ensures we are able to release buffers on time
and in DisplayQueue, we can still process next frame while
we are waiting the current frame to be on screen. We dont
have DisplayQueue as a separate thread anymore which will
simplify things for tracking surface damage, release fence
etc in followup patches.
Jira: IAHWC-46
Test: No visible tearing with apps on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Wed, 22 Mar 2017 05:34:03 +0000 (22:34 -0700)]
Release fences early for layers using 3D composition.
Currently, we hold on to fences of layer which we dont scanout
but composite to another buffer for over a frame. This is
un-necessary as we will not be reading from these buffers
once we sample from them. Lets release these fences early.
Jira: IAHWC-36
Test: No tearing seen with multilayer demo on Linux or on
Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>