Lines Matching refs:connector
24 struct drm_connector connector; member
43 static inline struct gud_connector *to_gud_connector(struct drm_connector *connector) in to_gud_connector() argument
45 return container_of(connector, struct gud_connector, connector); in to_gud_connector()
48 static void gud_conn_err(struct drm_connector *connector, const char *msg, int ret) in gud_conn_err() argument
50 dev_err(connector->dev->dev, "%s: %s (ret=%d)\n", connector->name, msg, ret); in gud_conn_err()
61 struct drm_connector *connector = &gconn->connector; in gud_connector_backlight_update_status_work() local
63 struct drm_device *drm = connector->dev; in gud_connector_backlight_update_status_work()
80 connector_state = drm_atomic_get_connector_state(state, connector); in gud_connector_backlight_update_status_work()
110 struct drm_connector *connector = bl_get_data(bd); in gud_connector_backlight_update_status() local
111 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_backlight_update_status()
125 struct drm_connector *connector = &gconn->connector; in gud_connector_backlight_register() local
136 connector->dev->primary->index, connector->name); in gud_connector_backlight_register()
140 bd = backlight_device_register(name, connector->kdev, connector, in gud_connector_backlight_register()
151 static int gud_connector_detect(struct drm_connector *connector, in gud_connector_detect() argument
154 struct gud_device *gdrm = to_gud_device(connector->dev); in gud_connector_detect()
158 if (!drm_dev_enter(connector->dev, &idx)) in gud_connector_detect()
163 connector->index, NULL, 0); in gud_connector_detect()
170 ret = gud_usb_get_u8(gdrm, GUD_REQ_GET_CONNECTOR_STATUS, connector->index, &status); in gud_connector_detect()
189 connector->epoch_counter += 1; in gud_connector_detect()
217 static int gud_connector_get_modes(struct drm_connector *connector) in gud_connector_get_modes() argument
219 struct gud_device *gdrm = to_gud_device(connector->dev); in gud_connector_get_modes()
226 if (!drm_dev_enter(connector->dev, &idx)) in gud_connector_get_modes()
234 ret = gud_usb_get(gdrm, GUD_REQ_GET_CONNECTOR_EDID, connector->index, in gud_connector_get_modes()
237 gud_conn_err(connector, "Invalid EDID size", ret); in gud_connector_get_modes()
240 edid = drm_do_get_edid(connector, gud_connector_get_edid_block, &edid_ctx); in gud_connector_get_modes()
244 drm_connector_update_edid_property(connector, edid); in gud_connector_get_modes()
253 ret = gud_usb_get(gdrm, GUD_REQ_GET_CONNECTOR_MODES, connector->index, in gud_connector_get_modes()
258 gud_conn_err(connector, "Invalid display mode array size", ret); in gud_connector_get_modes()
267 mode = drm_mode_create(connector->dev); in gud_connector_get_modes()
274 drm_mode_probed_add(connector, mode); in gud_connector_get_modes()
278 num_modes = drm_add_edid_modes(connector, edid); in gud_connector_get_modes()
287 static int gud_connector_atomic_check(struct drm_connector *connector, in gud_connector_atomic_check() argument
294 new_state = drm_atomic_get_new_connector_state(state, connector); in gud_connector_atomic_check()
298 old_state = drm_atomic_get_old_connector_state(state, connector); in gud_connector_atomic_check()
323 static int gud_connector_late_register(struct drm_connector *connector) in gud_connector_late_register() argument
325 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_late_register()
333 static void gud_connector_early_unregister(struct drm_connector *connector) in gud_connector_early_unregister() argument
335 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_early_unregister()
341 static void gud_connector_destroy(struct drm_connector *connector) in gud_connector_destroy() argument
343 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_destroy()
345 drm_connector_cleanup(connector); in gud_connector_destroy()
350 static void gud_connector_reset(struct drm_connector *connector) in gud_connector_reset() argument
352 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_reset()
354 drm_atomic_helper_connector_reset(connector); in gud_connector_reset()
355 connector->state->tv = gconn->initial_tv_state; in gud_connector_reset()
357 drm_atomic_helper_connector_tv_reset(connector); in gud_connector_reset()
359 connector->state->tv.brightness = gconn->initial_brightness; in gud_connector_reset()
377 static int gud_connector_add_tv_mode(struct gud_device *gdrm, struct drm_connector *connector) in gud_connector_add_tv_mode() argument
390 connector->index, buf, buf_len); in gud_connector_add_tv_mode()
402 ret = drm_mode_create_tv_properties(connector->dev, num_modes, modes); in gud_connector_add_tv_mode()
406 gud_conn_err(connector, "Failed to add TV modes", ret); in gud_connector_add_tv_mode()
412 gud_connector_property_lookup(struct drm_connector *connector, u16 prop) in gud_connector_property_lookup() argument
414 struct drm_mode_config *config = &connector->dev->mode_config; in gud_connector_property_lookup()
476 struct drm_connector *connector = &gconn->connector; in gud_connector_add_properties() local
486 ret = gud_usb_get(gdrm, GUD_REQ_GET_CONNECTOR_PROPERTIES, connector->index, in gud_connector_add_properties()
525 ret = gud_connector_add_tv_mode(gdrm, connector); in gud_connector_add_properties()
563 property = gud_connector_property_lookup(connector, prop); in gud_connector_add_properties()
572 drm_object_attach_property(&connector->base, property, 0); in gud_connector_add_properties()
583 struct gud_connector *gconn = to_gud_connector(connector_state->connector); in gud_connector_fill_properties()
614 struct drm_connector *connector; in gud_connector_create() local
626 connector = &gconn->connector; in gud_connector_create()
660 drm_connector_helper_add(connector, &gud_connector_helper_funcs); in gud_connector_create()
661 ret = drm_connector_init(drm, connector, &gud_connector_funcs, connector_type); in gud_connector_create()
663 kfree(connector); in gud_connector_create()
667 if (WARN_ON(connector->index != index)) in gud_connector_create()
671 connector->polled = (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT); in gud_connector_create()
673 connector->interlace_allowed = true; in gud_connector_create()
675 connector->doublescan_allowed = true; in gud_connector_create()
679 gud_conn_err(connector, "Failed to add properties", ret); in gud_connector_create()
684 if (!connector->index) { in gud_connector_create()
696 return drm_connector_attach_encoder(connector, encoder); in gud_connector_create()