Lines Matching full:connector
68 struct drm_connector *connector = to_drm_connector(dev); in drm_connector_acpi_find_companion() local
70 return to_acpi_device_node(connector->fwnode); in drm_connector_acpi_find_companion()
152 * Connector properties
158 struct drm_connector *connector = to_drm_connector(device); in status_store() local
159 struct drm_device *dev = connector->dev; in status_store()
167 old_force = connector->force; in status_store()
170 connector->force = 0; in status_store()
172 connector->force = DRM_FORCE_ON; in status_store()
174 connector->force = DRM_FORCE_ON_DIGITAL; in status_store()
176 connector->force = DRM_FORCE_OFF; in status_store()
180 if (old_force != connector->force || !connector->force) { in status_store()
181 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n", in status_store()
182 connector->base.id, in status_store()
183 connector->name, in status_store()
184 old_force, connector->force); in status_store()
186 connector->funcs->fill_modes(connector, in status_store()
200 struct drm_connector *connector = to_drm_connector(device); in status_show() local
203 status = READ_ONCE(connector->status); in status_show()
213 struct drm_connector *connector = to_drm_connector(device); in dpms_show() local
216 dpms = READ_ONCE(connector->dpms); in dpms_show()
225 struct drm_connector *connector = to_drm_connector(device); in enabled_show() local
228 enabled = READ_ONCE(connector->encoder); in enabled_show()
238 struct drm_connector *connector = to_drm_connector(connector_dev); in edid_show() local
243 mutex_lock(&connector->dev->mode_config.mutex); in edid_show()
244 if (!connector->edid_blob_ptr) in edid_show()
247 edid = connector->edid_blob_ptr->data; in edid_show()
248 size = connector->edid_blob_ptr->length; in edid_show()
261 mutex_unlock(&connector->dev->mode_config.mutex); in edid_show()
270 struct drm_connector *connector = to_drm_connector(device); in modes_show() local
274 mutex_lock(&connector->dev->mode_config.mutex); in modes_show()
275 list_for_each_entry(mode, &connector->modes, head) { in modes_show()
279 mutex_unlock(&connector->dev->mode_config.mutex); in modes_show()
319 int drm_sysfs_connector_add(struct drm_connector *connector) in drm_sysfs_connector_add() argument
321 struct drm_device *dev = connector->dev; in drm_sysfs_connector_add()
325 if (connector->kdev) in drm_sysfs_connector_add()
338 dev_set_drvdata(kdev, connector); in drm_sysfs_connector_add()
340 r = dev_set_name(kdev, "card%d-%s", dev->primary->index, connector->name); in drm_sysfs_connector_add()
345 connector->name); in drm_sysfs_connector_add()
349 drm_err(dev, "failed to register connector device: %d\n", r); in drm_sysfs_connector_add()
353 connector->kdev = kdev; in drm_sysfs_connector_add()
355 if (connector->ddc) in drm_sysfs_connector_add()
356 return sysfs_create_link(&connector->kdev->kobj, in drm_sysfs_connector_add()
357 &connector->ddc->dev.kobj, "ddc"); in drm_sysfs_connector_add()
365 void drm_sysfs_connector_remove(struct drm_connector *connector) in drm_sysfs_connector_remove() argument
367 if (!connector->kdev) in drm_sysfs_connector_remove()
370 if (connector->ddc) in drm_sysfs_connector_remove()
371 sysfs_remove_link(&connector->kdev->kobj, "ddc"); in drm_sysfs_connector_remove()
374 connector->name); in drm_sysfs_connector_remove()
376 device_unregister(connector->kdev); in drm_sysfs_connector_remove()
377 connector->kdev = NULL; in drm_sysfs_connector_remove()
399 * for uevents on connector status change.
413 * drm_sysfs_connector_hotplug_event - generate a DRM uevent for any connector
415 * @connector: connector which has changed
417 * Send a uevent for the DRM connector specified by @connector. This will send
418 * a uevent with the properties HOTPLUG=1 and CONNECTOR.
420 void drm_sysfs_connector_hotplug_event(struct drm_connector *connector) in drm_sysfs_connector_hotplug_event() argument
422 struct drm_device *dev = connector->dev; in drm_sysfs_connector_hotplug_event()
427 "CONNECTOR=%u", connector->base.id); in drm_sysfs_connector_hotplug_event()
429 drm_dbg_kms(connector->dev, in drm_sysfs_connector_hotplug_event()
430 "[CONNECTOR:%d:%s] generating connector hotplug event\n", in drm_sysfs_connector_hotplug_event()
431 connector->base.id, connector->name); in drm_sysfs_connector_hotplug_event()
438 * drm_sysfs_connector_status_event - generate a DRM uevent for connector
440 * @connector: connector on which property status changed
441 * @property: connector property whose status changed.
444 * set HOTPLUG=1 and connector id along with the attached property id
447 void drm_sysfs_connector_status_event(struct drm_connector *connector, in drm_sysfs_connector_status_event() argument
450 struct drm_device *dev = connector->dev; in drm_sysfs_connector_status_event()
454 WARN_ON(!drm_mode_obj_find_prop_id(&connector->base, in drm_sysfs_connector_status_event()
458 "CONNECTOR=%u", connector->base.id); in drm_sysfs_connector_status_event()
462 DRM_DEBUG("generating connector status event\n"); in drm_sysfs_connector_status_event()