Commit Graph

9 Commits

Author SHA1 Message Date
Rajesh Yadav
2ab89e14ed Revert "display: Store and restore the current eglContext"
This reverts commit 99ff47d39e.
Context restore is not required as HWC2 runs in hal context.

Change-Id: If12e53f684db6440b8232f5a694220e88842445c
2017-07-25 15:13:44 +05:30
Sushil Chauhan
70bc2c01f0 hwc: gpu_tonemapper: Create Secure EGL Context
- HWC tonemapper passes secure flag to GPU tonemapper to create object
  with secure EGL context.
- Tonemapper object gets created with secure EGL context for the tone
  mapping of secure HDR layer.

CRs-Fixed: 2048764
Change-Id: I7129505283527dbab17f1e9731d8f141b48bb310
2017-05-23 18:09:45 -07:00
Arun Kumar K.R
99ff47d39e display: Store and restore the current eglContext
Tone mapper engine setting the current eglContext and never
restored it.  With multiple eglContexts used in same thread
by SurfaceFlinger and GPU Tonemapper, it lead to incorrect
eglContexts being used, hence always store the restore the
eglContext in each GPUTonemapper call.

CRs-Fixed: 2009259
Change-Id: Ic9fe73818ddfe3881e5fa82f7853dce130bba24e
2017-05-07 12:11:37 -07:00
Arun Kumar K.R
1d1e57dc0e gpu_tonemapper: Adjust sample points to maintain linearity
Adjust texture sample points to maintain linearity throughout the
sample range

CRs-Fixed: 1110654
Change-Id: I2c198c9f330a0b6001d2eda28c0355f2c9ecbde4
2017-05-07 12:10:23 -07:00
Arun Kumar K.R
4a8b118e2b display: Use ion cookie in GPU Tonemapper
- The fd's used for book-keeping can change when the clients
  close and reopen sessions, hence they are not reliable and
  can lead to incorrect virtual address usage causing
  corruption or stale data.
- Hence use ion cookie for book-keeping which is unique for a
  given memory fd.
- Use LRU method free up/reuse on reaching max limit.
- Remove Tonemapper_destroy which is not needed anymore.

Change-Id: I5777649b34210977c18ce20c65e0aa2baa8e7d26
Crs-fixed: 1110175
2017-01-27 17:52:14 -08:00
Arun Kumar K.R
1b04a4ee50 gpu_tonemapper: Use individual EGL contexts.
- Use individual EGL contexts for each tone-mapping
  session.
- Having one context make multiple sessions serial, this
  helps in making this parallel when possible.
- Resolves error messages which happened when the context
  was deleted during mirroring.

Change-Id: Ia8738551b4189dccffb233320a9d69fcfd7f0118
Crs-fixed: 1115057
2017-01-23 19:31:56 -08:00
Arun Kumar K.R
d612a57d8f gpu_tonemapper: Get Current EGL context in Destructor
Need to switch to current egl context before deleting the
program other wise it leads to errors and may not clean up
cleanly on deletion.

Change-Id: Ib4c59511e6aec7c7dd7b27ea26e26b189f9bc87f
Crs-fixed: 1113295
Crs-fixed: 1110936
2017-01-19 12:50:40 -08:00
Sushil Chauhan
1cc416f122 gpu_tonemapper: Clear EGLImage mappings in Tonemapper
Tonemapper does not clear the eglImage/fd mappings in the destructor,
which leads to incorrect usage of those fds, when a tone map session
gets deleted and a new session gets created, leading to artifcats.

CRs-Fixed: 1104823
Change-Id: I9697eff93f9e5f150796a582f471246bca3b2816
2017-01-11 18:51:08 -08:00
Arun Kumar K.R
2b75da399a gpu_tonemapper: Include gpu tonemapper
GPU tonemapper library which is used by HWC to tone
map the layers from one Gamut to another based on the
3D LUT.

Change-Id: Iccaa38e40989e832fd3891a24eca494aba696d9a
Crs-fixed: 1094964
2016-12-16 11:26:15 -08:00