Commit Graph

9 Commits

Author SHA1 Message Date
Dileep Marchya
bca3c7bdd1 sdm: Identify device node path before opening.
- Check existence of /dev/graphic/fb* and /dev/fb* path
  and open appropriate device node.

CRs-Fixed: 1062882
Change-Id: Icd1f2a3f444a748eb05a7abbe9f98eae25cf254a
2016-09-02 16:38:30 +05:30
Dileep Marchya
2976276657 sdm: Fix return value of DynLib::Open method.
- Check for NULL library handle in return value for Open method.

CRs-Fixed: 1042296
Change-Id: I524ac5b292eb88ba603067a55b2e4bea0372ae08
2016-07-15 14:55:00 +05:30
Dileep Marchya
52e51e4e83 sdm: Add DynLib utility for dynamic library lifecycle management.
- Add DynLib utility to automatically unload libraries upon
  destruction of the utility object.

CRs-Fixed: 1029997
Change-Id: I4e13ad984949db170498fe1ec5c133fa4a798bdd
2016-06-16 19:49:06 +05:30
Dileep Marchya
a5aee8daab sdm: Use fstream to read sysfs entries.
- Replace FILE operations with fstream templates to read sysfs entries.

CRs-Fixed: 1029997
Change-Id: I5603617cbada01a4651394577bed56de38f9f060
2016-06-16 19:44:30 +05:30
Tatenda Chipeperekwa
352a0baeab sdm: Add sys wrappers for read, write, eventfd system calls
Add function pointers for read, write, and eventfd in Sys
wrapper and call these instead of directly calling system calls.

CRs-Fixed: 814136
Change-Id: I9964df85be2f6eaa83371b71971c642a768830f8
2016-04-20 23:41:17 -07:00
Ramkumar Radhakrishnan
d8690a236d sdm: Use Sys wrapper for dup() call
Add function pointer for dup() in Sys wrapper and call it instead of
calling system calls.

Change-Id: Ia18edfd84ac1b64cc32f01a868ee9d71406a427b
2015-09-01 22:08:44 -07:00
Dileep Marchya
114e51fb9a sdm: Cancel display event thread on exit.
- Send a cancellation request to display event thread before waiting
  for it join. This thread waits for poll to return indefinitely
  which may not return if all of the events (vsync etc) are in
  disabled state.
- Drop this call for Android for now as this api is not supported in
  bionic.
- Fix GetVSyncState return value.
- Fix pwrite return value in case of set on idle time out.

Change-Id: I7da5be4c8a77fa986450dedb914fa2dba2751da9
2015-08-18 23:32:46 -07:00
Chiou-Hao Hsu
c604fb58be sdm: add header unistd.h
Change-Id: Iba7212186a0e4bc7f5a425d0b31724a63fd9bd8b
2015-07-15 11:47:42 -07:00
Dileep Marchya
de0339e3c3 sdm: Add Sys::* types for system call wrappers.
- Add Sys class which encapsulates all system calls.
- Fix crash if display initialization failed.

Change-Id: I622aa7f415bf10a6c65a730cbe0dcf2426bae963
2015-06-18 13:12:49 -07:00