OSDN Git Service
Kalyan Kondapally [Mon, 18 Dec 2017 11:58:00 +0000 (03:58 -0800)]
UpdateCaps & Param only when they have really changed.
Jira: None.
Test: No new regressions when playing Video.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 15 Dec 2017 23:23:12 +0000 (15:23 -0800)]
Recycle vasurface.
This will be similar to what we do with 3D Backend. One vasurface
which backs up the native surface.
Jira: None.
Test: No new regressions with Video on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 18 Dec 2017 05:35:50 +0000 (21:35 -0800)]
Clip Viewport to DisplayFrame bounds when not using Scalar.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 18 Dec 2017 03:02:50 +0000 (19:02 -0800)]
Ensure we flip surfaces when source rect has changed.
Jira: None.
Test: No flicker seen with layers using scalars.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 18 Dec 2017 01:44:30 +0000 (17:44 -0800)]
No need to pass clear_surface to draw call.
We already have NativeSurface pointer here which should
have all the information we need.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 21:34:21 +0000 (13:34 -0800)]
Ensure we reset video buffer in case of layers > 1.
We always try to find a separate plane for Video. However, we
can be constrained by no of planes and in this case blend
layers for the last available plane. In this case we should
ensure we are resetting buffer to something which our
3DCompositor can write into.
Jira: None.
Test: No regressions found with cursor layer when using Logical
Display.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 11:02:35 +0000 (03:02 -0800)]
Fix plane scaling issues with 3D backend.
We didn't track source rect properly in case the plane was
not using scalar. This caused rendering artifacts.
Jira: None.
Test: Don't see content scaled incorrectly in home screen.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 09:32:36 +0000 (01:32 -0800)]
Simplify cursor layer tracking in DisplayQueue.
Jira: None.
Test: We dont re-validate layers when cursor layer is added
or removed on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 06:21:14 +0000 (22:21 -0800)]
Remove HasLayerAttributesChanged in Overlaylayer.
This is not used anymore.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 06:13:49 +0000 (22:13 -0800)]
Revalidate layers when rects change and using scalar.
When using plane scalar, we need to ensure when either
display frame or source rect change the commit can still pass.
Instead of doing full validation, we first do a test commit to
check if the combination is still valid. If the test commit
fails than we fall back to full validation of layers.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 04:26:28 +0000 (20:26 -0800)]
Take DisplayScalar usage into account in Renderstate.
In this case we should use source rect for display frame
too.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 02:10:27 +0000 (18:10 -0800)]
Keep track of src rect.
We need this information to determine when we need to
do a test commit in case we are using plane scalars for
scaling content of a layer.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 17 Dec 2017 00:54:47 +0000 (16:54 -0800)]
Add support to copy common displayplanestates between frames.
We now need to copy source rect, display frame, cursor state,
plane scalar state. Let's have a handy function which can do all
this rather than manually setting them in Display Queue.
Jira: None.
Test: No new regressions in Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 16 Dec 2017 23:57:56 +0000 (15:57 -0800)]
Add support for using PlaneScalar for Video.
We can fall back to use our compositor for video layer
for various reasons i.e. Not supported format, video effects
etc. In this case if display frame and source crop are not
same, we scale it today using our Compositor. This patch
adds support to use Plane Scalars as much as possible(when upscaling)
and fall back to current solution in case Display cannot
support it or we need to downscale.
Jira: None.
Test: Check that Video layer is scaled when playing full screen
and source rect is smaller than display resolution.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Xiaosong Wei [Wed, 20 Dec 2017 07:40:28 +0000 (15:40 +0800)]
Fix float value read/write in IControls
Fix the float value read/write in Parcel for IControls
Jira: None
Test: SetColorParam works as expected.
Change-Id: I94625eccc2d001b0ff5d4fe237df7f4f46e8f273
Tracked-On:
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Xiaosong Wei [Fri, 15 Dec 2017 07:37:19 +0000 (15:37 +0800)]
Don't create VA context for each drawing
vaCreateContext takes long time to initialize video driver
so we don't create the context in each drawing.
Jira: OAM-54014
Test: Build passes on both Android & Linux and video playback works
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Kalyan Kondapally [Sat, 16 Dec 2017 04:02:33 +0000 (20:02 -0800)]
No need to copy rects.
We are not changing the rect in any way here.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 16 Dec 2017 03:32:15 +0000 (19:32 -0800)]
Fix error code in RegisterCallback.
If it's not a valid callback registration, we should
return HWC2::Error::BadParameter.
Jira: None.
Test: Related tests in frameworks/native/services/surfaceflinger/tests/hwc2 should pass.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Wang,Fei [Tue, 12 Dec 2017 02:13:21 +0000 (10:13 +0800)]
Add color balance(Hue, Saturation, Brightness, Contrast) adjustment on VA module.
Jira: None.
Test: Build passes on Linux and Android.
Signed-off-by: Wang,Fei <fei.w.wang@intel.com>
Pallavi G [Fri, 15 Dec 2017 06:19:17 +0000 (11:49 +0530)]
Fix for external display hot plug/unplug
with current code the nested display is also having the display id of 0
and we are wrongly notifying the plug/unplug of the external display to
the primary display.
Looke like the nested display support is not completed,
So just moved the nested display hotplug notification under the
NESTED_DISPLAY_SUPPORT flag which is not defined
Jira: None
Test: External display Hot plug and unplug works fine
Signed-off-by: Pallavi G <pallavi.g@intel.com>
Kalyan Kondapally [Mon, 11 Dec 2017 04:06:28 +0000 (20:06 -0800)]
Ensure we release all virtual display resources.
We didn't purge resources when destroying the display.
Jira: None.
Test: No new regressions for Virtual Display on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 11 Dec 2017 02:09:00 +0000 (18:09 -0800)]
Enable SurfaceDamage.
With most of the display frame, scissor rect bugs fixed, let's
enable this support.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 12:26:56 +0000 (04:26 -0800)]
Fix Linux build.
Jira: None.
Test: Build passes on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 12:02:00 +0000 (04:02 -0800)]
Allow to create FB with preferred format.
On primary plane, we sometimes fallback to use XRGB format if
ARGB is not supported. As we cache buffers now, we check if fb is
present and if so ignore the request. In this case we should
delete existing fb and create a new one.
Jira: None.
Test: All hwc-val tests pass on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 10:18:01 +0000 (02:18 -0800)]
Call ReleaseGraphicsBuffer only for imported handles.
This is the only time when we have valid GEM handles.
Jira: None.
Test: Ensure app open/close doesn't show memory leak on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 10:11:25 +0000 (02:11 -0800)]
Remove redundant code.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 09:26:25 +0000 (01:26 -0800)]
Use Gralloc 1.0 API directly.
Instead of using GrallocMapper API, let's use Gralloc
API directly. This is needed to set modifiers in future.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 08:08:08 +0000 (00:08 -0800)]
Use ResourceManager to release Virtual display resources.
Similar to other resources, let's use ResourceManager to
handle this.
Jira: None.
Test: Virtual Display still works on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 03:28:09 +0000 (19:28 -0800)]
Don't try to check for GPU resources if we dont have one.
We now check if we have valid GPU resources to release
before trying to delete them in CompositorThread. This avoids
the need to initialize gl context if not needed.
Jira: None.
Test: Boots to home screen on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 03:02:34 +0000 (19:02 -0800)]
Fix build when RESOURCE_CACHE_TRACING is enabled.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 02:47:50 +0000 (18:47 -0800)]
Move drmfb deletion to Compositor thread.
This is part of moving all resource de-allocation to
Compositor thread.
Jira: None.
Test: No new issues on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 01:57:48 +0000 (17:57 -0800)]
Dont mark resources owned by HWC for deletion twice.
We where doing this in GLSurface and drmbuffer.
Jira: None.
Test: Check we dont mark same texture for deletion twice.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 00:41:39 +0000 (16:41 -0800)]
Rename HwcLayerBufferManager as ResourceManager.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 10 Dec 2017 03:12:07 +0000 (19:12 -0800)]
Get NativeHandler from BufferManager.
Instead of passing two to every place, lets query this from
BufferManager.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Lin Johnson [Tue, 28 Nov 2017 08:38:20 +0000 (16:38 +0800)]
Add external layer buffer cache management.
This is to avoid import and generate eglImage and
texture for every frame.
Jira: None
Tests: UI, Video, Camera work as before.
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Mingwei Wang [Wed, 27 Sep 2017 07:15:41 +0000 (15:15 +0800)]
resolve HWC2_VSYNC_DISABLE correctly
Jira: None.
Test: adb shell stop/start no regression.
Change-Id: Ife0eae217b648d859637c38e419361df24ed8fcc
Signed-off-by: Mingwei Wang <mingwei.wang@intel.com>
Lin Johnson [Fri, 8 Dec 2017 08:36:56 +0000 (16:36 +0800)]
Fix the scissor area calculation.
We should use as small area as possible.
Jira: None
Test: No new rendering artifacts on Android.
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Xiaosong Wei [Wed, 15 Nov 2017 08:56:08 +0000 (16:56 +0800)]
Add hooks to pass video color control to varenderer
Add hooks for passing video color control information to VARenderer.
Video effect functions will be implemented based on these hooks.
Jira: GSE-488
Test: Build passes on Android
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Xiaosong Wei [Mon, 4 Dec 2017 07:43:46 +0000 (15:43 +0800)]
Add P010 pixel format support in VARenderer
p010 pixel format support in VARenderer is needed to support
playing back 10bits video
Jira: None
Test: Build passed on both Android & Linux and works as expected
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Kevin Strasser [Thu, 30 Nov 2017 18:12:48 +0000 (10:12 -0800)]
Fix Linux build
Seeing the following linker error on Linux since commit
674b37e8e6:
../.libs/libhwcomposer.so: undefined reference to `hwcomposer::NestedDisplay::NestedDisplay()'
Just need to add the new file to the Makefile
Jira: None
Test: Build passes on Linux
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Randy Xu [Wed, 22 Nov 2017 05:00:34 +0000 (13:00 +0800)]
Add settings file for virtualized environment
Export default setting in virtualized environment for Android
Jira: None
Test: Boot with default settings in virtualized env
Signed-off-by: Randy Xu <randy.xu@intel.com>
Mingwei Wang [Tue, 21 Nov 2017 03:17:30 +0000 (11:17 +0800)]
Add nested display support in hwc
This display can be client to a real physical
display.
Jira: None.
Test: Build passes on Android. Tests still work as now.
Signed-off-by: Mingwei Wang <mingwei.wang@intel.com>
Yang, Dong [Wed, 22 Nov 2017 06:58:56 +0000 (14:58 +0800)]
hwc.lock moved to vendor partition
the hwc.lock moved from rootfs to vendor partition
Jira: None.
Test: Boots to homescreen on Android.
Signed-off-by: Yang, Dong <dong.yang@intel.com>
Chen Yu Y [Tue, 21 Nov 2017 08:57:39 +0000 (16:57 +0800)]
Extend the search scope of c header files
When VNDK enabled, system strict the header file search
scope, this patch extend the c includes search scope
Change-Id: I2b950484dabc5487fc5756fac599ec365263cb22
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-53160
Signed-off-by: Chen Yu Y <yu.y.chen@intel.com>
Fan, Yugang [Tue, 28 Nov 2017 07:03:44 +0000 (15:03 +0800)]
Fix display frame rect and source crop issue in Mosaic Display.
Also update the frame rect and source crop besides the first
display of Mosaic mode.
Jira: None.
Test: Play video with the different resolution or run testlayers with
different source size and frame rect in mosiac mode, without reg
issues, and video show normally(parts of different screen) in
mosaic mode.
Signed-off-by: Yugang, Fan <yugang.fan@intel.com>
Kalyan Kondapally [Sun, 26 Nov 2017 06:24:21 +0000 (22:24 -0800)]
Remove UpdateDisplayFrame in NativeSurface.
Jira: None.
Test: Build passes on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Nov 2017 06:16:11 +0000 (22:16 -0800)]
Move surface damage calculations to a separate function.
This way we can use common logic with Mosaic.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 25 Nov 2017 11:21:42 +0000 (03:21 -0800)]
Fix display frame rect calculations for Mosaic.
We calculated right co-ordinates incorrectly. We should
be translating it w.r.t left_constraint.
Jira: None.
Test: Mosaic shows content correctly in second display.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 25 Nov 2017 11:02:37 +0000 (03:02 -0800)]
Avoid invalidating cache if all attributes are same for new layer.
Currently, we invalidate all cache if a layer is re-created with
same attributes. Now, we make sure we invalidate the cache only
if attributes have really changed.
Jira: None.
Tests: All linux tests pass, hwc-val tests pass as now and no
new regressions seen on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Nov 2017 06:36:19 +0000 (22:36 -0800)]
Add a helper to handle cursor layer.
Jira: None.
Test: Build passes on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 25 Nov 2017 11:17:20 +0000 (03:17 -0800)]
Remove redundant checks.
Jira: None.
Test: No graphics flickers seen on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Nov 2017 03:34:32 +0000 (19:34 -0800)]
Add utility function to check if two rects overlap or not.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 26 Nov 2017 02:53:36 +0000 (18:53 -0800)]
Add utility function to reset rect based on Region.
This will be used in test suite in follwup patches.
Jira: None.
Test: Build passes.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 25 Nov 2017 11:46:27 +0000 (03:46 -0800)]
Fix linux builds.
Jira: None.
Test: Build passes on Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kishore Kadiyala [Thu, 23 Nov 2017 06:44:50 +0000 (12:14 +0530)]
Revert "Add nested display support in hwc"
This reverts commit
7642a9d3f05e92eadd5e38d46e2000e95dcc2a9d.
Jira: None
Test: Cold/Warm reboot with displays connected, no blank screen
in either of displays
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Kishore Kadiyala [Thu, 23 Nov 2017 06:42:56 +0000 (12:12 +0530)]
Revert "Revert "Fix Primary display order issues on Android.""
This reverts commit
061ce5476adaeff5af0e0ecc8c13a79f519a4eb8.
Jira: None
Test: Cold/Warm reboot with displays connected, no blank screen
in either of displays
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Xiaosong Wei [Wed, 22 Nov 2017 08:28:32 +0000 (16:28 +0800)]
Add hwcservice_test
A native test app to verify HwcService remotely.
Jira: GSE-489
Test: Build passed on Android and works as expected
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Kalyan Kondapally [Wed, 22 Nov 2017 08:44:40 +0000 (00:44 -0800)]
Revert "Ignore updates for a pipe which has no planes."
This reverts commit
eaf3836eda534021e3b4f125214a8fdc4ce97fa5.
Kishore Kadiyala [Wed, 22 Nov 2017 08:26:31 +0000 (13:56 +0530)]
Revert "Fix Primary display order issues on Android."
This reverts commit
4ff7d579227cdfa3c53bb779a03850021359d253.
This patch creates regression of making one display blank when booted
with target connected to than one display
Jira: None
Test: Cold/Warm reboot with displays connected should not result in
blank screen in any display
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Kalyan Kondapally [Tue, 21 Nov 2017 22:43:16 +0000 (14:43 -0800)]
Replace GRALLOC_USAGE_* flags with GRALLOC1 equivalents.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kishore Kadiyala [Tue, 21 Nov 2017 16:02:34 +0000 (21:32 +0530)]
Enable hwcservice
Jira: None
Test: hwcmode [displayId <print/get/set <displayconfigindex>>] works.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
renchenglei [Tue, 21 Nov 2017 11:01:19 +0000 (19:01 +0800)]
Fix "format" compile warnings on Android
Jira: None.
Test: Build passes on Android and no warnings reported.
Kalyan Kondapally [Tue, 21 Nov 2017 08:03:26 +0000 (00:03 -0800)]
Ignore updates for a pipe which has no planes.
On some platforms we might not have any planes allocated
for us to work with. In this case ignore any updates for
this display queue.
Jira: None.
Test: We dont crash when planes are not associated for a
given pipe.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Mingwei Wang [Tue, 21 Nov 2017 03:17:30 +0000 (11:17 +0800)]
Add nested display support in hwc
This display can be client to a real physical
display.
Jira: None.
Test: Build passes on Android. Tests still work as now.
Signed-off-by: Mingwei Wang <mingwei.wang@intel.com>
Kalyan Kondapally [Mon, 20 Nov 2017 01:30:56 +0000 (17:30 -0800)]
Add Meta data field to our NativeHandle.
This can be used to query buffer specific attributies. This
helps remove OS specific calls in our test suites.
Jira: None.
Test: Build passes on Android and Linux. Tests still work as
today.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 20 Nov 2017 01:08:59 +0000 (17:08 -0800)]
Remove support for Gralloc backends older than 1.0.
As I know, no one is using older Gralloc API with our
HWC. As we change things we are not testing the older
backends. Let's bring the support back if someone
really needs this.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 20 Nov 2017 01:07:55 +0000 (17:07 -0800)]
Remove support for non Minigbm backends on Android.
We are not testing these backends and we have got to a stage
where it's getting hard to maintain both. Let's get them
back if the need arises.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 18 Nov 2017 20:33:27 +0000 (12:33 -0800)]
Remove WA in DisplayQueue.
We shouldn't need this now as we ensure we clear surfaces
as needed.
Jira: None.
Test: No garbage seen when content is being moved around.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 18 Nov 2017 19:59:27 +0000 (11:59 -0800)]
Ensure we clear surfaces correctly when recycling composition results.
As we cache results, let's make sure we clear them when anything
results in clearing one of the surface. This should ensure we
take into account any display region changes in all surfaces.
Jira: None.
Test: No new regressions on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Tue, 14 Nov 2017 08:08:09 +0000 (00:08 -0800)]
Remove unused format.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 17 Nov 2017 22:27:03 +0000 (14:27 -0800)]
Fix Primary display order issues on Android.
We respect the display order in hwc_display.ini, but we
might not have the display connected. In this case we
need to treat the first connected display as primary.
Jira: None.
Test: Any combination of display order, connection status
works.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Lin Johnson [Wed, 15 Nov 2017 13:30:06 +0000 (21:30 +0800)]
Fix incorrect region width/height calculation.
Jira:https://jira01.devtools.intel.com/browse/OAM-52773
Tests: Video should be in the middle even if it does not scale
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Yang Shi [Tue, 14 Nov 2017 02:54:06 +0000 (10:54 +0800)]
fix the screencap black screen issue
When there is no display to connect device, the original HWC module
will create only 1*1 framebuffer.
So screencap will not works properly, it only can get a black screen.
This will block many test case.
In order to fix this issue, we make the default width and height to
1080p format for most HDMI device use this format.
JIRA: https://jira01.devtools.intel.com/browse/OAM-50818
TEST: screencap can works well when don't connect any display device
Signed-off-by: Yang Shi <yang.a.shi@intel.com>
Dong Yang [Mon, 13 Nov 2017 09:03:49 +0000 (01:03 -0800)]
Let's not override Ignoreupdate state in Initialzation.
DisplayQueue Initialization is called during Connect() call
and we set idle_tracker_.state_ as 0. This conflicts if
hwclock thread is still waiting for the lock to be released.
Let's make sure we respect this setting always.
Jira: None.
Test: No flicker seen during boot up on Android.
Signed-off-by: Dong Yang <dong.yang@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 07:00:05 +0000 (23:00 -0800)]
HandleWait when lock_fd is -1.
Instead of going in a continuous loop between HandleRoutine
and Wait, let's wait using poll till someone kills hwclock
thread.
Jira: None.
Test: Dont see 100% cpu usage consumed by hwcservice on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 10 Nov 2017 12:48:35 +0000 (04:48 -0800)]
Explicitly inform queue when to ignore updates.
Jira: None.
Test: HWCLock thread is destroyed correctly on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Mon, 13 Nov 2017 00:24:02 +0000 (16:24 -0800)]
Track Source rect instead of position.
In 3D composition case, change in source rect means content
has changed and we can avoid clearing the complete surface unless
display frame has changed. Also, in plane composition case we
can avoid re-validating the cached results in case the width
and height remain same i.e. Should't impact any scaling ratio
results vs display frame.
Jira: None.
Test: No new artifacts seen on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 23:32:34 +0000 (15:32 -0800)]
Add support to rotate displays independent of each other.
This adds initial plumbing needed to apply rotations for
different physical displays independent of each other. This
is again a boot time setting in hwc_display.ini which cannot
be changed during run time.
One needs to change ROTATION to true in hwc_display.ini to test
this. Layers are not scaled correctly, still some work to be done
to take plane rotations into use and scale layers correctly when
rotation if 3D composition is needed.
Jira: None.
Test: When "ROTATION" is set to true, Physical Display 1 content
is rotated 90 and Display 0 is having a rotation of 0 on
Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 22:02:41 +0000 (14:02 -0800)]
Add PlaneTransform API.
We have use cases where the whole physical display may be
rotated and hence rotation needs to be applied on top of
any layer specific transformations. Let Overlaylayer take
this into consideration and Plane will use this when
applying rotation for a given plane. It would be ideal if
we can have a property which would take the rotation into
account after all the plane output is put together.
Jira: None.
Test: No regressions on current Android use cases.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 06:51:20 +0000 (22:51 -0800)]
Make Mosaic Display work for different heights.
We use max height of all Physical displays. If size of
physical display is smaller than the maximum height, we still
continue to use it. This is wrong and we should limit our
display frame to maximum of Display height.
Jira: None.
Test: Connect two displays of different physical heights and
enable Mosaic mode. Now, it should display content
correctly and not show any commit failures.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 06:49:13 +0000 (22:49 -0800)]
Fix build when ENABLE_DISPLAY_DUMP is 1.
Jira: None.
Test: Build passes on Android and Linux.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 06:06:27 +0000 (22:06 -0800)]
Fix MosaicDisplay when display reports a single mode.
We hardcoded the config index to 1, but now we change it
to 0 as that should also have the preffered mode for a
given display. Also added few traces which would help
debug similar issues in future.
Jira: None.
Test: Mosaic Display comes up properly when connected display
reports only single mode.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 04:21:15 +0000 (20:21 -0800)]
Reset variable outside for loop.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 12 Nov 2017 01:48:29 +0000 (17:48 -0800)]
Add support for Clone mode.
This was already available but only enabled on Linux. Let's
enabled this on Android when you have 3 displays connected.
By default 2 & 3 display will be cloned.This combination
can be managed by CLONE_DISPLAY in hwc_display.ini and
can be disabled by setting CLONE=false in hwc_display.ini
Jira: None.
Test: 2 and 3 display get cloned correctly on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 10 Nov 2017 13:42:54 +0000 (05:42 -0800)]
Fix service name.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Thu, 9 Nov 2017 11:09:42 +0000 (03:09 -0800)]
Disable TTY usage on Android.
Jira: None.
Test: Able to run kmscube test application on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Thu, 9 Nov 2017 10:53:38 +0000 (02:53 -0800)]
Remove un-necessary include in Android.mk file.
Tests have a dependency on staic build of HWC. Since, no
other thing depends on the static build, this neither the
tests get built and we have to manually build them
going into tests folder.
Jira: None.
Test: We are able to build tests on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Xiaosong Wei [Thu, 9 Nov 2017 08:56:18 +0000 (16:56 +0800)]
Fix tests build for Android
Jira: None.
Test: We are able to build tests on Android.
Signed-off-by: Xiaosong Wei <xiaosong.wei@intel.com>
Kishore Kadiyala [Wed, 8 Nov 2017 13:37:44 +0000 (19:07 +0530)]
Fix compilation issue for Android IA.
Jira: None
Test: Build pass on Android IA.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Kishore Kadiyala [Tue, 7 Nov 2017 13:29:47 +0000 (18:59 +0530)]
Fix build error for libva.
Jira: None.
Test: Compilation should pass on Android O.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Avinash Reddy Palleti [Tue, 7 Nov 2017 02:27:04 +0000 (18:27 -0800)]
FIX to get correct Rectangle IDs for the output layers
If start of one rectangle and end of another rectangle overlap, one
case was missed earlier to update rectangle IDs in the out structure.
Jira: OAM-52047.
Test: Verified output layers by giving 8 input rectangles.
Signed-off-by: Avinash Reddy Palleti <avinash.reddy.palleti@intel.com>
Kalyan Kondapally [Mon, 6 Nov 2017 06:08:20 +0000 (22:08 -0800)]
Fix frame width and height calculations for Mosaic mode.
We need to re-calculate these taking into account the
constraints.
Jira: None.
Test: Frame buffer is split correctly across displays when
Mosaic mode is enabled.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 28 Oct 2017 08:43:21 +0000 (01:43 -0700)]
Treat Cursor & Primary as another Overlay.
Jira: None.
Test: Cursor works as now on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 28 Oct 2017 05:42:38 +0000 (22:42 -0700)]
Reserve memory for vector in case we know how much is needed.
Jira: None.
Test: Boots to home screen on Android IA.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 28 Oct 2017 08:11:22 +0000 (01:11 -0700)]
Fix usage_ checks in drmbuffer.
Jira: None.
Test: Build passes on Linux and Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 5 Nov 2017 09:30:22 +0000 (01:30 -0800)]
Add enum for rotation.
This is going to be used by test suite and for independent
display rotation in future.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sun, 5 Nov 2017 01:24:10 +0000 (18:24 -0700)]
Use drmClose to close the fd.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 4 Nov 2017 20:44:03 +0000 (13:44 -0700)]
Build tests by default on Eng builds.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Sat, 4 Nov 2017 20:41:57 +0000 (13:41 -0700)]
Move common includes in platformdefines.h.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
Kalyan Kondapally [Fri, 3 Nov 2017 22:11:23 +0000 (15:11 -0700)]
Fix string length.
By subtracting -1, we ended up not having the last character.
Reported and fix proposal by Michael Goffioul in IRC.
Jira: None.
Test: Build passes on Android.
Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>