Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ddci_init(): submaster_initializer not called if implicit initialization
ddci_init() can be called "explicitly" or "implicitly". An explicit call is when it is called either from ddca_init() or ddca_init2(). If an API function dependent on initialization is called before explicit initialization, ddci_init() is called with arguments such that it can never fail. This is an implicit call. In particular, it is called with option DDCA_INIT_OPTIONS_DISABLE_CONFIG_FILE and a null libopts string. Otherwise failure would be possible. The bug was that some initialization did not occur with this combination of ddci_init() args. In particular, submaster_initializer(), which among other things sets the value of sys_drm_connectors, was not called. Also any options in the ddcutilrc configuration file that turned on tracing were not processed, making debugging more difficult. PowerDevil calls API functions requiring initialization before calling ddca_init(). As a result, there's an implicit call to ddci_init(), and because of the bug sys_drm_connectors is not set, resulting in the "assert(sys_drm_connectors)" failure in function i2c_check_bus().
- Loading branch information