Commit Graph

8 Commits

Author SHA1 Message Date
Greg Hackmann 52ae36ed57 libadf: adf_test: fix crash on adf.devices failure
If devs is uninitialized and adf_devices() fails, we'll end up passing
the uninitialized pointer to free().

Test: /data/nativetest64/adf-unit-tests/adf-unit-tests (on Nexus 9 w/o root)
Change-Id: Ifc6038c1da14d32ee564675bac54fc7df2623c1d
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-02-22 11:07:15 -08:00
Greg Hackmann 095da6fb73 libadf: support ADF_{POST,SIMPLE_POST}_CONFIG_V2 ioctls
adf_{device,interface_simple}_post_v2 let the client choose what kind of
fence is returned from the kernel:

* ADF_COMPLETE_FENCE_NONE: no fence is returned
* ADF_COMPLETE_FENCE_PRESENT: the returned fence fires when the
  specified configuration appears on the screen
* ADF_COMPLETE_FENCE_RELEASE: the returned fence fires when the
  specified configuration is removed from the screen

The "V2" calls with fence type ADF_COMPLETE_FENCE_RELEASE are functionally
equivalent to "V1" calls.

Test: included gtest (on Nexus 9)
Change-Id: I36190d1b6cea0fbaed2af3ad64fa4729200c5520
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-02-14 16:06:05 -08:00
Greg Hackmann 09f8f986a9 libadf: adf_test: fix clang + kati build
kati needs us to add "tests" as a subdir of the libadf Android.bp.
clang also requires an explicit definition of AdfTest::dev_id where
g++ does not.

Test: mmm system/core/adf/libadf
Test: /data/nativetest64/adf-unit-tests/adf-unit-tests (on Nexus 9)
Change-Id: I1fc371af1b5b115f088edd963a87e6647a52882b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2017-01-31 22:55:46 +00:00
Dan Willemsen 45f05240c2 Convert more Android.mk files to Android.bp
These modules have their dependencies satisfied, and aren't doing
anything strange.

Change-Id: I72039a15256cbd5e5eee0d79a15d66d74a6c087d
2016-07-13 17:41:45 -07:00
Greg Hackmann e6b793c7b0 libadf: enable -Werror
Bug: 19606869

Change-Id: If2ea55732e71e8288641b6b34d229b367fd3fb3b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-03-10 15:14:38 -07:00
Greg Hackmann 39b0c1c67d libadf: tests: fix signed/unsigned comparison warnings
Bug: 19606869

Change-Id: I29cfa363b6640cc13973c1023d2f4ea1a97e3af2
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-03-10 15:14:38 -07:00
Greg Hackmann bfdbb2fcf0 libadf: add tests for various failure modes
Change-Id: I1b13e84c6663cb73af2829bedd3514119a01764c
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-05-07 15:28:05 -07:00
Greg Hackmann 29925dcc89 libadf: add tests
Change-Id: I353099bf194d4d566c720e44190ad34f407f3dce
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-05-07 15:28:05 -07:00