Commit Graph

136 Commits

Author SHA1 Message Date
Courtney Goeltzenleuchter d1c08b13d3 Fix Buffer Overflow in Vendor Service display.qservice
Bug: 63145942
Test: adb shell vndservice call display.qservice 36 s16 sdlkfjsadlfkjasdf
Change-Id: I3fdf5ccd2bf4ed0fa980883fefdb57eb5fbfeee7
(cherry picked from commit 4050091844)
2018-07-27 18:43:41 +00:00
Gousemoodhin Nadaf 0296371991 hwc2: Night light causes major stuttering.
- Initialize transform matrix with an identity matrix.
- Use matrix when mode map is empty.
- Do not reapply mode if it is the same as before.
- Do not reapply hint if it is the same as before.

Bug: 68721781
Change-Id: Iac6d76ceded65b8527abf0b0f26ffc76479e5db9
2018-05-24 16:04:21 -07:00
Naseer Ahmed 1ff191fed3 hwc2: Skip validation fixes
* Disable skip validation for solid fill during calibration.
* Require validation when the client changes the composition type

Bug: 77925367
CRs-Fixed: 2122072
Change-Id: I9ded200e5c15701f653c73d67c18c41de8278d52
2018-04-18 12:45:46 -07:00
Mark Salyzyn 96a73c98ee msm8998: deprecate cutils/log.h
Replace cutils/log.h with log/log.h.  Fix up header ordering.

Test: compile
Bug: 34250038
Change-Id: Ib9d9f9919e6a220205014c2f720f7b9633e1bc87
2017-12-19 10:00:55 -08:00
Yi Kong eb53b91b46 Merge "Remove unused variable"
am: 02880f6383

Change-Id: I45affa7c1da94e926788e5af99d88a1253531733
2017-12-05 00:38:45 +00:00
Yi Kong 3a1e361a56 Remove unused variable
Discovered by the upcoming compiler update.

Test: build
Change-Id: Ibe04228dfa03b82f7d0f86cf2c4a3bb90dd68792
2017-12-04 14:24:50 -08:00
Dan Albert 4a3f1227a9 Add missing includes. am: 726ab4f0c1
am: 4d23cad8bb

Change-Id: Ic2f35fe6eef6e731988f9a6449966af11f1a4761
2017-10-17 08:44:12 +00:00
Dan Albert 726ab4f0c1 Add missing includes.
Test: mma
Bug: None
Change-Id: I945e22b606e0ed3b944ac2bc352b13ed9a73ed7d
(cherry picked from commit 6a8d7abeb4)
2017-10-17 07:58:14 +00:00
Arun Kumar K.R bf533c115a sdm: Handle invalid layers in Dump
Check for invalid layer or layer buffer in dump and handle
gracefully.

Bug: 63113833
Change-Id: I98aaf2b868a98687e715796b3eebb5dabde719bb
2017-08-28 16:06:50 -07:00
Naseer Ahmed d8991a4624 hwc2: cursor fixes
* Treat cursor layers as device layers
* Reject incorrect setCursorPosition calls

Bug: 62992393
Change-Id: Icebc268d1429324f198691cee7aa1737d1a54081
2017-08-23 15:48:43 -07:00
Naseer Ahmed 985b4e311a hwc2: invalidate on format change am: dd6edac0dc
am: 110d13c815

Change-Id: Idff7439d1250c66dc177e5aeb61db4dfb78118f0
2017-06-28 23:19:04 +00:00
Naseer Ahmed 110d13c815 hwc2: invalidate on format change
am: dd6edac0dc

Change-Id: Ia9a0adc02f56caee007422d7cb247b6dfabb743f
2017-06-28 23:14:03 +00:00
Naseer Ahmed dd6edac0dc hwc2: invalidate on format change
Bug: 62999638
Change-Id: I7a59c9f5a104637a7e61af04682f1239b09d4dcf
2017-06-28 10:37:33 -07:00
Naseer Ahmed d9a9a78afb hwc2: Reset layer flags in SetLayerBuffer am: 26aafb60e0
am: 0a0cfb1377

Change-Id: Ib8407b68763d73c7f1bd71fd5ef91c0f2543c62f
2017-06-24 03:30:47 +00:00
Naseer Ahmed 0a0cfb1377 hwc2: Reset layer flags in SetLayerBuffer
am: 26aafb60e0

Change-Id: If2868ac3005314cf74d37c9e5913c10ad66b8402
2017-06-24 03:28:47 +00:00
Naseer Ahmed 26aafb60e0 hwc2: Reset layer flags in SetLayerBuffer
Bug: 36511863
Test: Verified with demo-noExtensions-debug.apk, YouTube
Change-Id: I0e3fcffebfcc41943b0830abcbb5c32249fe3d6d
2017-06-23 18:31:16 -07:00
Naseer Ahmed d813484dc1 msm8996: More checks for skip validate
am: b1c242f15a

Change-Id: If41d07821f5bb25ec25709aa8842cd1f2d767d6f
2017-06-22 22:10:21 +00:00
Naseer Ahmed 6cc49a1b8c msm8996: More checks for skip validate
am: b1c242f15a

Change-Id: Ie9930d1ed93f4abb8e173634e279624377bbf143
2017-06-22 22:10:21 +00:00
Naseer Ahmed b1c242f15a msm8996: More checks for skip validate
* Require validate on power transitions
* Reset retire fence after programming the client with it.

Bug: 37474580
Bug: 62897896
Test: manual
Change-Id: I8fa48cc872edf92811b9d3f56e4787f485c42c10
2017-06-22 14:58:10 -07:00
Naseer Ahmed 867f69008c sdm: hwc2: Support Skip validate feature
am: 503cff39e9

Change-Id: I8479693cb60b7b3e3e05a6e552439d8f1a881fc7
2017-06-22 05:58:10 +00:00
Naseer Ahmed ebb1024364 sdm: hwc2: Support Skip validate feature
am: 503cff39e9

Change-Id: I6ae05026d332854f4d51a44bf5316b14aa6454ce
2017-06-22 05:57:20 +00:00
Naseer Ahmed 503cff39e9 sdm: hwc2: Support Skip validate feature
1. SF skips ValidateDisplay call, when the layer geometry attributes
   have not changed for any of the layer, as compared to last frame.
2. In case of Surface Damage update on a layer, SDM needs a Validate
   call to program SDE driver for Partial Update feature.
3. SDM needs Validate call to enter in safe Mode for use cases like
   Idle/Thermal fallback, HDMI and Virtual Connect/Disconnet, etc.
4. Set HWC2_CAPABILITY_SKIP_VALIDATE cap in GetCapabilities api.

b/37474580
b/62806392

Test: marlin, ryu

Change-Id: I68f0db3af16afa4ad4eb789cd1f6b12caf6381e4
Acked-by: Sushil Chauhan <sushilchauhan@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-06-22 04:47:45 +00:00
Naseer Ahmed d6751d55a6 gralloc1: Support GRALLOC1_CAPABILITY_RELEASE_IMPLY_DELETE
v2: Handle buffers allocated outside gralloc with flag
PRIV_FLAGS_CLIENT_ALLOCATED.

CRs-Fixed: 2041607
Bug: 36355756
Change-Id: Icb0c4b724f7bf7097812f6306fb0b9a56bb790a9
2017-06-16 01:50:18 +00:00
Naseer Ahmed 2aeb8fd42c msm8996: hwc2: Cache dataspace am: 1cbdfaa988
am: e43dde050e

Change-Id: I7ea7b03077ca8074444e1638d21eba9814e4b0ba
2017-05-31 21:35:06 +00:00
Naseer Ahmed e43dde050e msm8996: hwc2: Cache dataspace
am: 1cbdfaa988

Change-Id: I48122f3ae7eb1d28504d192a62b13d9609f965f4
2017-05-31 21:24:39 +00:00
Naseer Ahmed 1cbdfaa988 msm8996: hwc2: Cache dataspace
Avoid setting the geometry changed flag when the dataspace is the
same.

Bug: 38396128
Test: Manually checked systraces on Pixel
Change-Id: I80561ddf43356514616d1132a293b43a6138541d
2017-05-30 16:01:21 -07:00
Naseer Ahmed d60aa476c2 hwc2: Remove power manager dependency
am: a4094dfb63

Change-Id: I641c472735fde04c346a061842172d75622ca2e8
2017-05-26 18:52:27 +00:00
Naseer Ahmed a4094dfb63 hwc2: Remove power manager dependency
Bug: 37471448
Test: sailfish boots
Change-Id: I1e4777a8f07f2def4abd9b28f96c10bb0ccb1f7f
Merged-In: Ibcddc7fc8f04b530fc7d96080d4d6c2025e76db7
2017-05-25 15:17:15 +08:00
Naseer Ahmed 8ad51bbf67 hwc2: Remove power manager dependency
Bug: 37471448
Test: sailfish boots
Change-Id: Ibcddc7fc8f04b530fc7d96080d4d6c2025e76db7
2017-05-18 15:07:31 +08:00
Yi Kong 22b24c4bc4 Merge "Add const specifier to SortLayersByZ comparator" am: 42ea1de680 am: 34773c848e am: f3e8e72aa2
am: d63ab1f229

Change-Id: Ib0316d7e7780c97922ee6058e3b03c4b3c516782
2017-05-16 01:55:29 +00:00
Yi Kong d63ab1f229 Merge "Add const specifier to SortLayersByZ comparator" am: 42ea1de680 am: 34773c848e
am: f3e8e72aa2

Change-Id: Ic7479cb3fefff4affba52a736959d35b1771f90e
2017-05-16 00:00:26 +00:00
Yi Kong 30b87faa15 Add const specifier to SortLayersByZ comparator
No functionality change.

Test: build
Bug: 37752547
Change-Id: If44b57f447ffc04c78b07c9550d71663944ee0b0
2017-05-12 15:16:55 -07:00
Naseer Ahmed 8aff625057 msm8996: hwc2: Remove ubwc property check for framebuffer am: 1b9f01b6fe
am: 11219199f2

Change-Id: I06bf9afab21846f1bdd25f4603d2f66b71e2f81e
2017-05-05 06:04:28 +00:00
Naseer Ahmed 1b9f01b6fe msm8996: hwc2: Remove ubwc property check for framebuffer
This debug property is used for bringup and was never set in
gralloc1, causing a mismatch in the client target format between
gralloc and HWC.

Bug: 37317019
Change-Id: I15e8925b34d0947fe870b0708783afa0145e1db7
2017-05-04 16:48:33 -07:00
Courtney Goeltzenleuchter 7696e44753 Merge "Revert "hwc2: Default handling for dataspaces"" into oc-dev am: f02a0f9de3
am: 3ba23c83b4

Change-Id: I13fa6a60da32e222d1754df498ea5d3c7c0a72e9
2017-05-04 13:45:00 +00:00
Courtney Goeltzenleuchter f02a0f9de3 Merge "Revert "hwc2: Default handling for dataspaces"" into oc-dev 2017-05-04 13:35:52 +00:00
Courtney Goeltzenleuchter 4e2684df50 Revert "hwc2: Default handling for dataspaces"
This reverts commit 834a06c753.

Reason for revert: 37438481
Causing an increase in power when playing videos.

Change-Id: I28fa7720e4f578bee101f46278f25f1eb6c7e880
2017-05-03 22:19:28 +00:00
TreeHugger Robot 709b5fa2ce Merge "Fix SDM error regarding 10:10:10:2 pixel formats" 2017-04-28 21:52:11 +00:00
Courtney Goeltzenleuchter 22e1ce0bdb Fix SDM error regarding 10:10:10:2 pixel formats
Test: adb shell /system/bin/test-opengl-wide-color
Bug: 37309976
Change-Id: Iaf970f71234d5b87068bb2d35006ffde2241332a
2017-04-28 10:09:22 -06:00
Naseer Ahmed 2af9d88538 sdm: color-manager: Clear feature list when add new feature
Delete the original feature in feature list when new feature is
added. This is to avoid memory leak when display features are set
without display commit.

Bug: 37546588
Test: night light, crashing SF, and manual
Acked-by: Xu Yang <yangxu@codeaurora.org>
Change-Id: I01258554d4f66aa00dce4a71ef11fe09464844c2
2017-04-27 14:58:29 -07:00
Steve Pfetsch fb05e427e1 Merge changes Ic983a232,I0ffc2fb8,Ib6c7d3af into oc-dev
* changes:
  hwc2: Do not delete hwc_session
  hwc2: Fix buffer allocator usage
  hwc2: End uevent thread in hwc_close
2017-04-12 00:20:32 +00:00
Naseer Ahmed fd72def91c display: Use getMetaData in hwc2
Use getMetaData API to get the metadata information in hwc2.
As it maps the metadata in the process before accessing it.

b/35955598 registerBuffer and unregisterBuffer use galloc_map and
	   gralloc_unmap incorrectly

Test: marlin
Change-Id: I346d223058e6eadb00f16bb9f2be8a46e87fbdef
Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2017-04-11 13:35:31 -07:00
Naseer Ahmed 3638ebaee3 hwc2: Do not delete hwc_session
HWC session is derived from hwc2_device and is deleted by
libhardware.

CRs-Fixed: 2023877
Bug: 34206930
Change-Id: Ic983a232f0ca417c0b47d5ea3c59e7374d7e7fea
2017-04-11 12:17:38 -07:00
Naseer Ahmed b5950b4045 hwc2: Fix buffer allocator usage
Make sure the hwc buffer allocator is created at one location.

CRs-Fixed: 2019502
Bug: 34206930
Change-Id: I0ffc2fb886431d8155c3bc2c112178cc413df54b
2017-04-11 12:17:38 -07:00
Naseer Ahmed 56e7134a25 hwc2: End uevent thread in hwc_close
uevent_next_event blocks until the next event from the
kernel, which we don't intend to handle when we're closing the
hwc session. Cancel the uevent thread during shutdown.

Bug: 34206930
Change-Id: Ib6c7d3af3c17aa010c37b94a9f4c846e19c7f091
2017-04-11 12:17:38 -07:00
Naseer Ahmed 834a06c753 hwc2: Default handling for dataspaces
Code wants dataspace to be bitfields with separate transfer,
range and such. Was getting confused with legacy dataspaces that
don't have that info. So, translate to keep code happy.

Test: Play netflix or movie in Google Play movies.
Bug: 35985399
Change-Id: Idb4aa9914da2f843cf76160afb337365c3c39ea2
2017-04-06 18:31:45 -06:00
Naseer Ahmed 600d5f2209 hwc2: Support displayp3 modes
Test: adb shell /data/nativetest64/libgui_test/libgui_test --gtest_filter=SurfaceTest.GetWideColorSupport
      Verify that list of color modes includes Display-P3
Bug: 36219389
Change-Id: Ica5cfcf4b0e389e812f6fca5774190ddec8e9c72
2017-03-30 11:13:20 -06:00
Naseer Ahmed 6457d5b6b5 sdm: enable gralloc1 from hwc2
Add support for hwc2 to call into gralloc1

CRs-Fixed: 2007392
Change-Id: Iade3b7cba7d3b99685530a8f4dcde67228e78f68
2017-03-24 00:28:11 -07:00
Naseer Ahmed f13f2213ee gralloc1: Add remaining functionality
* Use private_0 flag
* Add some legacy flags to be used during transition
* Fix gralloc module version
* Adjust makefiles for gralloc1
* Add support for dump, num flex planes and lock flex.
* Use a unique ID for buffer descriptors
* Do not delete buffer handle, fix after verifying framework fix.
* Current gralloc1 clients do not conform to the lock()
requirement
in the gralloc1 header. Tracked in b/33588773
* Add perform APIs to get the buffer size  and allocate a buffer
for use by SDM
* Fix reference counting
* Add a unique buffer ID
* Some cleanup in private_handle
* Create a wrapper class of private_handle to do refcounting
* Resolve implementation defined formats At allocation time,
update buffer
descriptors to replace implementation defined formats with the
ones we mean
to allocate
* Defer ion handle release
* Remove unused drm code.
* Add legacy constructor for private_handle_t used by some
clients
* Add FP16 support
* Add Dump() in buffer manager
* Use handle as map key
* Drop ZSL check
CRs-Fixed: 2007391
Change-Id: Iaf843d93c031839d90403cc2e6927b516aedd354
2017-03-24 00:27:26 -07:00
TreeHugger Robot 10fb82d862 Merge "Move some qcom libraries to vendor partition" 2017-03-09 04:51:15 +00:00