Commit graph

151 commits

Author SHA1 Message Date
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
Simon Shields
2ae665aff5 exynos4: fix hwcomposer
Change-Id: Id656a09b2d7e2da2de05d3075818ce14efe09416
2019-02-06 16:12:22 +03:00
Simon Shields
be4c4b22c2 exynos4: hal: always use our videodev2.h
Change-Id: I1a68a3345565cd88f36045dbdc838a17d558d77e
2019-02-06 16:12:22 +03:00
Simon Shields
ac17f4326d exynos4: gralloc: build fixes
Change-Id: If5095647796e05c908d7bfe80ff35b76879cb75c
2019-02-06 16:12:22 +03:00
Javi Ferrer
07950da91b Update s3cfb constants
Change-Id: I7e24e65e708b425d92ffbd3cc20cb4cf4703cf5d
2019-02-06 16:12:22 +03:00
Javi Ferrer
4f1fe71d4b Switch FIMC1 and ION
hardware/samsung/exynos4/hal/libcamera/SecCameraHWInterface.cpp  left intentionally as is, since I think it has the proper meaning

	#ifdef USE_EGL
	#ifdef BOARD_USE_V4L2_ION
	    if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN | GRALLOC_USAGE_HW_ION)) {
	#else
	    if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN)) {
	#endif
	        ALOGE("%s: could not set usage on gralloc buffer", __func__);
	        return INVALID_OPERATION;
	    }
	#else
	#ifdef BOARD_USE_V4L2_ION
	    if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN
	        | GRALLOC_USAGE_HWC_HWOVERLAY | GRALLOC_USAGE_HW_ION)) {
	#else
	    if (w->set_usage(w, GRALLOC_USAGE_SW_WRITE_OFTEN
	        | GRALLOC_USAGE_HW_FIMC1 | GRALLOC_USAGE_HWC_HWOVERLAY)) {
	#endif
	        ALOGE("%s: could not set usage on gralloc buffer", __func__);
	        return INVALID_OPERATION;
	    }
	#endif

Change-Id: Ieca2c717314bda5ca94a013df3cf8e23d68f74f8
2019-02-06 16:12:22 +03:00
Javi Ferrer
b59b75cde2 gralloc: move logic to add extra flags
Change-Id: Iffd52718841fa0ae03eadc94482a94cdd4989668
2019-02-06 16:12:22 +03:00
Javi Ferrer
025b44c305 gralloc: fixes for N7100 kernel rebase
gralloc_alloc_buffer()
gralloc_lock()
gralloc_unlock()

Change-Id: Ib935c94f1d216b6a57b300f5afb1c44724d2b05b
2019-02-06 16:12:22 +03:00
Javi Ferrer
1ea41aa4b3 gralloc: fix find_last_rect()
Change-Id: I4850a0a848c0c859be1e0b3b0ff8e280ba63af0b
2019-02-06 16:12:22 +03:00
Javi Ferrer
2624dc13ae gralloc: Use ION instead of FIMC
Made also changes to match XXUUMK6.

Needs https://gerrit.nameless-rom.org/#/c/12177/ for video playback and possibly https://gerrit.nameless-rom.org/#/c/12178/

Change-Id: I4a8fa5ee28d83c4bac822e4f8769ebce593b33cc
2019-02-06 16:12:22 +03:00
Dominggoes Isakh
4a405a462b Revert "hwcomposer: (WIP) Implement HWC 1.1"
This reverts commit d93aed8e16fc8b500ac5cd49f4813e26b962c1ab.
2018-12-23 05:48:58 +03:00
Dominggoes Isakh
aca172100c hwcomposer: (WIP) Implement HWC 1.1 2018-12-23 05:48:58 +03:00
Shilin Victor
e2733b095b Revert "HardwareConverter: Temporary remove OMX_SEC-formats for Pie bringup"
This reverts commit 46996ee4d4.

Change-Id: I12bd4e3c4f9d898424fa2ee5f11cd4de561b6885
2018-11-22 11:35:24 +03:00
Shilin Victor
d2ec13c4b2 Revert "exynos4: android.hardware.graphics.allocator@2.0 for Exynos4"
This reverts commit 3134d2eea5bc6b2a29de2faec067aea5e5d0a44e.

Change-Id: I2f80b912bbecfd2b72e668c2db0701c3e7008aa1
2018-11-22 11:34:15 +03:00
Shilin Victor
23331bcc02 libhwjpeg: fix build
Change-Id: I86b47caf8ca498b943ffea6556816c5ac75c137f
2018-11-22 11:34:15 +03:00
Dominggoes Isakh
b31f428d60 Resolve compiler errors
* remove all unused variables
* remove all unused functions
* build with -no-error

Change-Id: I8cdf30b9e650b4905c6c122122cd3630bf153275
2018-08-14 22:26:31 +02:00
Dominggoes Isakh
46996ee4d4 HardwareConverter: Temporary remove OMX_SEC-formats for Pie bringup
Change-Id: Ie9e665d7fc5b1124ecb662cfb4fcedc18d22021b
2018-08-13 19:49:53 +02:00
Dominggoes Isakh
58db5d59b0 exynos4: android.hardware.graphics.mapper@2.0 for Exynos4
Change-Id: Ic3156237063e72b3a3745491685d3e5cbedd908d
2018-08-12 22:05:06 +02:00
Dominggoes Isakh
d50cd57a75 libgralloc: Move to vendor
Change-Id: I2db8ee6330ee2fa41f725e3004cca321b3b176b6
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
7a739e098a libhwcomposer: Move to vendor
Change-Id: Ib4cc446beaec71134061a97353dcd5b13dcc5901
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
94482bf33b 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
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
08c95948f7 exynos4: Fix GRALLOC_USAGE_YUV_ADDR for hardware decoders
Change-Id: I07206502e9dcdd731ce19eaf1e14ac519afab01e
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
763999dd87 exynos: Temporary remove getphys
Change-Id: Ia64dae7e838b32cfb1ed0c45b3c88d961e21e5d5
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
4ff5df4584 exynos4: gralloc: Add support gralloc1-adapter
Change-Id: I6df76e2c0b7d5fad0316ddb2305a7fc8142d6d89
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
9b21248cd4 Use TARGET_NEEDS_EXYNOS4_ENHANCEMENTS
Change-Id: I3072e938eeff0d1ada0760f77c71782366da1e57
2018-08-08 06:26:10 +02:00
Dominggoes Isakh
09604e974d Fix compiler errors
Change-Id: Ic0193e81edae8ee46c53865133ce42fda9f69d5d
2018-08-08 06:26:10 +02:00