Lines Matching full:connector

106  * Connector properties
112 struct drm_connector *connector = to_drm_connector(device); in status_store() local
113 struct drm_device *dev = connector->dev; in status_store()
121 old_force = connector->force; in status_store()
124 connector->force = 0; in status_store()
126 connector->force = DRM_FORCE_ON; in status_store()
128 connector->force = DRM_FORCE_ON_DIGITAL; in status_store()
130 connector->force = DRM_FORCE_OFF; in status_store()
134 if (old_force != connector->force || !connector->force) { in status_store()
135 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] force updated from %d to %d or reprobing\n", in status_store()
136 connector->base.id, in status_store()
137 connector->name, in status_store()
138 old_force, connector->force); in status_store()
140 connector->funcs->fill_modes(connector, in status_store()
154 struct drm_connector *connector = to_drm_connector(device); in status_show() local
157 status = READ_ONCE(connector->status); in status_show()
167 struct drm_connector *connector = to_drm_connector(device); in dpms_show() local
170 dpms = READ_ONCE(connector->dpms); in dpms_show()
180 struct drm_connector *connector = to_drm_connector(device); in enabled_show() local
183 enabled = READ_ONCE(connector->encoder); in enabled_show()
193 struct drm_connector *connector = to_drm_connector(connector_dev); in edid_show() local
198 mutex_lock(&connector->dev->mode_config.mutex); in edid_show()
199 if (!connector->edid_blob_ptr) in edid_show()
202 edid = connector->edid_blob_ptr->data; in edid_show()
203 size = connector->edid_blob_ptr->length; in edid_show()
216 mutex_unlock(&connector->dev->mode_config.mutex); in edid_show()
225 struct drm_connector *connector = to_drm_connector(device); in modes_show() local
229 mutex_lock(&connector->dev->mode_config.mutex); in modes_show()
230 list_for_each_entry(mode, &connector->modes, head) { in modes_show()
234 mutex_unlock(&connector->dev->mode_config.mutex); in modes_show()
274 int drm_sysfs_connector_add(struct drm_connector *connector) in drm_sysfs_connector_add() argument
276 struct drm_device *dev = connector->dev; in drm_sysfs_connector_add()
278 if (connector->kdev) in drm_sysfs_connector_add()
281 connector->kdev = in drm_sysfs_connector_add()
283 connector, connector_dev_groups, in drm_sysfs_connector_add()
285 connector->name); in drm_sysfs_connector_add()
287 connector->name); in drm_sysfs_connector_add()
289 if (IS_ERR(connector->kdev)) { in drm_sysfs_connector_add()
290 DRM_ERROR("failed to register connector device: %ld\n", PTR_ERR(connector->kdev)); in drm_sysfs_connector_add()
291 return PTR_ERR(connector->kdev); in drm_sysfs_connector_add()
294 if (connector->ddc) in drm_sysfs_connector_add()
295 return sysfs_create_link(&connector->kdev->kobj, in drm_sysfs_connector_add()
296 &connector->ddc->dev.kobj, "ddc"); in drm_sysfs_connector_add()
300 void drm_sysfs_connector_remove(struct drm_connector *connector) in drm_sysfs_connector_remove() argument
302 if (!connector->kdev) in drm_sysfs_connector_remove()
305 if (connector->ddc) in drm_sysfs_connector_remove()
306 sysfs_remove_link(&connector->kdev->kobj, "ddc"); in drm_sysfs_connector_remove()
309 connector->name); in drm_sysfs_connector_remove()
311 device_unregister(connector->kdev); in drm_sysfs_connector_remove()
312 connector->kdev = NULL; in drm_sysfs_connector_remove()
334 * for uevents on connector status change.
348 * drm_sysfs_connector_status_event - generate a DRM uevent for connector
350 * @connector: connector on which property status changed
351 * @property: connector property whose status changed.
354 * set HOTPLUG=1 and connector id along with the attached property id
357 void drm_sysfs_connector_status_event(struct drm_connector *connector, in drm_sysfs_connector_status_event() argument
360 struct drm_device *dev = connector->dev; in drm_sysfs_connector_status_event()
364 WARN_ON(!drm_mode_obj_find_prop_id(&connector->base, in drm_sysfs_connector_status_event()
368 "CONNECTOR=%u", connector->base.id); in drm_sysfs_connector_status_event()
372 DRM_DEBUG("generating connector status event\n"); in drm_sysfs_connector_status_event()