Commit graph

176 commits

Author SHA1 Message Date
Dominggoes Isakh
41bfeb9370 gralloc: Fix GraphicBuffer screenshot issues in Pie
Buffer allocation for GraphicBuffer fails because it is released
to early. Use ION buffer and add an ump-reference to stall.
Change-Id: I077bd7176fff4aa08a46362d80e64ad9b740773a
2019-02-06 16:14:01 +03:00
Dominggoes Isakh
3c86d5e6eb hwcomposer: smdk4120: Add composition-decision of our old hwc
Change-Id: I2e1919e7abeb78310358ac315f7de2a9223f6fe2
2019-02-06 16:13:27 +03:00
Dominggoes Isakh
3cacced179 exynos4: android.hardware.graphics.allocator@2.0 for Exynos4
* Buffer got corrupt because of the mNumFlexPlanes member.
  Use fixed value of 4 instead and exclude the member.
* Usage bits were not filtered properly

Change-Id: I7ee9fa73f896c505403447ae118a76d9f53e00a8
2019-02-06 16:12:44 +03:00
Dominggoes Isakh
79932c733a hwcomposer: Don't set state to S3C_FB_WIN_STATE_DISABLED
This fixes rendering statusbar icons in Pie when high resolution
display setting is set. The height of the statusbar is less than
32 pixels and was therefore not rendered.

Change-Id: Ie6283de2cb429f0c0d3ca66bf5d3638639a66f79
2019-02-06 16:12:40 +03:00
Shilin Victor
a416ce3378 Revert "hwc: verbose layer debugging"
This reverts commit e0674a62cd6d817b15920d7df9ef6a05dd6ffa7b.

Change-Id: I9bb6ab964f2dba3d68a34c9737a7a56401e79b1f
2019-02-06 16:12:36 +03:00
Shilin Victor
aa2cfeb6f6 hwc: release fence in perform_fimc
Change-Id: I2039939c42a76567874ec0e1100ab1cbff95ed39
2019-02-06 16:12:36 +03:00
Shilin Victor
e24564745e hwc: disable FIMG
Change-Id: I61f764973d4b3bb350a99a69804b96995addee70
2019-02-06 16:12:36 +03:00
Shilin Victor
f3b1c86f77 hwc: verbose layer debugging
Change-Id: I5f21254c0a3965b2d1629b6f1a3ccbd7aed285a1
2019-02-06 16:12:36 +03:00
Shilin Victor
2aa170fa95 exynos4: HWC: move as vendor module
Change-Id: Ic746a4170a60f3c79a0df5b1e0a5bed8a5838e24
2019-02-06 16:12:23 +03:00
Shilin Victor
00b6ad969c hwc: Set ioprio for vsync thread
This reverts commit e334ed34ddf504921195161d2230a3b4156d9a43.

Change-Id: Iceba230b667c0a4c480301bf5d662a9cf82b6df3
2019-02-06 16:12:23 +03:00
Shilin Victor
c85f6a008e hwc: RGB_565 pixel format is not supported
thanks @acroreiser

Change-Id: I114fae3f6ebce32bbf0c07296a54b4fb4a599c08
2019-02-06 16:12:23 +03:00
Dominggoes Isakh
426683a8eb Fix build errors
Change-Id: I4d4997e25d15b42180a1f41a01daf127bf27ca3c
2019-02-06 16:12:23 +03:00
Dominggoes Isakh
6cd6fedd47 exynos4: gralloc: Ignore PRIV_FLAGS_FRAMEBUFFER 2019-02-06 16:12:23 +03:00
Dominggoes Isakh
48d3ff42e8 Fix build errors 2019-02-06 16:12:23 +03:00
Dominggoes Isakh
db01d7418e Revert "hwc: Set ioprio for vsync thread"
Depends on libcutils support, which was removed in
https://review.lineageos.org/#/c/189293/.
2019-02-06 16:12:23 +03:00
Simon Shields
2dc726f442 exynos4: hwc: add missing checks in is_overlay_supported
make sure that if something is transformed/scaled we don't try drawing
directly to FIMD

Change-Id: I69be0d296c11496c5b380b7135dad10cb6c66fc8
2019-02-06 16:12:23 +03:00
Simon Shields
dfa35134f6 exynos4: hwc: disable FIMG for now
adds significant amounts of touch latency, and also causes the LCD to
die :(

Change-Id: Ie777d249d02def3863049528ab8437dcacc3faa1
2019-02-06 16:12:23 +03:00
Simon Shields
60d6c48cca exynos4: hwc: remove GRALLOC_USAGE_HW_ION usage
HW_COMPOSER means the same thing and doesn't require modifying AOSP
headers

Change-Id: I29d9f6348a19b5cf778a4819a3dfd511ae789e0d
2019-02-06 16:12:23 +03:00
Simon Shields
6c9141f69d exynos4: hwc: disable FIMC scaled layers for now
seems to cause the panel to die

Change-Id: I9005a1ee1fba6ef13e15572ffe5094e8fc5c6687
2019-02-06 16:12:23 +03:00
Simon Shields
70f13df35c exynos4: gralloc: improve allocation logic
A buffer that needs to be allocated in ION will either have
GRALLOC_USAGE_HW_COMPOSER, or GRALLOC_USAGE_HW_ION. See
https://android.googlesource.com/platform/hardware/libhardware/+/android-7.1.2_r33/include/hardware/hwcomposer.h#136
for more information.

Change-Id: Ie75d369e40ce1758920d194dd1f0dafcaeb4d140
2019-02-06 16:12:23 +03:00
Simon Shields
1535f0a3dc exynos4: libhwc: HWC 1.4
Change-Id: Ib446df60d59ddc304125d4887ac5adea8d72f9e6
2019-02-06 16:12:23 +03:00
Simon Shields
1e5c745f10 exynos4: hwc: include plane_alpha in output
Change-Id: Ic7cae63f4fe8ef48c7e16838c2dbdbcbf88da7b3
2019-02-06 16:12:23 +03:00
Simon Shields
d3e5b2f802 exynos4: hwc: fix FIMC colour format selection
Change-Id: I67bc79f57cc85f428dea7d16ffccb70a1ae646ac
2019-02-06 16:12:23 +03:00
Simon Shields
5a7136339c exynos4: hwc: debug improvements
Change-Id: If19d10308dfe2578018a5f5cdf6c14d40561d777
2019-02-06 16:12:23 +03:00
Simon Shields
188028e3ca exynos4: hwc: fix stride when using G2D
Change-Id: I52677b41d1753fad405124c90477fa71c9dd255b
2019-02-06 16:12:23 +03:00
Simon Shields
a2b4252873 exynos4: hwc: fix FIMC transform with cropped buffer
s_fmt_pix_out wants the width/height of the original buffer, not the
width/height of the cropped area.

Change-Id: Iff2b4b2b89af6a68aac23b5766cf76cdf822af99
2019-02-06 16:12:23 +03:00
Simon Shields
3a77385a70 exynos4: hwc: try FIMG if FIMC composition is already used
Change-Id: I08f6241388e9a8e7436b2bf68869f523eb969c48
2019-02-06 16:12:23 +03:00
Simon Shields
418331950b exynos4: hwc: fix typo
Change-Id: I7dcbccfa1d5911e3935b6525d277efc831655d79
2019-02-06 16:12:23 +03:00
Simon Shields
20802225e8 exynos4: hwc: prefer FIMC in transformed contiguous cases
FIMC seems to be more reliable than FIMG.
TODO: use all four FIMCs

Change-Id: I1d34f8b3daae6dac609d141e78d3629433097cdb
2019-02-06 16:12:23 +03:00
Simon Shields
5edee1cbfc exynos4: hwc: refill fimg_cmd struct on each perform_fimg
Change-Id: Ic47bf13dabab841149d3fe9566687b30ec3be2af
2019-02-06 16:12:23 +03:00
Simon Shields
e86377015e exynos4: hwc: ignore alpha on window 0
Change-Id: I9bbeb8b2ec06f08b070a8eda02c0322ede1c62f7
2019-02-06 16:12:23 +03:00
Simon Shields
08f414bb62 exynos4: hwc: fix FIMC colour order
Change-Id: Ifb03e9cce404a42f33447afce129bbd13f012135
2019-02-06 16:12:23 +03:00
Simon Shields
a94b20c9b8 exynos4: gralloc: always try and allocate in ION
FIMD can display ION buffers, and UMP can import ION buffers.
FIMD cannot display UMP-only buffers (since they're not necessarily
contiguous). If ION allocation fails (because the carveout is full),
fall back to UMP-only allocation.

Change-Id: Ie5aa266f8e8e6ccd7b6df37f31983ba82e54011e
2019-02-06 16:12:23 +03:00
Simon Shields
806287a676 exynos4: hwc: add handle address to dump output
Change-Id: I3a7dcabf1b4a5f6a7c48687aeebee23e54d340a3
2019-02-06 16:12:23 +03:00
Simon Shields
9a63ab5ec6 exynos4: hwc: correct stride for FIMD, probably
Change-Id: I02e8f5c696715ef45521e355b47aff051ff83522
2019-02-06 16:12:23 +03:00
Simon Shields
bd1460c2fe exynos4: remove strange window logic
causes layers to disappear in usecases with a lot of layers (e.g.
multi-window)

Change-Id: I8e1d3fc76f2cb231d64de78b174c619d3d33cd53
2019-02-06 16:12:23 +03:00
Simon Shields
18ed295fd1 exynos4: hwc: allow hw compos on geometry changed
Change-Id: Ia79220488a821e5c076c902d2665a9fa9e37823e
2019-02-06 16:12:23 +03:00
Simon Shields
b364191e2a exynos4: hwc: draw contiguous layers directly to FIMD
If a layer is contiguously allocated in gralloc (i.e. in ION or FIMC),
it has a non-zero paddr, and as long as it doesn't require FIM[CG] for some
other reason (scaling, rotating) FIMD can render it directly.

This seems to be the intended use of gsc_map_t::NONE.

Also update hwc_dump to show some relevant information about hw win to
layer mapping, window mode, and paddr of the memory.

Change-Id: I4c86655131cc859ee789fb37fa30a352376cf8cf
2019-02-06 16:12:23 +03:00
Simon Shields
d45cb2ba1d exynos4: hal: optionally allow using multiple fimg layers
this isn't stable enough to enable by default, but the performance
benefits are quite noticable, and the negative side effects of doing
this don't exist in the majority of usecases, so add a prop:
persist.sys.hwc.multi_fimg to enable it

Change-Id: I5dd5560900e2cf91c2a23ce96fa14409236922e0
2019-02-06 16:12:22 +03:00
Simon Shields
973abf09e8 exynos4: gralloc: declare 4210 FIMC0 devnode
Change-Id: I9da3140f2e8904a12b695d0f2d6eaf67c0836dd5
2019-02-06 16:12:22 +03:00
Simon Shields
3f66e0b551 exynos4: hwc: don't use FIMG on 4210
libfimg3x ABI is incompatible with libfimg4x

Change-Id: I922b54f19be095063d2ba82d168066d7036bf7fb
2019-02-06 16:12:22 +03:00
Simon Shields
80999cda6e exynos4: hwc: implement hwc_dump
show info about whether or not we're forcing GLES compisition

Change-Id: I1121488d2378a25db8dc50de51286eb72f2d23b2
2019-02-06 16:12:22 +03:00
Simon Shields
b3cb1b1682 exynos4: hwc: allow multiple FIMG layers
Change-Id: I35353ced1c2be21117e40f557d27bb38c32cb796
2019-02-06 16:12:22 +03:00
Simon Shields
a4886de3eb sec_utils: fix header include
Change-Id: I94b006e666f0da3670ca15210af3a52a1cdc8f30
2019-02-06 16:12:22 +03:00
Javier Ferrer
e982de8303 exynos4: gralloc changes for oss hwcomposer
Change-Id: I7b3ac2404fed7d07ef672c99f47bb36f8b80dafd
2019-02-06 16:12:22 +03:00
Javier Ferrer
a0a48f9689 exynos4: add oss hwcomposer
It depends on f1c6163ac1

Change-Id: I26456fc469b8d488fb931a53f32d75c91a5e70c5
2019-02-06 16:12:22 +03:00
Dheeraj CVR
495c1cc3b5 libhwconverter: adapt for libfimc changes
Change-Id: I04da4e76fcee1a116fc32b6899d71affcd434c67
2019-02-06 16:12:22 +03:00
Dheeraj CVR
55898bf061 libfimc: update for hwcomposer compatibility
Change-Id: I9fe15f12c59cbabae9a79fec6873a006e9dd10e6
2019-02-06 16:12:22 +03:00
Javier Ferrer
23a07a3c6b libfimg: add CMD_SET_DBUFFER, lock and boostup
Depends on https://gerrit.nameless-rom.org/#/c/18058/

Change-Id: Ic6fccd408b48d094a8b0cba48a1f96e84cee59d6
2019-02-06 16:12:22 +03:00
Dheeraj CVR
baaf7a8ad0 libfimg: don't propogate BLIT_OP_SOLID_FILL operation
Change-Id: Iad5592b863e35c5914167741bb32a2b81aebc911
2019-02-06 16:12:22 +03:00