hardware/intel/hwcomposer
修訂 | e501508da0dc18dc2d88a783da7038503e75ee58 (tree) |
---|---|
時間 | 2013-05-16 21:30:31 |
作者 | Marius Predut <marius-ionut.predut@inte...> |
Commiter | Marius Predut |
hwcomposer: correct errors hadling stuff
-when the driver is open(hwc_device_open) set output data only when all potential
-fix compiler warning messages.
-remove duplicated inclusion.
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Change-Id: Ib7c1ad060a314f3235f7153ca112a5da58f760f3
Signed-off-by: Marius Predut <marius-ionut.predut@intel.com>
@@ -32,7 +32,7 @@ | ||
32 | 32 | |
33 | 33 | #include <EGL/egl.h> |
34 | 34 | |
35 | -#define HWC_REMOVE_DEPRECATED_VERSIONS 1 | |
35 | +#define LOG_TAG "hwcomposer" | |
36 | 36 | |
37 | 37 | #include <Condition.h> |
38 | 38 | #include <Mutex.h> |
@@ -57,6 +57,8 @@ hwc_module_t HAL_MODULE_INFO_SYM = { | ||
57 | 57 | name: "Intel hwcomposer module", |
58 | 58 | author: "Intel", |
59 | 59 | methods: &hwc_module_methods, |
60 | + dso: NULL, | |
61 | + {0} | |
60 | 62 | } |
61 | 63 | }; |
62 | 64 |
@@ -251,10 +253,14 @@ static int hwc_device_open(const struct hw_module_t* module, const char* name, | ||
251 | 253 | dev->device.registerProcs = hwc_register_procs; |
252 | 254 | dev->device.eventControl = hwc_event_control; |
253 | 255 | |
254 | - *device = &dev->device.common; | |
255 | - | |
256 | 256 | int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, |
257 | 257 | (const hw_module_t **)&dev->gralloc_module); |
258 | + if (err != 0) { | |
259 | + ALOGE("hwc_device_open failed!\n"); | |
260 | + return -errno; | |
261 | + } | |
262 | + | |
263 | + *device = &dev->device.common; | |
258 | 264 | |
259 | 265 | dev->vsync_thread = new vsync_worker(*dev); |
260 | 266 |