gettimeofday() function returns wall clock time which can change if the
time is updated using NTP etc. Use clock_gettime() function to get
monotonic clock time to safely and reliably measure elapsed time in
a program.
CRs-Fixed: 2190449
Change-Id: Icc7e470b6427db58837473039d0537748de5b2aa
Implement the hidl .hal interfaces directly instead of using the
default shims.
This is required since new additions to .hal will no longer be
added to the legacy gralloc1 C header.
Change-Id: If577a14f75d7d13da0ff656c96ab451d21c910ce
Buffer fd for layers/client target is getting closed in ComposerClient
without hwcomposer knowledge, So creation of fb_id for that buffer
failed during DP disconnect. Hence duplicate the buffer fd to avoid
create fb id failures.
Change-Id: I7fb04aff9605ac28a64dcd615fa4804caa923996
CRs-Fixed: 2157977
To compare for Skip Validate feature, update the layer frame rate
from the buffer metadata, only if it is valid.
CRs-Fixed: 2175653
Change-Id: Ia3f6a8e928ded91c26729062e7ed20a687744ad1
Fix cancel_lock condition while coming out of validate. HWCDisplay
can return Error::HasChanges code which is not an actual error
Change-Id: Id5886b27baaba0e34fa3a0e8d919da7ac8a9e495
CRs-fixed: 2175020
If a layer is created or destroyed before Dump, the layer stack
is in invalid state. Prevent SDM Dump if stack hasn't been validated.
Change-Id: I1ce14a058d05d9d4204b69ea8f8fb7e7a035448e
CRs-fixed: 2165898
The ClearRequestFlags() method iterates over layer_stack_ instead of
layer_set_. This causes a use-after-free since DestroyLayer() removes
layer from layer_set_ only. Besides that, the method need not be
virtual and has a redundant loop. This change removes the
ClearRequestFlags() method and clears flags in an existing loop.
Present() bails out if layer_set_ is empty or a shutdown is pending.
Since layers could have been destroyed before Present(), ideally
bailing out on re-validation has a higher priority over the rest.
Change-Id: Ic7b31bbd07a22b8df47fccb2024b3415ab3a559b
CRs-fixed: 2165926
Update the value of GRALLOC1_CONSUMER_USAGE_PRIVATE_SECURE_DISPLAY
as it conflicts with BufferUsage::GPU_DATA_BUFFER.
Change-Id: I7c236705528e6fc9d06ba298527e314da030bd34
CRs-Fixed: 2169110
ComposerClient calls RegisterCallbacks() with nullptr to deregister
callbacks when SF dies. Allow this operation to avoid crashes since
HWC is still active.
Change-Id: I431d232130ec8cfb06cc40e81ef4e733496aa442
CRs-fixed: 2165931
Disabling compilation of display hal module if build flag
TARGET_DISABLE_DISPLAY is set to true.
Change-Id: I4ce621803601a1412e173224f41da6e5a219688c
CRs-Fixed: 2170353
Currently VBlank registration happens even if polling thread wakes up
for other events. This causes multiple wake-ups on actual VBlank.
This change registers for VBlank in VBlank handler and on VBlank
enable, if it's not already registered.
Change-Id: I4aada5a5bd28382d60c68865c20eaabda5325ccf
CRs-fixed: 2167257
Close acquire fence fd of the null buffer with client requested
composition is DEVICE/CURSOR
Change-Id: I40a4a0ddc413af797a04fff39a2f0b5c4c9396af
CRs-Fixed: 2167175
HWC allows destruction of layers between Validate and Commit.
Buffer fds could also get updated in between. Unregister fb_id after
Validate to avoid carrying over stale fds as keys to Commit
Change-Id: Ic26a7644ffb1fb4da26b24364a33ac9293031867
CRs-Fixed: 2157977