Commit Graph

54 Commits

Author SHA1 Message Date
Ben Fennema d39a514dd0 display: msm8909w caf release LW.BR.4.0-00800-8x09w.0 for SD2100.
MSM8909W display HAL code copied from CAF release LW.BR.4.0-00800-8x09w.0.

Bug: 79356346
Test: build
Change-Id: Ie801976595c8ed9164b0d91737f5daf40764d8a6
Signed-off-by: Ben Fennema <fennema@google.com>
2018-05-08 14:36:40 -07:00
Tim Kryger 26105d8c60 hwcomposer: Work around overzealous fortify checks
Storage for six pollfd structs is allocated on the stack in a 2d array.
Subsequently, the address of the first element is passed to poll along
with the same total number of fds.  At this point, the fortify dynamic
checker, considering only one of the dimensions of the array, throws an
error and warns that array is too small.  Since the array is actually
sized appropriately, use a reinterpret_cast to subvert the checker.

Bug: 77323983
Change-Id: Ib88c5a00bc84b3d05be95baf57df5f522a769da4
2018-03-30 16:12:40 -07:00
Erik Wolsheimer 286449a94b Make hwc_vsync thread realtime
Bug: 68395248
Change-Id: I4ac93464aa2ccf416577b4067ed658b525089983
2018-03-29 14:08:07 -07:00
Alexey Polyudov 3756b400ce Use libhwui.so instead of libskia.so
Change-Id: Ie60ee11910f7e0b2da20e8634c38265e86b5742c
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2018-02-27 14:05:59 -08:00
Martin Brabham 0a489f6722 Include string.h
libgralloc: strerror needs string.h
libqdutils: strerror needs string.h
libcopybit: memcpy needs string.h

Bug: 72343089
Change-Id: I36226fd656d26c4d0486d1c99f2317376c0d08dd
2018-01-22 20:37:22 -08:00
Chih-Hung Hsieh 6fd2d4bb57 Add -Wno-error to compile with global -Werror.
Bug: 66996870
Test: normal builds.
Change-Id: Iee4ac5f95a2013c5eeac1c061889a593caf0ec36
2018-01-04 12:09:30 -08: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
Xin Li 43e07f20da Merge commit 'e458e16debbc9068c839ce918b2e039d7efefaed' into HEAD
Change-Id: If5aaf83103dc48a2efa6c242e55e78da18bec6d2
2017-11-13 14:35:40 -08:00
Chih-Hung Hsieh 1cdcad27c9 Use -Werror in hardware/qcom/display
* Add missing include $(LOCAL_PATH)/../common.mk and -Werror.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I8cd29680bb623343a0dcac9e541b86a339b5a7c7
2017-11-06 16:03:31 -08:00
TreeHugger Robot 80cb4abfd4 Merge "gralloc: backport 1010102 and FP16 support to 8909w" into oc-mr1-dev 2017-08-18 00:54:33 +00:00
Madhuri Athota 5a706e9d4a gralloc: backport 1010102 and FP16 support to 8909w
Bug: 62237223
Test: cts -m CtsHardwareTestCases -t
android.hardware.cts.HardwareBufferTest#testCreate
Change-Id: I3ae124028ef54ace103efc93f47f37dae97ca376
(cherry picked from commit 2a62b0769eae26b5b1c97b35e632403e24f7254b)
2017-08-17 20:20:08 +00:00
Madhuri Athota 171ab80f52 sdm: Remove unused property from gralloc
Bug: 64613045
Change-Id: I5eab85729ae2ce5b448d275ea00d206ee3160164
(cherry picked from commit e82f1d1b299c2b2f88746729720bf73970321a24)
2017-08-17 20:19:53 +00:00
Ajit Kumar 0f511585b9 libmemtrack: Fix fd leak in kgsl function
Added code to close fd for error cases in kgsl
function to prevent possible leak in fd.

Change-Id: Idcceacb5aa19a269ad187e668ed4fbc5280fcd24
2017-07-14 13:47:36 -07:00
Ajit Kumar 9e454ef658 libmemtrack: Fix integer overflow in kgsl function
In the kgsl function which gets memory info for a
pid, there could be possibility of integer overflow
in operations with size, mapsize, accounted_size,
and unaccounted_size due to which result might be
smaller than these values. External inputs size and
mapsize are verified, and overflow check has been added.

Change-Id: Ic511f92574d80e0d596975db16a43787699ae543
2017-07-14 13:47:36 -07:00
Ajit Kumar 8ac6f5bad2 libmemtrack: fix ion memory tracking
Use 2 new columns from the kgsl debugfs mem file:
egl_surface_count: # of buffer attachments with usage=egl_surface
egl_image_count:   # of buffer attachments with usage=egl_image

If an ion buffer is mapped with usage=egl_surface, the entire size will
be counted towards the egl_surface. The assumption is that the buffer
will be freed if the producer process is killed.

To handle buffers such as the wallpaper and texture atlas which have
no producer and are potentially mapped multiple times, assign each
process where usage=egl_image a size of "size / egl_image_count". This
ensures that the total memory usage is correct, while still assigning
some memory to each process which maps the buffer.

The above replaces the attempts to avoid double counting buffers using
the "is_surfaceflinger" check.

Change-Id: Icd2dc230edb6b5beb7a20dad45d2d066e9e4d623
2017-07-14 13:47:36 -07:00
Ajit Kumar 08a008ea03 libmemtrack: Update parsing of kgsl mem file
The mem file now has additional field, the mapsize. This
represents the size in bytes mapped to userspace. Use this
value and total size of an object to derive the unaccounted
size.

Change-Id: I36b03e49f431f11db7b06f1366cd37d264381747
2017-07-14 13:47:36 -07:00
Ajit Kumar 7dae3de110 libmemtrack: Properly account for memory usage
Do not count the memory usage for egl_surfaces since its used
as egl_image in surface flinger.

Change-Id: I1be3b339080eb352f41a7bedd615ddfe0c2aa04c
2017-07-14 13:47:36 -07:00
Ajit Kumar 66a04c6a91 libmemtrack: Update the parsing of flags field
The length of flags field in kgsl debugfs mem file has changed
from 7 to 8. Hence, change the parsing in libmemtrack accordingly

Change-Id: Ia94ee7b41a7903badc42851a05c61940ece67ef5
2017-07-14 13:47:36 -07:00
Jiyong Park da9d9de59c Move QCOM HALs to vendor partition
In order to build generic system image that is agnostic to SoC or
device, such HALs should be moved from system partition to vendor
partition.

HALs moved: copybit, gralloc, hwcomposer, light, memtrack, hdmi_cec

Bug: 34826389
Bug: 35232083
Test: build & run and check whether the HAL is loaded from
/vendor/lib[64]/hw.
$ su; lsof | grep hwcomposer

Change-Id: I2bb617ac71ab040a5b1ba306c194e8672ac84561
2017-02-24 13:53:21 +00:00
Mathias Agopian 2e3a46c539 fallout of splitting rect.h out of libandroid.
Some makefiles didn’t specify libui but included 
headers from it directly, and they didn’t even
need them.

It works because these headers are on the global
include path. With this change, though, rect.h
is not anymore (albeit exported from libui).

Test: built and booted device
Bug: 35164655
Change-Id: Ib2de5e5a2f86bd857e12861bb6fc5e4739ff185a
2017-02-16 14:31:11 -08:00
Dan Willemsen 8205cdbdee Merge "Fix duplicate copy file rules (extend the fix to remaining devices)" am: 73b6bde662 am: e43c8fe979 am: 41927a77be
am: aa53ecf427

Change-Id: I5cfdbc7d239842333ce2914279da0516a1da8158
2017-02-03 22:48:22 +00:00
Dan Willemsen 89d91d8c13 Fix duplicate copy file rules (extend the fix to remaining devices)
If these libraries are built, both BUILD_COPY_FILES and
BUILD_SHARED_LIBRARY would copy the headers. This would create a warning
because multiple rules would define the same target header file.

Bug: 27302058
Change-Id: If91bd70d2320aaaee9679642ff9ea48b99739cbd
(cherry picked from commit b360857e92)

Test: building SonyAOSP with this removes the warnings
2017-02-03 10:02:16 +00:00
Dan Albert 4a797eb2a0 Merge "Fix -Wmacro-redefined werror issues." am: 3d4d976af2 am: 06d4d81212 am: 2e84083ef7
am: 33fc66f8e7

Change-Id: I24da518a22bc0dc4b03adcffbae7d7c7d378c89f
2017-01-31 03:49:45 +00:00
Dan Albert 789f042d3c Fix -Wmacro-redefined werror issues.
The libc++ defines this (wrapped in ifndef, like this should have
been), so including a libc++ header and then defining this results in
a werror failure. Define this in common.mk so we can be sure it does
get defined, but also that it gets defined early enough that anyone
defining this in source wrapped with ifndef doesn't get broken.

Test: mma # on angler
Bug: http://b/34740564
Change-Id: Id7d70a6ad5e530390eb8b37e5e618312d1d7e6dc
2017-01-30 17:54:29 -08:00
Alex Naidis 9fe2840616 Merge "hwcomposer: Fix regression in hwc_sync" am: a0de1d3cc3 am: 9e5907e6b4 am: e93a5f5337
am: 47cec256dd

Change-Id: I5c43ac8f3717c291e33504af5047022c05eedcbf
2017-01-05 04:10:17 +00:00
Alex Naidis 5936d78c2a
hwcomposer: Fix regression in hwc_sync
Hwc_sync is in the hotpath of display
rendering and gets called every ~17ms
during active rerendering.

Reading the property "debug.egl.swapinterval"
on every execution of hwc_sync causes a major
regression where the execution of hwc_sync
is much slower than it can be.

Doing I/O in hotpaths is inacceptable
and can cause an unnecessary constant
I/O load, additionally to the slowdown
in display rendering which was caused
in this case.

As solution, we condition this debugging
feature with "DISPLAY_DEBUG_SWAPINTERVAL",
so it can be enabled when explicitly needed.

Gralloc is not directly affected by the regression,
it was adjusted to match the conditioning
of the swapinterval debugging feature.

The HALs of msm8084,msm8226,msm8909,msm8960 and
msm8994 are affected by the regression and
get patched by this patch. Newer HALs
are not affected.

The stats contained in this patch were
collected using a Nextbit Robin (MSM8992),
which uses the msm8994 HAL.

Test: Manual testing for proper conditioning.
Test: Running full CTS suite without DISPLAY_DEBUG_SWAPINTERVAL set.

Change-Id: If08595d37ac0c1a19edd8d296289a21c9f95512a
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2016-12-27 16:38:36 +01:00
Hal Canary 8e9bbcb6fe SkImageEncoder->SkEncodeImage
Test: none
Change-Id: Idec9438683b4e542dca662b958368190faece7b6
2016-11-24 20:18:33 -05:00
Ariel Gertzenstein 7cba357a9b Fix compiler errors.
Change-Id: Ia67a2e8160a1edea4461b99f8cbdfd1890355786
2016-11-14 14:21:57 -05:00
Uday Kishore Pasupuleti f110f7c19e hwc: Do GPU fall back for layer transforms
MDP composition with rotation and unaligned ROI results iommu page faults.
Use GPU composition to for rotation to avoid iommu page faults.

Bug: 30971681

Change-Id: I10d3eacfeda98578619bfc73808322fd490c8044
Signed-off-by: Uday Kishore Pasupuleti <upasupul@codeaurora.org>
2016-09-01 12:49:59 -07:00
Sachin Bhayare 30bff23e04 hwc: add venus color format support for msm8909w
Add VENUS_COLOR_FORMAT support in hwc to enable video use cases.

Change-Id: Ieeca8fab302104cb057b3862c0905e8ea7d15980
2016-08-15 17:35:25 -07:00
Tom Cherry 8dc0cd64d6 gralloc: Make Invalid handle debug print an error
Bug: 30483149
Change-Id: I39bae654828236e1d58021b8f98675d2aef21775
2016-08-09 14:16:35 -07:00
Tom Cherry 338be396b5 gralloc: Add missing va_end()
Add missing va_end() and additionally extra protection in the
deconstructor in case of use after free.

Bug: 30483149
Change-Id: Ib28c6312b67654e19d89c7b9acf03f26a8640ad3
2016-08-09 14:15:33 -07:00
Sachin Bhayare f50a29c097 libqdutils: stub HDMI calls for 8909w am: 7b5813989d
am: 885b84e0b2

Change-Id: I39d847d98ca6675bc4b199c8b72d09c7057ce633
2016-07-07 18:49:21 +00:00
Sachin Bhayare 7b5813989d libqdutils: stub HDMI calls for 8909w
Stub out getHDMINode and getEdidRawData for 8909w.
This will avoid error messages from above functions.

Change-Id: Ief2dd8907de15d7320a3d0b5b1880356edf322f8
Signed-off-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
2016-07-06 17:19:09 -07:00
Alain Vongsouvanh 3072e9633b resolve merge conflicts of 0a4d0a1 to nyc-dev
Change-Id: I90f2d1d1c2798d0f6b1c9fe87663893790af9edb
2016-05-23 13:58:49 -07:00
Sachin Bhayare 35bc51c90d display: Enable clang for all display modules
Add clang support for display modules and fix error identified by clang.

Change-Id: I8e62ce5773c675e50ef9f4c82ae588ff0ec7ff67
Signed-off-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
2016-05-17 13:43:40 -07:00
Sachin Bhayare b3bd63b838 hwc: Add stubs for hdmi calls for MSM8909w am: 3c1deabe5c
am: 5fef5a7136

* commit '5fef5a7136abbf082d0a5ae3c051dc7b8334cd68':
  hwc: Add stubs for hdmi calls for MSM8909w

Change-Id: Ifc0b8089cedbf04a7f340c3d8c796847cd492ec5
2016-05-17 18:22:45 +00:00
Sachin Bhayare 3c1deabe5c hwc: Add stubs for hdmi calls for MSM8909w
Add a new file with stubs for the existing hdmi calls.
The execution of the stubs is dependent on the value of
the TARGET_SUPPORTS_WEARABLES flag which is set to
true for MSM8909w

Change-Id: I2d2ad76e98d37f0ccacacbf50831cdbf8980d503
Signed-off-by: Sachin Bhayare <sbhayare@qti.qualcomm.com>
2016-05-11 08:59:00 -07:00
Sachin Bhayare 452f4e8628 hwc: hdmi: Fix compilation with new HDMI resolutions am: 93950e3
am: feeee8d

* commit 'feeee8d22853e3c584de08708cc6d0e5447cfdd3':
  hwc: hdmi: Fix compilation with new HDMI resolutions

Change-Id: I4b527cd53fbbe85035ead69abcf74d0bbf80c872
2016-04-26 00:33:12 +00:00
Tom Cherry e920c91c14 Revert "msm8909: Remove HDMI_VFRMT_4096x2160p24_16_9" am: 47797a1
am: 927afec

* commit '927afec1e3470e6ebbeec9e0954eddfa61bdf799':
  Revert "msm8909: Remove HDMI_VFRMT_4096x2160p24_16_9"

Change-Id: I63eb82f63d62fdb1a4809b0603e108214fe95695
2016-04-26 00:33:11 +00:00
Sachin Bhayare 93950e3f2b hwc: hdmi: Fix compilation with new HDMI resolutions
Fix Compilation issue due to updated HDMI resolutions.

Change-Id: I9aca9f5c976ccce411029000a7c3c04b94ab0167
2016-04-25 13:27:07 -07:00
Tom Cherry 47797a1fb4 Revert "msm8909: Remove HDMI_VFRMT_4096x2160p24_16_9"
This reverts commit bfd6835cee.
2016-04-25 13:26:58 -07:00
Tom Cherry bfd6835cee msm8909: Remove HDMI_VFRMT_4096x2160p24_16_9
It blocks a build with kernel 3.18. And msm8909 doesn't support for
the resolution.

Change-Id: Iaa4070230e2efd4e10902f65e25e6abb793e71e1
2016-04-06 09:56:53 -07:00
Roopesh Rajashekharaiah Nataraja 9df067365f display: update references to support prebuilt kernel build am: e725d08
am: 2ad55a4

* commit '2ad55a4861b55460cd8da4542caa2400d0c9a1ab':
  display: update references to support prebuilt kernel build

Change-Id: Icaa4dd3a378cd8672fa26431c621f0cd31714f5c
2016-04-05 20:17:38 +00:00
Roopesh Rajashekharaiah Nataraja 80a9cb61c5 display: Point to new opensource project path. am: 1129a6a
am: d44112d

* commit 'd44112dc0a37ec132b2d5440903df89564a20919':
  display: Point to new opensource project path.

Change-Id: Iba2a57f0bb2c5819cc1060ed28fcc886478733c0
2016-04-05 20:17:37 +00:00
Roopesh Rajashekharaiah Nataraja e725d08ff1 display: update references to support prebuilt kernel build
Updating kernel references to LOCAL_ADDITIONAL_DEPENDENCIES and
BOARD_KERNEL_HEADER_DIR

Change-Id: Ibda64786548a15cf4d2a37f5ae2e8e414f6712ae
2016-04-01 14:44:28 -07:00
Roopesh Rajashekharaiah Nataraja 1129a6a00f display: Point to new opensource project path.
Change-Id: Id9eb9801337985afd14dc9ccdeacf18852c2d319
2016-04-01 14:44:16 -07:00
Tom Cherry d1e8c42a5b msm8909: Temporarily disable -Werror and clang
Clang has more warnings and errors than gcc which prevent the 
msm8909 display components from compiling successfully.  Disable -Werror
and clang temporarily until these issues can be fixed.

Bug: 27790279

Change-Id: I83fef652d3da81d0740286040b8a942998e9d836
2016-03-22 20:22:45 +00:00
Tom Cherry dec1a26104 msm8909: Remove HDMI_VFRMT_4096x2160p24_16_9
It blocks a build with kernel 3.18. And msm8909 doesn't support for
the resolution.

Change-Id: Iaa4070230e2efd4e10902f65e25e6abb793e71e1
2016-03-22 10:52:16 -07:00
Sachin Bhayare 9047307bd1 hwc: remove venus color format support for msm8909w
Wearable target msm8909w not have venus core, so disable VENUS_COLOR_FORMAT
support from hwc.

Change-Id: Ib63e92592287f985e6f88e2d697cc76923cbe017
2016-03-14 17:09:10 -07:00