compositor-drm: don't pass option_connector to create_outputs
The connector option is a part of drm_backend struct. Therefore, it is not needed to pass it as an argument to create_outputs function. Signed-off-by: Emre Ucan <eucan@de.adit-jv.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Acked-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
21e4944178
commit
9a200d7559
@@ -2664,8 +2664,7 @@ destroy_sprites(struct drm_backend *backend)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
create_outputs(struct drm_backend *b, uint32_t option_connector,
|
create_outputs(struct drm_backend *b, struct udev_device *drm_device)
|
||||||
struct udev_device *drm_device)
|
|
||||||
{
|
{
|
||||||
drmModeConnector *connector;
|
drmModeConnector *connector;
|
||||||
drmModeRes *resources;
|
drmModeRes *resources;
|
||||||
@@ -2689,8 +2688,8 @@ create_outputs(struct drm_backend *b, uint32_t option_connector,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (connector->connection == DRM_MODE_CONNECTED &&
|
if (connector->connection == DRM_MODE_CONNECTED &&
|
||||||
(option_connector == 0 ||
|
(b->connector == 0 ||
|
||||||
connector->connector_id == option_connector)) {
|
connector->connector_id == b->connector)) {
|
||||||
if (create_output_for_connector(b, resources,
|
if (create_output_for_connector(b, resources,
|
||||||
connector, drm_device) < 0) {
|
connector, drm_device) < 0) {
|
||||||
drmModeFreeConnector(connector);
|
drmModeFreeConnector(connector);
|
||||||
@@ -3228,7 +3227,7 @@ drm_backend_create(struct weston_compositor *compositor,
|
|||||||
|
|
||||||
b->connector = config->connector;
|
b->connector = config->connector;
|
||||||
|
|
||||||
if (create_outputs(b, config->connector, drm_device) < 0) {
|
if (create_outputs(b, drm_device) < 0) {
|
||||||
weston_log("failed to create output for %s\n", path);
|
weston_log("failed to create output for %s\n", path);
|
||||||
goto err_udev_input;
|
goto err_udev_input;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user