Lines Matching full:connector

71 	struct drm_connector *connector = to_drm_connector(dev);  in drm_connector_acpi_find_companion()  local
73 return to_acpi_device_node(connector->fwnode); in drm_connector_acpi_find_companion()
183 * Connector properties
189 struct drm_connector *connector = to_drm_connector(device); in status_store() local
190 struct drm_device *dev = connector->dev; in status_store()
198 old_force = connector->force; in status_store()
201 connector->force = 0; in status_store()
203 connector->force = DRM_FORCE_ON; in status_store()
205 connector->force = DRM_FORCE_ON_DIGITAL; in status_store()
207 connector->force = DRM_FORCE_OFF; in status_store()
211 if (old_force != connector->force || !connector->force) { in status_store()
212 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n", in status_store()
213 connector->base.id, connector->name, in status_store()
214 old_force, connector->force); in status_store()
216 connector->funcs->fill_modes(connector, in status_store()
230 struct drm_connector *connector = to_drm_connector(device); in status_show() local
233 status = READ_ONCE(connector->status); in status_show()
243 struct drm_connector *connector = to_drm_connector(device); in dpms_show() local
246 dpms = READ_ONCE(connector->dpms); in dpms_show()
255 struct drm_connector *connector = to_drm_connector(device); in enabled_show() local
258 enabled = READ_ONCE(connector->encoder); in enabled_show()
268 struct drm_connector *connector = to_drm_connector(connector_dev); in edid_show() local
271 ret = drm_edid_connector_property_show(connector, buf, off, count); in edid_show()
280 struct drm_connector *connector = to_drm_connector(device); in modes_show() local
284 mutex_lock(&connector->dev->mode_config.mutex); in modes_show()
285 list_for_each_entry(mode, &connector->modes, head) { in modes_show()
289 mutex_unlock(&connector->dev->mode_config.mutex); in modes_show()
298 struct drm_connector *connector = to_drm_connector(device); in connector_id_show() local
300 return sysfs_emit(buf, "%d\n", connector->base.id); in connector_id_show()
340 int drm_sysfs_connector_add(struct drm_connector *connector) in drm_sysfs_connector_add() argument
342 struct drm_device *dev = connector->dev; in drm_sysfs_connector_add()
346 if (connector->kdev) in drm_sysfs_connector_add()
359 dev_set_drvdata(kdev, connector); in drm_sysfs_connector_add()
361 r = dev_set_name(kdev, "card%d-%s", dev->primary->index, connector->name); in drm_sysfs_connector_add()
365 drm_dbg_kms(dev, "[CONNECTOR:%d:%s] adding connector to sysfs\n", in drm_sysfs_connector_add()
366 connector->base.id, connector->name); in drm_sysfs_connector_add()
370 drm_err(dev, "failed to register connector device: %d\n", r); in drm_sysfs_connector_add()
374 connector->kdev = kdev; in drm_sysfs_connector_add()
379 drm_err(dev, "failed to add component to create link to typec connector\n"); in drm_sysfs_connector_add()
389 int drm_sysfs_connector_add_late(struct drm_connector *connector) in drm_sysfs_connector_add_late() argument
391 if (connector->ddc) in drm_sysfs_connector_add_late()
392 return sysfs_create_link(&connector->kdev->kobj, in drm_sysfs_connector_add_late()
393 &connector->ddc->dev.kobj, "ddc"); in drm_sysfs_connector_add_late()
398 void drm_sysfs_connector_remove_early(struct drm_connector *connector) in drm_sysfs_connector_remove_early() argument
400 if (connector->ddc) in drm_sysfs_connector_remove_early()
401 sysfs_remove_link(&connector->kdev->kobj, "ddc"); in drm_sysfs_connector_remove_early()
404 void drm_sysfs_connector_remove(struct drm_connector *connector) in drm_sysfs_connector_remove() argument
406 if (!connector->kdev) in drm_sysfs_connector_remove()
409 if (dev_fwnode(connector->kdev)) in drm_sysfs_connector_remove()
410 component_del(connector->kdev, &typec_connector_ops); in drm_sysfs_connector_remove()
412 drm_dbg_kms(connector->dev, in drm_sysfs_connector_remove()
413 "[CONNECTOR:%d:%s] removing connector from sysfs\n", in drm_sysfs_connector_remove()
414 connector->base.id, connector->name); in drm_sysfs_connector_remove()
416 device_unregister(connector->kdev); in drm_sysfs_connector_remove()
417 connector->kdev = NULL; in drm_sysfs_connector_remove()
439 * for uevents on connector status change.
453 * drm_sysfs_connector_hotplug_event - generate a DRM uevent for any connector
455 * @connector: connector which has changed
457 * Send a uevent for the DRM connector specified by @connector. This will send
458 * a uevent with the properties HOTPLUG=1 and CONNECTOR.
460 void drm_sysfs_connector_hotplug_event(struct drm_connector *connector) in drm_sysfs_connector_hotplug_event() argument
462 struct drm_device *dev = connector->dev; in drm_sysfs_connector_hotplug_event()
467 "CONNECTOR=%u", connector->base.id); in drm_sysfs_connector_hotplug_event()
469 drm_dbg_kms(connector->dev, in drm_sysfs_connector_hotplug_event()
470 "[CONNECTOR:%d:%s] generating connector hotplug event\n", in drm_sysfs_connector_hotplug_event()
471 connector->base.id, connector->name); in drm_sysfs_connector_hotplug_event()
478 * drm_sysfs_connector_property_event - generate a DRM uevent for connector
480 * @connector: connector on which property changed
481 * @property: connector property which has changed.
483 * Send a uevent for the specified DRM connector and property. Currently we
484 * set HOTPLUG=1 and connector id along with the attached property id
487 void drm_sysfs_connector_property_event(struct drm_connector *connector, in drm_sysfs_connector_property_event() argument
490 struct drm_device *dev = connector->dev; in drm_sysfs_connector_property_event()
494 WARN_ON(!drm_mode_obj_find_prop_id(&connector->base, in drm_sysfs_connector_property_event()
498 "CONNECTOR=%u", connector->base.id); in drm_sysfs_connector_property_event()
502 drm_dbg_kms(connector->dev, in drm_sysfs_connector_property_event()
503 "[CONNECTOR:%d:%s] generating connector property event for [PROP:%d:%s]\n", in drm_sysfs_connector_property_event()
504 connector->base.id, connector->name, in drm_sysfs_connector_property_event()