Commit Graph

103 Commits

Author SHA1 Message Date
zaclimon 98e5990a03 msm8960: IQService: Allow more processes to access IPC
As Android 7.0 has separated mediaserver into different processes,
one of them, mediacodec, cannot access to the IPC anymore.

Fix this by allowing more processes to be able to access it.

Based on msm8994:
https://android.googlesource.com/platform/hardware/qcom/display/+/android-7.0.0_r1/msm8994/libqservice/IQService.cpp#88

Change-Id: I6ef3f3eaa9015b399bf753837ffd53056c836f90
2019-04-19 16:08:13 +02:00
Dhivya Subramanian b76604250c copybit: Fix type conversion error for GCC 4.7
GCC 4.7 has stricter type conversion rules in copybit.cpp

Change-Id: I7f8572e2d9416ccb2ba17e707c7f75a2e69d69cf
2019-04-19 16:08:04 +02:00
Saurabh Shah 6dfb4c8795 msm8960: hwc: Do not use fb handle in hwc_prepare
Do not use fb handle in prepare. Use displayFrame for dimensions,
align them and hardcode format.

b/8316155 - Implement HWComposer 1.3 w/ virtual display support
Change-Id: I5c494a74a807d3a52a1c88257494b58c583700f5
Signed-off-by: Daniel Jarai <jaraidaniel@gmail.com>
2019-04-19 16:07:55 +02:00
Artem Borisov bf30ca71bb msm8960/8974/8084: Include string.h where it is necessary
Change-Id: If14f25659b3f898b19fde6c9d920998e80d19660
2019-01-19 21:20:53 +01:00
Naseer Ahmen ec86d06700 msm8960: copybit: Fix type conversion error for GCC 4.7
GCC 4.7 has stricter type conversion rules

Change-Id: I699cfe1ceafb5728fb8e6f34f7b1996d3c812e7e
2019-01-19 19:56:17 +01:00
Emmett Tsai 958f1d1c1c msm8960: hwc: remove retire fence
in frameworks/native deprecated the use
of retire fence, therefore retire fence
support has to be removed

depends:
hardware/qcom/msm8960: Ibe3200eb9e2d70fefbaa907089dbf4b4ce5809fe
android_kernel_google_msm: I19877296ac762e4d5c3162843ccaf5cc9a88ff1c

Change-Id: Iddb114b7752de38438fe6143a6f1798ecf844779
2019-01-05 11:22:16 +01:00
Emmett Tsai 12759fc641 msm8960: hwc: fix null point
Change-Id: I230a068381ae978a315222c91a3f647de2391ec9
2019-01-03 14:55:23 +01:00
Tom Marshall 8def73c018 hwc: Validate display ID in hwc interfaces
Validate the display ID before processing any calls from the
client.  This is needed to handle only the displays which are
supported by HWC

Adapted from commit of the same title in CAF msm8974 tree.

Original author: Arun Kumar K.R <akumarkr@codeaurora.org>

Change-Id: Iebeeabf791b5c53e811e1f4bb3d777ab0e4d0f47
2018-09-21 14:50:15 +02:00
followmsi 1f764fdd5b memtrack: Make memtrack HAL compatible for HIDL passthrough mode.
Change-Id: I965972b936f2098c2e692afa4db8743355140a2c
2018-09-21 14:20:02 +02:00
Martin Brabham 0d7b20f64c Include string.h
libgralloc: strerror needs string.h
libqdutils: strerror needs string.h
libcopybit: memcpy needs string.h

Bug: 72343089
Change-Id: I36226fd656d26c4d0486d1c99f2317376c0d08dd
2018-09-14 09:46:50 +02:00
Haynes Mathew George dcb016231e display: Fix deprecated log warning
Change-Id: Ib3cb65ea19fa21dca6626080f5117073f0a86766
2018-09-13 23:23:30 +02: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
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
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
Christopher Wiley a840583a03 Merge "libexternal should depend on libmedia" am: 51a47d7
am: 6eb1082

* commit '6eb1082ace26c6c794cc9785adefb014d8b9b755':
  libexternal should depend on libmedia

Change-Id: Id04db16fe62c995c522a51c3d8fbc3537bb2a3f5
2016-04-18 17:25:40 +00:00
Christopher Wiley a58eb8b14a libexternal should depend on libmedia
This library's source code includes libmedia headers.

Bug: 27804373
Change-Id: Iee49247825fd0cbbf2e5016d4eb0a3bc99b84cf4
Test: Compiles.
2016-04-18 09:19:33 -07:00
Dan Willemsen 3b1d6059ba Merge "Fix duplicate copy file rules" am: f5ef45b92e
am: 41031c9406

* commit '41031c9406df7031a8dd6c5980463fa9c5198a67':
  Fix duplicate copy file rules
2016-02-24 00:19:56 +00:00
Dan Willemsen b360857e92 Fix duplicate copy file rules
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
2016-02-23 14:19:52 -08:00
Naseer Ahmed b1df9d27dc gralloc: Handle RAW_OPAQUE formats similar to blob
Change-Id: I957b9d5902f6ea3714b46f3900e9f039b4667f0a
2015-12-10 11:42:16 -08:00
Arun Kumar K.R bf3fb5c2af am ff7ea233: am 0787bc22: hwc: Move max app layer check outside isFrameDoable routine.
* commit 'ff7ea2339c73f58985348c75b4c1c8a415d07967':
  hwc: Move max app layer check outside isFrameDoable routine.
2015-10-16 21:37:04 +00:00
Arun Kumar K.R d605c8d201 am e767ef64: am 95c2601a: hwc: Fix MDP comp array index access
* commit 'e767ef6438fe404a2dcc8df086cfb6811bb33a7a':
  hwc: Fix MDP comp array index access
2015-10-16 21:37:04 +00:00
Arun Kumar K.R 39ee026a07 am ed30f732: am 45660529: hwc: Fix to avoid heap corruption
* commit 'ed30f732801662d3affab06238adf2961ae65dea':
  hwc: Fix to avoid heap corruption
2015-10-16 21:37:03 +00:00
Arun Kumar K.R ff7ea2339c am 0787bc22: hwc: Move max app layer check outside isFrameDoable routine.
* commit '0787bc222a016e944f01492c2dd04bd03c1da6af':
  hwc: Move max app layer check outside isFrameDoable routine.
2015-10-16 21:33:25 +00:00
Arun Kumar K.R e767ef6438 am 95c2601a: hwc: Fix MDP comp array index access
* commit '95c2601aab7f27505e8b086fdd1f1dce31091e5d':
  hwc: Fix MDP comp array index access
2015-10-16 21:33:25 +00:00
Arun Kumar K.R ed30f73280 am 45660529: hwc: Fix to avoid heap corruption
* commit '45660529af1f4063a00e84aa2361649e6a9a878c':
  hwc: Fix to avoid heap corruption
2015-10-16 21:33:23 +00:00
Arun Kumar K.R 0787bc222a hwc: Move max app layer check outside isFrameDoable routine.
Move the condition for checking maximum number of app layers
ourside the isFrameDoable function to avoid heap corruption while
updating hnd array in cacheAll function.

Bug: 24163261

Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>

Change-Id: Id4458fcadc7775a2d78b1849de6782857c6ac17f
2015-10-16 11:49:29 -07:00
Arun Kumar K.R 95c2601aab hwc: Fix MDP comp array index access
Fix MDP comp array index access in case of High Res pipe allocation.
This is already correct in case of Low Res allocation routine.

Bug: 24163261

Acked-by: Saurabh Shah <saurshah@codeaurora.org>

Change-Id: I7eaa0711ef8998ea03edba18b74db80459daf4c7
2015-10-16 11:49:26 -07:00
Arun Kumar K.R 45660529af hwc: Fix to avoid heap corruption
- Check for MAX_NUM_APP_LAYERS before updating yuv indices array.
- Fall back to GPU composition when number of app layers exceeds
  MAX_NUM_APP_LAYERS to avoid heap corruption.

Bug: 24163261

Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>

Change-Id: Ieb91b705a0a5f50ce2f8829d1f1ee048d44b7d2e
2015-10-16 11:48:57 -07:00
Lajos Molnar d6e36fa315 gralloc: 8960: add lock_ycbcr support for HAL_PIXEL_FORMAT_YV12
Bug: 21596464
Change-Id: Ibd469011f8b401a7817a752db07dc7eff1a7b69a
2015-06-19 17:38:45 -07:00
Chien-Yu Chen 3b065d79f9 Merge "gralloc: Default flexible YUV format to NV21" into mnc-dev 2015-06-19 19:51:44 +00:00
Chien-Yu Chen db3ff66fd3 gralloc: Default flexible YUV format to NV21
There could be buffers allocated in flexible YUV format that do
not have any camera usage flags. Default such buffers to NV21.

Bug: 21880984
Change-Id: Ieb659c05d0a69db815e6a3a0b1b574a746b3dc90
2015-06-17 10:45:10 -07:00
Richard Uhler 54c63971b5 libmemtrack: Fix the kgsl memory flag to determine usermapped buffers
The flag is the last character in 'flags' field array. It was wrongly
indexed at flags[6] causing all entries to be marked as unaccounted.
The correct check should be for flags[5] to be equal to 'Y'.

Bug: 20447631

Change-Id: Ibe9b88387a87b2caf37f3b20f8fd702dbef322db
2015-06-16 22:55:19 +00:00
Eino-Ville Talvala 4ee9ce6a95 Remove sRGB, replace RAW_SENSOR with RAW16 graphics format.
Change-Id: I22a557cabcba4c0d0a87c8a982a324ebb3ba701a
2015-02-19 16:36:44 -08:00
Praveen Chavan 94e44e9fc8 am e33bae63: gralloc: 8960: Add allocation support for standard NV12
* commit 'e33bae63cde0b553009cb6907b7ed69acd833c59':
  gralloc: 8960: Add allocation support for standard NV12
2015-02-06 00:06:58 +00:00
Lajos Molnar 001ded21b4 am 0498964e: Merge "gralloc: 8960: handle YCbCr 420SP format in lock_ycbcr" into lmp-mr1-dev
* commit '0498964ed0b90a3252b2b5054bbccc927f4ab57f':
  gralloc: 8960: handle YCbCr 420SP format in lock_ycbcr
2015-02-06 00:06:58 +00:00
Praveen Chavan e33bae63cd gralloc: 8960: Add allocation support for standard NV12
Video decoder advertizes standard NV12 format
(OMX_COLOR_FormatYUV420SemiPlanar) in place of TILE,
if the app requests for a linear color-format explicitly.
Accept this format keeping the size-aligment restrictions
same as NV12-TILE

Bug: 17906609
Change-Id: I9ec241608ae01a7e38f78d4dcfd66981795c2dc6
2015-02-05 05:33:28 +00:00
Praveen Chavan 41b4b6aab2 gralloc: 8960: handle YCbCr 420SP format in lock_ycbcr
Bug: 17906609
Change-Id: I28476291908f564477bb1d7a34196aed3e811f0d
2015-02-04 15:14:16 -08:00
Elliott Hughes 4f88e2f118 Fix "error: implicit declaration of function 'free'".
Change-Id: I8a76fc6ce69b8e356f4bf51784eb7c58dba04002
2015-01-30 22:16:59 -08:00
Andreas Gampe 6d5467dc95 msm8960: Remove unused variables & functions
For build-system CFLAGS clean-up, remove unused variables and
functions.

Bug: 18632512
Change-Id: Ib9e5013bfd95b7f32f3574e6945aa7637fc59339
2014-12-08 21:43:36 -08:00
Marco Nelissen a16678baac Update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 10:06:23 -08:00
Chih-hung Hsieh 174dd59a0d am fb37b117: Merge "Use standard initializers"
* commit 'fb37b11703cb95bef058b29715f879c5afd7b908':
  Use standard initializers
2014-10-16 20:54:35 +00:00
Chih-hung Hsieh fb37b11703 Merge "Use standard initializers" 2014-10-16 20:48:47 +00:00
Bernhard Rosenkraenzer ce2c4b3174 Use standard initializers
The code currently uses GNU initializers as opposed to C99 initializers.
Clang emits a warning about this, causing the -Werror build to fail.
Either variant works fine in gcc.

BUG: 18017604

Change-Id: I196b809e085637e097706557ce62462dba8b2c3d
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-10-16 18:03:16 +00:00
Chih-hung Hsieh edafdf490f am 0de50bb3: Merge "Put singleton static instance declarations into the android namespace"
* commit '0de50bb3810cc5dd47b435d8ef2a5c7364b1d83f':
  Put singleton static instance declarations into the android namespace
2014-10-15 22:33:12 +00:00
Chih-hung Hsieh 0de50bb381 Merge "Put singleton static instance declarations into the android namespace" 2014-10-15 22:16:59 +00:00
Naseer Ahmed 4693292411 hwc: msm8960: Add padding round for transitioning VG pipe
When an external display is connected, the primary display may be
using up both VG pipes. However, a VG pipe is necessary for
playing secure video on the external display. This needs a
padding round to transition the pipe to the external display's
mixer.

Bug: 17132088
Change-Id: Iecbc067cb79513a0a97f73812886277b83bb7107
Acked-by: Saurabh Shah <saurshah@codeaurora.org>
2014-10-09 15:55:36 -07:00
Iliyan Malchev 9277e3f26a msm8960: libmemtrack: Use kgsl memory flag to determine usermapped buffers
Instead of using useraddr from kgsl memory allocations to be
matched against proc/<pid>/smaps file to be used to determine
usermapping of a buffer, use the newly added flag which directly
indicates whether a given gpubuffer entry is usermapped or
not. The flag is the last character in the "flags" field.

CRs-fixed: 634962
b/16527585 msm graphics driver seems to be overcounting memory usage
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>

Change-Id: I66b577a00b146f28c53f28c150c43fddffa739bf
2014-08-16 11:26:37 -07:00
Jesse Hall 80c2b7d36c {msm8084,msm8226,msm8960}/hwc: Free all MdpPipeInfos on reset
The reset code was only freeing MdpPipeInfos if numLayers>0, but on
every frame it was being called with numLayers==0 and then again with
numLayers>0. Since reset also memsets the structure to zero, it was
leaking the MdpPipeInfos on every frame.

I haven't confirmed reset(0) is called on these chips, only on
msm8974, and that's a necessary condition for the leak to occur. But
this change is safe either way.

Bug: 16601370

Change-Id: Ic24dc3c3546ecdb4e86f7ff3085b2665354e93cd
2014-08-14 10:13:42 -07:00
Steve Rossbach f41c66785a libmemtrack: avoid counting surfaceflinger buffers twice
The system wide Graphics memory usage is inaccurate because some ION
buffers which are shared between processes are counted twice, once for
the buffer's consumer (surfaceflinger), and again for the producer.
These ION buffers appear in surfaceflinger's kgsl memory dump with
usage=egl_image, and in the producer's dump with usage=egl_surface.

Improve the accuracy of Graphics memory tracking by ignoring all ION
buffers with usage=egl_image in the surfaceflinger process, under the
assumption that the buffers will be accounted for when examining the
producer's process.

Change-Id: I764c610f226d41e2897d6e0c2247793b0e321ed0
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
2014-08-12 22:07:27 -07:00
Vineeta Srivastava f0336ae3e2 Revert "Revert "copybit: Export c2d2 headers from display HAL""
This reverts commit 45035563c1.

Change-Id: I895337687d75993b701e0f09dd44cf6bf98ea007
2014-05-07 16:27:25 +00:00