external/minigbm
Revision | 0d6ab772de028a2f26eba39299fcdd483288e1ef (tree) |
---|---|
Time | 2020-04-20 17:43:56 |
Author | Mauro Rossi <issor.oruam@gmai...> |
Commiter | Mauro Rossi |
gralloc0_register_buffer: initialize gralloc0 when needed
Based on Michael Goffioul "Always initialize gralloc0 module"
considerign that !mod->initialized defines the condition when it's needed.
Original commit message:
Both mapper and allocator HIDL adapter uses the same gralloc module, but
the mapper HILD does not fully initialize the module, leaving the
allocator HIDL in limbo if the mapper HIDL is called first.
Fixes SystemUI crash on startup.
@@ -245,7 +245,7 @@ static int gralloc0_register_buffer(struct gralloc_module_t const *module, buffe | ||
245 | 245 | auto mod = const_cast<struct gralloc0_module *>(const_module); |
246 | 246 | |
247 | 247 | if (!mod->initialized) |
248 | - if (gralloc0_init(mod, false)) | |
248 | + if (gralloc0_init(mod, true)) | |
249 | 249 | return -ENODEV; |
250 | 250 | |
251 | 251 | int ret = mod->driver->retain(handle); |