Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

external-minigbm: Commit

external/minigbm


Commit MetaInfo

Revision0d6ab772de028a2f26eba39299fcdd483288e1ef (tree)
Time2020-04-20 17:43:56
AuthorMauro Rossi <issor.oruam@gmai...>
CommiterMauro Rossi

Log Message

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.

Change Summary

Incremental Difference

--- a/cros_gralloc/gralloc0/gralloc0.cc
+++ b/cros_gralloc/gralloc0/gralloc0.cc
@@ -245,7 +245,7 @@ static int gralloc0_register_buffer(struct gralloc_module_t const *module, buffe
245245 auto mod = const_cast<struct gralloc0_module *>(const_module);
246246
247247 if (!mod->initialized)
248- if (gralloc0_init(mod, false))
248+ if (gralloc0_init(mod, true))
249249 return -ENODEV;
250250
251251 int ret = mod->driver->retain(handle);
Show on old repository browser