OSDN Git Service
xue.yifei [Mon, 21 Jan 2019 02:54:59 +0000 (10:54 +0800)]
delete the unused gralloc_handle while sharing dmabuf,
otherwise it will cause memory leak
Change-Id: Ibf35fdd14b74d8261feea4d08d1a89fa4b7378ee
Tracked-On: None
Tests: function test on android
Signed-off-by: xue.yifei <yifei.xue@intel.com>
Shaofeng Tang [Wed, 16 Jan 2019 12:47:08 +0000 (20:47 +0800)]
New API for syncing hwc drm-commit.
A new API "EnableDRMCommit" is added for enabling/disabling drm commits
in HWC. And hwcserviceapi are updated for supporting the invocation
from C.
Change-Id: Id880956934c1743d7327c977867f25046a63c320
Tracked-On:https://jira.devtools.intel.com/browse/OAM-71647
Tests: Compile sucessful for Android, feature validation.
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Shaofeng Tang [Tue, 18 Dec 2018 01:46:21 +0000 (09:46 +0800)]
Supporting Planes Reservation
The plane of each display used by HWC can be reserved in configuration.
Only the plane assigned in configuration will be used for HWC.
Remaining issue: once the primary plane is not reserved, drmModeAtomicReqPtr
will be NULL from drm.
Change-Id: Ie9a4aa09907cda1920b4735d58c9d9f6d623346a
Tracked-On:https://jira.devtools.intel.com/browse/OAM-71647
Tests: Compile sucessful for Android, feature validation.
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Shaofeng Tang [Tue, 15 Jan 2019 13:17:19 +0000 (21:17 +0800)]
Null check for DRM buffer before invoking.
Checking if DRM buffer pointor is null or not before invoking it.
In order to avoid hwc crash once DRM fail to malloc buffer
Change-Id: I1599d2d70516859256bf4b1d1b59e390d95d1649
Tests: Compile sucessful for Android.
Tracked-On: https://jira.devtools.intel.com/browse/OAM-75080
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Lin Johnson [Thu, 10 Jan 2019 02:55:31 +0000 (10:55 +0800)]
Replace SetExplicitSyncSupport with SetDisableExplicitSync
SetExplicitSyncSupport is misleading. The actually meaning is to disable ExplicitSync
Change-Id: Ic6d12cdc52c1ee6355382a03dea58560fdd1e281
Tracked-On: None
Tests: Android UI normal
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Shaofeng Tang [Wed, 9 Jan 2019 07:10:01 +0000 (15:10 +0800)]
Revert "Return false for none of DrmModeMode"
This patch could cause a boot issue. revert it for time being
This reverts commit
a1a54397597cf078a649724f85f6414aabaee198.
Change-Id: I8030db728056341c638340725ce661791e7bf99f
Tracked-On:https://jira.devtools.intel.com/browse/OAM-73760
Tests: Compile sucessful for Android.
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Lin Johnson [Thu, 27 Dec 2018 03:19:02 +0000 (11:19 +0800)]
drmBuffer: wrap CreateFrameBuffer in GetFb
Since GetFb and CreateFramebuffer are always coupled
This make callers only need to call GetFb
Change-Id: Ifdee963065e92a984205f851db2b2e2c27ae9a4e
Tracked-On: None
Tests: Andriod UI normal
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Sat, 29 Dec 2018 03:09:13 +0000 (11:09 +0800)]
Remove choose_drm_modifier
We should not relay on a simple util functions to choose CCS
modificators. That could be risky if one drm plane does not support
CCS modificator. We should let drmplane tell us which kind of modifier
the plane preferred
Change-Id: Ia9b3c9d0a7a1f05694635e12aaa97a70b880cb9b
Tracked-On: None
Tests: Android UI normal and RBC working
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Shaofeng Tang [Thu, 3 Jan 2019 02:03:04 +0000 (10:03 +0800)]
Zoom in or out the rendering damage for different display
Add the "zoom in and out" code back for connecting 2 display with different
resolution. In the bug case, 2K and 1080P display are connected. the Rect
should be enlarged for 2K when the rect is calculated with 1080p source
coordinates. and only when the damage region is set by SF, the damage will
be zoomed in/out.
Change-Id: I60cdd681895e8fa4907a89c2450c6da410ba208b
Tests: Verified on Celadon with 2 displays and mosaic on GP
Tracked-On: https://jira.devtools.intel.com/browse/OAM-73581
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Yang, Dong [Fri, 21 Dec 2018 01:38:00 +0000 (09:38 +0800)]
Modify the connected display calculate logic
The conneted display count should be calculated before the
drmdisplaymanager try to connect the physical display,
the original method will count a logical connected display,
only already conneted by drmdisplaymanager will be counted,
but since the number will be used during the diaplay
connection, so it will get the wrong display number.
Change-Id: I9f0a96bd34b7c3ef4ea040c798cebfa0f332796a
Tracked-On: https://jira.devtools.intel.com/browse/OAM-73655
Tests: the overlay disappear issue gone, and display works fine
Signed-off-by: Yang, Dong <dong.yang@intel.com>
Yuanjun Huang [Wed, 26 Dec 2018 05:47:38 +0000 (13:47 +0800)]
Correct overlay alpha blending value setting
Correct Alpha value setting to align with i915 kernel driver
in which overlay Alpha blending is first time being enabled
from kernel 4.20.
In driver it takes high 8bit of 16bit value.
Tracked-On: None
Test: boot to Android UI with kernel 4.20
Signed-off-by: Yuanjun Huang <yuanjun.huang@intel.com>
Shaofeng Tang [Thu, 27 Dec 2018 07:19:44 +0000 (15:19 +0800)]
Return false for none of DrmModeMode
Return false for none of DrmModeModeInfo, rather than invoking physical
display to get the config.
Change-Id: Ib171c387ab3c9c0963277fc0a1de053632c6d2a0
Tracked-On:https://jira.devtools.intel.com/browse/OAM-73760
Tests: Compile sucessful for Android, 3000 round reboot testing.
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Yang, Dong [Wed, 12 Dec 2018 07:29:44 +0000 (15:29 +0800)]
HWC: optimize the 1st display frame commit
After the earlyEvs exit, the HWC will get the hwc.lock
and begin rendering, but the initialize for the
1st frame will take ~150ms, this patch will let
the initialize done before taken hwc.lock.
Change-Id: I78c636a70b37cfbd69c2d8991eefd4a1ba46659f
Tracked-On: None
Tests: Test transition from earlyEvs to HWC, the time reduced from 400ms to 50ms
Signed-off-by: Yang, Dong <dong.yang@intel.com>
Wan Shuang [Mon, 10 Dec 2018 10:28:37 +0000 (18:28 +0800)]
Fixed the HWC crash caused by map iterator erase.
Erase map iterator during iterating a map caused the crash.
The fix is to avoid erase itator in the interating loop and clear
the iterator after the loop end.
Change-Id: I409a6293ad290b7aaae8f2f4ea6e971cc29cf34a
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71721
Tests: Trigger VirtualDisplay destructor condition and no HWC crash.
Signed-off-by: Wan Shuang <shuang.wan@intel.com>
Lin Johnson [Thu, 6 Dec 2018 06:56:58 +0000 (14:56 +0800)]
Android: disable use modificators in some situation
In Android we meet scrambe screen and system hung issues
when modificators are used
this WA is to disalbe modificators in those situations
the real fix is to be come yet
Change-Id: Ie77503f8f427d2d92761f6407e3a684f062d3e3a
Tracked-On: None
Tests: no scrambled UI and no system hang
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Shaofeng Tang [Tue, 4 Dec 2018 06:47:02 +0000 (14:47 +0800)]
Check null pointer before using layer buffer.
Add a checking for the pointer of layer buffer to avoid Null pointer dereference.
Change-Id: Id0ba3b3a814132fe9344afa7f7c8fe7c4d16cbec
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-72208
Tests: Compile sucessful for Android
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
HeYue [Mon, 3 Dec 2018 02:34:22 +0000 (10:34 +0800)]
Do not need translate when source crop is not (0, 0)
In Android, when the source crop is not (0, 0), the surface damage
is already translated to global display coordinate, no translation
is needed.
When the source crop is (0, 0), no scaling is needed, just transofrm
the coordiate according to the rotation scenario.
Change-Id: Ib4cd394290458a189c92fa668190107bb92dc49e
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-72393
Tests: The HVAC, independent rotation and Mosaic mode work well
Signed-off-by: HeYue <yue.he@intel.com>
Lin Johnson [Wed, 28 Nov 2018 14:36:55 +0000 (22:36 +0800)]
PAVP: when set display plane, the plane should in use true
This resolve the blank plane problem after squash
non-video plane
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-72377
Change-Id: I2bd73dbb68f9e986bcd857a04c739e03f7504694
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Mon, 26 Nov 2018 07:14:13 +0000 (15:14 +0800)]
Fix two marjor issues blocking PAVP playback in HWC
1) When video is on top layers, there is no ganrantee that video get a separate plane.
Video can be assign to be composited. Add logic to squash non-video planes to make video
to get a seperate plane
2) When layers are scanout, or be processed as video plane, there is no necessary to
getGPUResources from them. It is a reductant operation and may result in error then video is
protected
Change-Id: I379ce5ecf3944230580734ac8317e6c6e3f7f8e1
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71887
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Shaofeng Tang [Fri, 30 Nov 2018 07:22:23 +0000 (15:22 +0800)]
Fix Alpha calculation error
The Alpha of layer should be calculated with texture Alpha alone.
Instead of plus with RGB.
Change-Id: I848e0f1060a87e1a2b54f07a4f353cf0b4e453b4
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-72398
Tests: Compile sucessful for Android. Check the issue is fixed
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Kelly Ledford [Mon, 26 Nov 2018 22:16:05 +0000 (14:16 -0800)]
Update README.md to point to project wiki pages
Remove documentation information as it is duplicated in the wiki
Change-Id:
Tracked-On: None
Test: None
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
HeYue [Wed, 28 Nov 2018 03:21:18 +0000 (11:21 +0800)]
Do not need change surface damage rect
In Android, the surface damage rect is already translated
coordinate in framework. No translation is needed.
Change-Id: I9ae023731226bec8d5e62ac021685aa581977280
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71886
Tests: The HVAC, independent rotation and Simple Podcatcher work well
Signed-off-by: HeYue <yue.he@intel.com>
HeYue [Tue, 27 Nov 2018 06:39:50 +0000 (14:39 +0800)]
Add full color range support
By default the HWC only support reduced color range.
Change-Id: Icf3ed7ab7c8a4a619da6e47341e5832a8577caf7
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71652
Tests: Support full color video.
Signed-off-by: HeYue <yue.he@intel.com>
Shaofeng Tang [Tue, 27 Nov 2018 14:13:31 +0000 (22:13 +0800)]
Fix the error in non-black SolidColor patch
The android type 'hwc_color_t' should not be used outside of
'os/android/'
Change-Id: I87dc20d1d2e7e9566b0ea74f9e1316378242fb55
Tracked-On: None
Tests: Compile sucessful for Android.
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
Shaofeng Tang [Mon, 26 Nov 2018 05:01:56 +0000 (13:01 +0800)]
Add support for Non-black SolidColor type
The layer without buffer handler will be filled by HWC
with the color assigned from iahwc2/SetLayerColor.
Change-Id: I10d9d322deec49d0dff660883decd377be2891ab
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71643
Tests: Compile sucessful for Android, Pass feature validating.
Signed-off-by: Shaofeng Tang <shaofeng.tang@intel.com>
HeYue [Fri, 16 Nov 2018 07:58:42 +0000 (15:58 +0800)]
Android: Fix the compile warning
Reduce the Wsign-compare and Wcast-qual warning.
Change-Id: If1dfcfa0357c17a84b2227fc23c737c36c6d3530
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71835
Tests: Compile sucessful for Android.
Signed-off-by: HeYue <yue.he@intel.com>
Lin Johnson [Wed, 14 Nov 2018 08:29:46 +0000 (16:29 +0800)]
SetProtected: fix logic error
Should only allow video and protected layer switch
Change-Id: I4633725277e0cee125c24b33a42fcd481f9f5990
Tracked-On: None
Tests: Video playback on Android
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Sun, 11 Nov 2018 03:31:48 +0000 (11:31 +0800)]
Rename HwcBuffer to HwcMeta
HwcBuffer name is misleading,
actually it is just some meta info
Change-Id: I418fe1f56cd331e6b029e73884770a8ce15e004f
Tracked-On: None
Tests: compliation pass on Android
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
HeYue [Wed, 14 Nov 2018 06:19:08 +0000 (14:19 +0800)]
Do not need change size from source crop to display rect
When source crop begin from (0, 0), the source crop size
change will cause translated damage region doesn't correct.
Change-Id: Iae3143ac9be38b35c1e6649e7721469e6f39a790
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71102
Tests: AutoBots test don't have flick/half screen, the HAVC working ok.
Signed-off-by: HeYue <yue.he@intel.com>
Kishore Kadiyala [Wed, 10 Oct 2018 19:48:18 +0000 (01:18 +0530)]
Add support for the Color Depth control
By default the Kernel sets the bpc for a Pipe based on EDID
while considering the range of bpc supported by the pipe .
In this patch, Userspace requests the kernel for a specific bpc
based on a particular resolution.
Change-Id: None
Tracked-On: None
Tests: Android UI starts normally and bpc request to kernel goes fine
leaving the kernel to decide for the pipe.
Signed-off-by: Kishore Kadiyala <kishore.kadiyala@intel.com>
Jenny Cao [Thu, 15 Nov 2018 01:53:19 +0000 (09:53 +0800)]
Fix Critical KW issue:Buffer Overflow
Klockwork has issue for buffer overflow in use sprintf.
Change the sprintf to snprintf.
Change-Id: I1a1454c6dc7d0bc64d2203e33c09a49b553e6b9a
Tracked-on: https://jira01.devtools.intel.com/browse/OAM-71738
Tests: Compliation on Android pass
Signed-off-by: Jenny Cao <jenny.q.cao@intel.com>
Shaofeng Tang [Wed, 14 Nov 2018 01:37:11 +0000 (09:37 +0800)]
Clean error log in HWC
ETRACE should be only used for a real error happens. Abused ETRACE
is relaced by ITRACE.
Change-Id: I920da4a68d9fdc9395bcf70dac2c865e040d7b25
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-71548
Tests: Compile sucessful for Android.
Signed-off-by: Tang, Shaofeng <shaofeng.tang@intel.com>
Lin Johnson [Mon, 12 Nov 2018 02:44:20 +0000 (10:44 +0800)]
Separate disable_overlay and disable_explictsync
disable_overlay means do not use HW overly.
It is beneficial for overlay debug.
disable_explictsync is Android framework feature about fence synchronization
Chaned-Id: None
Tracked-On: None
Tests: Compliation on Android pass
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Jenny Cao [Tue, 6 Nov 2018 05:24:01 +0000 (13:24 +0800)]
Fix critical KW issue
1): Do null check for pointer 'edid' before dereferenced.
2): Do null check for pointer 'buffer' before dereferenced.
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-70809
Tested-by: build test and kw scan check
Signed-off-by: Jenny Cao <jenny.q.cao@intel.com>
Kelly Ledford [Thu, 25 Oct 2018 17:58:01 +0000 (10:58 -0700)]
check_patch.py: Update link address
Wiki reference link was out of date due to wiki update.
Change-Id: None
Tracked-On: None
Tests: None -- comment change
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
Lin Johnson [Sun, 28 Oct 2018 03:58:25 +0000 (11:58 +0800)]
PAVP: set vpp parameters if layer is protected
Also fix logic error related with SetProtected
Jira: None
Test: Android UI normal
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
HeYue [Mon, 29 Oct 2018 01:00:50 +0000 (09:00 +0800)]
Android: Fix unused parameters complie warnings in Makefile
Reduce about 140 -Wunused-parameter warnings while compile Android.
Jira: https://jira01.devtools.intel.com/browse/OAM-70251
Tests: Compile sucessful for Android.
Signed-off-by: HeYue <yue.he@intel.com>
Lin Johnson [Thu, 25 Oct 2018 10:28:00 +0000 (18:28 +0800)]
SolidColor type: release fence fix
As the layer is a render target of GPU, we should still
set the release fence of it. SurfaceFlinger need the fence to sync.
The acquire fence is not necessary since the layer has no buffer at all
Jira: https://jira01.devtools.intel.com/browse/OAM-70347
Test: Android UI normal and no fd leak
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Wan Shuang [Tue, 23 Oct 2018 07:30:16 +0000 (15:30 +0800)]
Fixed the crash due to layer->GetNativeHandle returns a null pointer.
The fix is to skip the layer handling if the layer buffer is NULL.
Jira: OAM-70263
Tests: HWC doesn't crash if handling layer with no buffer attached.
Signed-off-by: Wan Shuang <shuang.wan@intel.com>
Lin Johnson [Thu, 18 Oct 2018 08:11:57 +0000 (16:11 +0800)]
Deinterlace: change the default settings to auto
interlace infomation should be according to GRALLOC_USAGE_PRIVATE_0
frame by frame tracking is not necessary
Jira: None
Tests: Android UI starts normally
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Thu, 18 Oct 2018 06:41:42 +0000 (14:41 +0800)]
HDCP: Should use connector_id (port_id) as the index for HDCP operations
HDCP operation should be only valid for physical connection
This is to support selective HDCP enabling
Jira: None
Tests: Android UI works well
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Wed, 17 Oct 2018 14:55:28 +0000 (22:55 +0800)]
HDCP: Add GetDisplayIDFromConnectorID
This API should be used for selective HDCP port enabling
From HDCP Daemon
Jira: https://jira01.devtools.intel.com/browse/OAM-69940
Tests: None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
xue.yifei [Sat, 29 Sep 2018 07:25:38 +0000 (15:25 +0800)]
Corret the condition check which will casue DestroyVirtualDisplay failure
Jira: https://jira01.devtools.intel.com/browse/OAM-68393
Tests: function test on android
Signed-off-by: xue.yifei <yifei.xue@intel.com>
Wan Shuang [Mon, 15 Oct 2018 02:40:49 +0000 (10:40 +0800)]
Set HWC as DRM master when got exclusive lock of /vendor/hwc.lock.
This is to ensure HWC could take over the DRM master role when earlyEvs
exits and make the Android UI rendering correctly as expected.
Jira: OAM-70073
Tests: Boot into Android home screen
Signed-off-by: Wan Shuang <shuang.wan@intel.com>
Lin Johnson [Tue, 16 Oct 2018 03:28:29 +0000 (11:28 +0800)]
Add function to transfrom source damage to rendering damage
this paritial incorparate
145bf9c5853cb5b0de0136a076d1a8b9b0b1c8dc
aftering reverting it.
Also consider the situation source corp is not the same size with
display_rect. That means we also have to scale the output rendering
damage rect
Jira: None
Tests: On Android, HVAC should behave normally
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Mon, 15 Oct 2018 03:45:24 +0000 (11:45 +0800)]
fix compliation error caused by rebase
05cda00f4c6322c1af75d0d28bf8b1789f050940
Jira: None
Tests: Should not be only compilation error
Lin Johnson [Thu, 19 Jul 2018 01:42:52 +0000 (09:42 +0800)]
Change decryption prop name
GPU compositor should set target protected to false
Jira: None
Tests:None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Thu, 12 Jul 2018 08:16:42 +0000 (16:16 +0800)]
HWC to support protected buffer display
It should be trough RRB2 propery accroding
the design
Jira: OAM-65937
Tests: None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Conflicts:
common/core/overlaylayer.h
Lin Johnson [Wed, 27 Jun 2018 07:33:02 +0000 (15:33 +0800)]
Protected layer should always choose video path
For CSC and composition. Mesa will not support
Encrypted surface yet
Jira: None
Tests:None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Harish Krupo [Sun, 16 Sep 2018 04:30:47 +0000 (10:00 +0530)]
DrmDisplay: check if sink supports DCI-P3.
The sink exposes whether it supports the DCI-P3 color space in the
colorimetry block present in the EDID. This patch implemnets an EDID
parser to get DCI-P3 support from the sink.
Jira: None
Test: When a DCI-P3 capable display is connected, "DCI-P3 support available"
log will be present in the logcat.
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Conflicts:
public/nativedisplay.h
wsi/drm/drmdisplay.h
Lin Johnson [Tue, 9 Oct 2018 01:29:33 +0000 (09:29 +0800)]
HDCP: Add Set SRM support
Jira: None
Tests: Android UI workes nomrally
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Sun, 30 Sep 2018 02:09:59 +0000 (10:09 +0800)]
Implement PAVP tear down support
When any PAVP session disabled, HWC suppose to
not compose any protected video
Jira: https://jira01.devtools.intel.com/browse/OAM-68867
Tests: None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Wan Shuang [Sat, 29 Sep 2018 02:07:50 +0000 (10:07 +0800)]
Added ignore_updates_ to track if HWC needs to ignore rendering request.
Don't invoke display's ForceRefresh if ignore_updates_ is true.
Jira: OAM-68565
Tests: Boot with RVC and no flicking
Signed-off-by: Wan Shuang <shuang.wan@intel.com>
Lin Johnson [Fri, 28 Sep 2018 08:28:06 +0000 (16:28 +0800)]
Revert "Apply damage transformations in GetLayerDamage"
Flicker is observed when start an APK after this patch.
for example use Car Launcher
This reverts commit
145bf9c5853cb5b0de0136a076d1a8b9b0b1c8dc.
Conflicts:
common/core/hwclayer.cpp
public/hwclayer.h
public/hwcutils.h
HeYue [Sat, 29 Sep 2018 06:59:21 +0000 (14:59 +0800)]
Fix the memory leak in virtualdisplay.cpp.
The memory leak causing the dmabuf fd that hwc opened increase all the time.
Causing the UI hang or reboot.
1: The buffer handle is without any 3D or framebuffer resource, thus it can
be destoryed directly instead of in the compositor thread
2: This will decoule the SetOuputBuffer and Present call. Previous it assumed
that SetOutputBuffer and Present is 1:1, but actually there is no guarantee from
the framework that it will be 1: This will decouple the SetOuputBuffer and Present call.
Previous it assumed that SetOutputBuffer and Present is 1:1, but actually there is no
guarantee from the framework that it will be 1:1
Jira: https://jira01.devtools.intel.com/browse/OAM-67797
Tests: play video and UI doesn't hang or reboot. The fd that hwc opened is stable.
Signed-off-by: HeYue <yue.he@intel.com>
Harish Krupo [Sat, 29 Sep 2018 06:21:18 +0000 (14:21 +0800)]
Implement display rotation.
When display rotation is applied (not layer rotation)
especially configured in hwc_display.ini (Android),
it is necessary to recalculate the layer's display frame
(position) of each plane.
If the plane needs GPU render and rotation type is GPU rotation,
re-calculate its source layers's display frame before
GPU composit and rotate; for other scan out plane
re-calculate its overlay layer's display frame before DRM commit.
Jira: https://jira01.devtools.intel.com/browse/OAM-67979
Tests: display rotation works on Android platform.
Signed-off-by: Yuanjun Huang <yuanjun.huang@intel.com>
Lin Johnson [Wed, 26 Sep 2018 03:38:09 +0000 (11:38 +0800)]
Remove blocking commit wrongly merged
It is wrongly added in SolidColor support
Jira: None
Tests: None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Tue, 25 Sep 2018 08:47:04 +0000 (16:47 +0800)]
SetOverlayLayer: DisplayPlaneState should also update
displayframe and source crop,Otherwise if GetDisplayFrame etc
is called for this plane state, it will not be correct
Jira: None
Tests: Android UI normal
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Wed, 19 Sep 2018 08:20:48 +0000 (16:20 +0800)]
Add support for SolidColor Type layer in HWC
It is a layer without buffer handler,
it expected HWC can fill the layer with
color(0,0,0) and multiplay with an Alpha value
Jira: https://jir01.devtoosl.intel.com/browse/OAM-68857
Tests: SolidColor composition layer can be rendered
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Thu, 13 Sep 2018 01:39:50 +0000 (09:39 +0800)]
Removing deinterlace frame by frame check as
it cause FPS regression for video
Also fixed performance regression caused by
21c2f60dfd5044cfa0e640b09d9c42e52a669f00
validate_Layers shoud apply only when video effect
changes
Jira://jira01.devtools.intel.com/browse/OAM-68648
Tests: Video FPS no regression
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Caiwen Zhang [Thu, 30 Aug 2018 07:28:28 +0000 (15:28 +0800)]
Update AliOS support
1) align with AliOS HAL and clean up the implementation
2) Fix compile issues on AliOS
Signed-off-by: Caiwen Zhang <caiwen.zhang@intel.com>
Lin Johnson [Tue, 4 Sep 2018 14:50:15 +0000 (22:50 +0800)]
deinterlacing: avoid to use HQ scale as VPP driver bug.
Need use GetInteralce to fetch interlace information
Tests: Video playback with deinterlace working on Android
Jira: https://jira01.devtools.intel.com/browse/OAM-65167
Lin Johnson [Fri, 31 Aug 2018 07:09:09 +0000 (15:09 +0800)]
Should make sure separate plane for video
when required media effects, since VPP path only applies to a separate plane.
Add a variable in display queue to track if media effect changes
If it changed, should not use idle frame
Jira: None
Tests: video playback with media effect changes
Kelly Ledford [Fri, 24 Aug 2018 22:54:58 +0000 (15:54 -0700)]
Add file CONTRIBUTING.md
When this file is added, Github creates a popup reminder for any new contributor
to the project -- reminding them to view the contribution guidelines before
creating their first issue and pull request.
JIRA: GSE-1575
Test: none
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
Michele Lim [Tue, 28 Aug 2018 19:57:14 +0000 (12:57 -0700)]
Add syntax for parsing "ANDROID_P" required by GP2.0.
Current parser only works up to "ANDROID_O".
Jira: GSE-1615
Test: Displayed "ANDROID_VERSION 9" as expected.
Signed-off-by: Michele Lim <michele.lim@intel.com>
Michele Lim [Mon, 27 Aug 2018 03:35:56 +0000 (20:35 -0700)]
GP2.0 Renderer interlaced video mode control
Many interlaced video clips still exist despite the fact that
most modern computer monitors do not support interlaced video.
Since this capability does not currently exist in Android,
provide the interface to deinterlace the video frames prior to
rendering to enhance the user experience.
Jira: GSE-1618
Test: To be tested on KabyLake NUC
Signed-off-by: Michele Lim <michele.lim@intel.com>
Aravindan Muthukumar [Mon, 27 Aug 2018 07:14:57 +0000 (12:44 +0530)]
Fix for Antutu Regression
The issue here is canvas color was updated to kernel everytime
during the display update eventhough there was no update in
the color from the upper layer. Because of these redundant
ioctl calls to kernel,3D scores of antutu KPI regressed.
The fix here is to call the ioctls only when there is
a set/update in the canvas pipe color.
Signed-off-by: Aravindan M <aravindan.muthukumar@intel.com>
Signed-off-by: Kedar Karanje <kedar.j.karanje@intel.com>
JIRA: https://jira01.devtools.intel.com/browse/OAM-65913
Lin Johnson [Mon, 27 Aug 2018 03:13:58 +0000 (11:13 +0800)]
Fix crash when ReValidatePlanes is called
Should make sure render target before GetOffScreenTarget
Jira: None
Tests: No crash when test independant rotation of displays
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Fri, 24 Aug 2018 03:01:40 +0000 (11:01 +0800)]
Robustness for AaaG: when there is no pipe assigned,
HWC should return false instead of crash
Jira: None
Tests: Android boot with no pipe assigned in AaaG
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Harish Krupo [Fri, 24 Aug 2018 05:46:58 +0000 (11:16 +0530)]
Re-map display rotation values before calculation
the display rotation values are one of {kIdentity, kTransform90,
kTransform180, kTransform270}. First remap them to 0..3 before adding it to
the layer's transform.
Jira: None
Test: The display's rotation should reflect based on the setting in hwc_display.ini
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Kelly Ledford [Fri, 24 Aug 2018 22:15:24 +0000 (15:15 -0700)]
Fully isolate travisCI builds
'sudo: required' fully seperates each build into their own, isolated & clean,
Google Compute Engine vm -- so no more shared state between builds.
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
renchenglei [Mon, 20 Aug 2018 07:20:56 +0000 (15:20 +0800)]
Fix screen flicker when selecting option in setting menu
This help fix screen flicker when selecting any option in the
setting menu screen with touch screen. We should return empty
rectangle when rmin <= lmax or bmin <= tmax.
Jira: OAM-67240
Test: Screen won't flicker when selecting option in setting menu
xue.yifei [Tue, 21 Aug 2018 07:56:02 +0000 (15:56 +0800)]
new design of the hyper dmabuf sharing base on VDS
this patch include 3 components
1. fix the VDS fd leak casue of not purge the imported buffer
2. improve the VDS implementation to support multi-VDS
3. abandon the Nestedisplay, using VDS to sharing hyper dmabuf
Jira: https://jira01.devtools.intel.com/browse/OAM-63356
Tests: function test on Android
Signed-off-by: xue.yifei <yifei.xue@intel.com>
Lin Johnson [Thu, 16 Aug 2018 14:42:22 +0000 (22:42 +0800)]
Should check input parameters for function GetDisplayConfigs
Jira: None
Tests: Compile and run for Android
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Mon, 13 Aug 2018 03:19:58 +0000 (11:19 +0800)]
QueueUpdate refractory: add separate function for overlay layer initialize
This help to reduce the lines of QueueUpdate functions
Jira: None
Tests: Compilation and HWC works normal in Android
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Yuanjun Huang [Tue, 14 Aug 2018 08:07:19 +0000 (16:07 +0800)]
Add RBC enabled log.
This is for the RBC feature test case, providing information to
indicate if RBC is working.
Jira: https://jira01.devtools.intel.com/browse/OAM-65434
Tests: test on APL.
Signed-off-by: Yuanjun Huang <yuanjun.huang@intel.com>
Kelly Ledford [Mon, 20 Aug 2018 19:11:34 +0000 (12:11 -0700)]
Remove ResourceManager comment
Comment applies to ResourceManager class located in
common/core/resourcemanager.h, not to the FrameBufferManager class.
Jira: GSE-1575
Tests: None
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
renchenglei [Sun, 5 Aug 2018 16:13:01 +0000 (00:13 +0800)]
Ensure last plane valid when calling IsVideoPlane
This help fix the crash when running Antutu 7.x. If function
GetLastUsedOverlay didn't return a valid value, HWC would crash
with "null pointer dereference" when calling IsVideoPlane function
Jira: OAM-67193
Test: Antutu 7.x won't have HWC crash
Richard Avelar [Wed, 1 Aug 2018 17:30:43 +0000 (10:30 -0700)]
Add documentation to logicaldisplaymanager.h
This patch adds documentation for doxygen for the file
logicaldisplaymanager.h
Jira: GSE-1575
Tests: Run Doxygen
Signed-off-by: Richard Avelar richard.avelar@intel.com
Richard Avelar [Wed, 8 Aug 2018 20:08:02 +0000 (13:08 -0700)]
Add file command to documented files
The \file command at the top of a file allows doxygen to know
the file is documented and the documentation should be used in the
generation of documentation output to html/latex
Jira: GSE-1575
Tests: Run Doxygen, examine file tab page in html
Signed-off-by: Richard Avelar richard.avelar@intel.com
Richard Avelar [Mon, 30 Jul 2018 17:24:09 +0000 (10:24 -0700)]
Add note to doxy installation instructions readme.
Since we are using the HAVE_DOT option in the doxygen config file,
we should make a note to the user that they may need to install
graphviz if they do not already have it installed on their machine.
Tests: Run Doxygen
Jira: None
Signed-off-by: Richard Avelar richard.avelar@intel.com
Kelly Ledford [Thu, 2 Aug 2018 18:07:49 +0000 (11:07 -0700)]
Add support for future doxygen comments in both *.h and *.cpp files
With these changes, every file will be listed, but only those files that
contain doxygen comments will be available for viewing. Each *.h or *.cpp with
doxygen comments will contain the \file command, indicating to doxygen that
comments should be parsed within the file and displayed.
Jira: GSE-1575
Tests: Run Doxygen
Signed-off-by: Kelly Ledford <kelly.ledford@intel.com>
Michele Lim [Tue, 7 Aug 2018 20:06:24 +0000 (13:06 -0700)]
Omit extraneous metadata copy in DrmBuffer and replace image_
metadata parameter handler with shorthand METADATA(x).
DRM buffer details such as width, height, pitch, etc are already
present in the image metadata. Reference the HwcBuffer image
metadata handle instead to eliminate unnecessary copying.
METADATA(x) macro serves the purpose of improving code
readability.
Jira: GSE-1509
Test: Tested on KabyLake NUC
Signed-off-by: Michele Lim <michele.lim@intel.com>
Kevin Strasser [Thu, 26 Jul 2018 03:40:23 +0000 (20:40 -0700)]
Travis overhaul
There are a number of improvements here, many inspired by the upstream Mesa
script. The main focus is isolating build variations and using official release
archives wherever possible.
Jira: None
Test: Check that Travis is all green
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Lin Johnson [Thu, 2 Aug 2018 03:49:37 +0000 (11:49 +0800)]
Fix virtual display regression
caused by
b6ff1590f362fefadbc0ad3b3128fef9895e28be
virtual display and nested display should have fb_manager in
constructor because compositor is intialized in constructor
Jira: https://jira01.devtools.intel.com/browse/OAM-67091
Tests: virtual display on Android P GP2.0
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Mon, 30 Jul 2018 15:15:37 +0000 (23:15 +0800)]
Android: workaound for 3 display underrun issue.
Without modificator no serious unerrun when
3 display in use
Need to revert this when root fix in kernel
Tests: 3 display in Android clone mode or mosaic mode
Jira: None
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Kevin Strasser [Tue, 3 Jul 2018 20:30:16 +0000 (13:30 -0700)]
Add doxygen config and document some of the public APIs
The APIs defined in the public headers represent the boundary between core
IA-Hardware-Composer and the platform specific implementations. Start adding
documentation to help specify the expected API behaviors.
Jira: GSE-1575
Test: doxygen Doxyfile
Test: firefox html/index.html
Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Michele Lim [Wed, 18 Jul 2018 01:45:11 +0000 (18:45 -0700)]
Fix hwcomposer ANDROID_VERSION parser
Current parser yields the major version only and not the
ANDROID_VERSION as intended. This fix first evaluates the
major version, which is then used to map to the corresponding
ANDROID_VERSION correctly.
Jira: GSE-1615
Test: Compiled successfully on Celadon
Signed-off-by: Michele Lim <michele.lim@intel.com>
Richard Avelar [Wed, 18 Jul 2018 20:38:25 +0000 (13:38 -0700)]
Add documentation for framebuffermanager.
This patch is meant to add documentation to the file framebuffermanager
in anticipation of the doxygen patch that will be added. If you have
any feedback or comments on the documentation in this patch feel free
to comment below. Hopefully we can add enough documentation throughout
the project that'll promote increased open source contributions.
Jira: GSE-1575
Test: doxygen Doxyfile and generated index.html
Signed-off-by: Richard Avelar richard.avelar@intel.com
Richard Avelar [Thu, 19 Jul 2018 21:58:39 +0000 (14:58 -0700)]
Add documentation information to the readme.
This patch adds instructions on how to add documentation to the
project.
Jira: GSE-1575
Test: None
Signed-off-by: Richard Avelar richard.avelar@intel.com
Lin Johnson [Fri, 20 Jul 2018 05:17:07 +0000 (13:17 +0800)]
Clone mode: it should also ammulate fence to HwcLayers
Jira: None
Test: Clone mode works fine
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Thu, 19 Jul 2018 01:44:13 +0000 (09:44 +0800)]
Clone mode: Add remove_index and add_index logic to avoid
crash in GetCachedLayers.
Jira:OAM-65548
Tests: 3 diaplay clone mode works on GP2.0
Lin Johnson [Thu, 19 Jul 2018 06:19:40 +0000 (14:19 +0800)]
Varenderer: fix code error
'break' should be add in switch case
Jira:None
Test: Video rotation on all directions(no mirror)
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Lin Johnson [Thu, 19 Jul 2018 01:16:18 +0000 (09:16 +0800)]
HWC layer set release fence should accumulate fences
instead of just replace it
This fix potential mosaic mode bug
Jira:None
Tests: Mosaic mode works fine
Signed-off-by: Lin Johnson <johnson.lin@intel.com>
Harish Krupo [Fri, 13 Jul 2018 12:01:29 +0000 (17:31 +0530)]
Weston: Migrate to head based API
Jira: None
Test: Weston boots up properly and no regressions seen.
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Harish Krupo [Mon, 9 Jul 2018 08:44:36 +0000 (14:14 +0530)]
Hwclayer: Don't transform when full damage
When the surface damage rects set are 0, the surface_damage_
is equal to the display_frame_. Dont apply transformations in
this case.
Jira: None
Test: Cube test in ApiDemos on android renders correctly
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Harish Krupo [Fri, 29 Jun 2018 05:34:49 +0000 (11:04 +0530)]
MosaicMode: return more reliable fences
Currently we pick a display with the maximum refresh rate
as the preferred display and return its fence.
Instead, merge the fences from all the displays and return it.
Such merged fences are signaled only when all the individual
fences are signaled.
Jira: None
Test: No regressions seen on Linux and Android
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Harish Krupo [Fri, 29 Jun 2018 04:11:19 +0000 (09:41 +0530)]
Fix Klockwork indirect path traversal issue.
Jira: None
Test: File path on
Android: /vendor/etc/hwc_display.ini
Linux: {prefix}/etc/hwc_display.ini
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Harish Krupo [Tue, 12 Jun 2018 20:58:26 +0000 (02:28 +0530)]
HwcLayer: Apply rotation transformation to damage.
This enables us to remove the workaround in Overlaylayer.
Jira: None
Test: No regressions seen on Android and Linux.
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>
Harish Krupo [Sun, 24 Jun 2018 11:21:21 +0000 (16:51 +0530)]
Fix missing mapping for display_transform
Currently the display transform set in the hwc_display.ini file
is according to the HWCRotation enums but the values expected in
Validate transfrom are 0,4,8,16. Instead of directly mapping 0..3
to 0,4,8,16, accept 0..3 as inputs as it simplifies the calculation
of the final plane rotation because 0..3 forms a circulant matrix
over modulo 4 arithmetic.
Jira: None
Tests: If the requested layer rotation if 0 degree and the display
rotation set in ini file is 90 then the final rotation should
be 90 degrees.
Signed-off-by: Harish Krupo <harish.krupo.kps@intel.com>