update connector to wrong drm_device
Hello team!
Recently, I read the weston source code, and a possible error was found in a piece of code.
static void
drm_backend_update_connectors(struct drm_device *device,
struct udev_device *drm_device)
{
...
assert(head == NULL || writeback == NULL);
if (head) {
ret = drm_head_update_info(head, conn);
if (head->base.device_changed)
drm_head_log_info(head, "updated");
} else if (writeback) {
ret = drm_writeback_update_info(writeback, conn);
} else {
ret = drm_backend_add_connector(b->drm, conn, drm_device);
}
}
For the code ret = drm_backend_add_connector(b->drm, conn, drm_device);
If both the head
and writeback
are NULL
, then it should be add connector from the drm device passed by the function, not the b->drm
device, this is because the weston is support multi-GPU, so I think it should be changed with:
ret = drm_backend_add_connector(device, conn, drm_device);
Is this right?
Snow Best regards
Edited by zhou liang