Lines Matching full:connector

25 	struct drm_connector connector;  member
44 static inline struct gud_connector *to_gud_connector(struct drm_connector *connector) in to_gud_connector() argument
46 return container_of(connector, struct gud_connector, connector); in to_gud_connector()
49 static void gud_conn_err(struct drm_connector *connector, const char *msg, int ret) in gud_conn_err() argument
51 dev_err(connector->dev->dev, "%s: %s (ret=%d)\n", connector->name, msg, ret); in gud_conn_err()
62 struct drm_connector *connector = &gconn->connector; in gud_connector_backlight_update_status_work() local
64 struct drm_device *drm = connector->dev; in gud_connector_backlight_update_status_work()
81 connector_state = drm_atomic_get_connector_state(state, connector); in gud_connector_backlight_update_status_work()
111 struct drm_connector *connector = bl_get_data(bd); in gud_connector_backlight_update_status() local
112 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_backlight_update_status()
126 struct drm_connector *connector = &gconn->connector; in gud_connector_backlight_register() local
137 connector->dev->primary->index, connector->name); in gud_connector_backlight_register()
141 bd = backlight_device_register(name, connector->kdev, connector, in gud_connector_backlight_register()
152 static int gud_connector_detect(struct drm_connector *connector, in gud_connector_detect() argument
155 struct gud_device *gdrm = to_gud_device(connector->dev); in gud_connector_detect()
159 if (!drm_dev_enter(connector->dev, &idx)) in gud_connector_detect()
164 connector->index, NULL, 0); in gud_connector_detect()
171 ret = gud_usb_get_u8(gdrm, GUD_REQ_GET_CONNECTOR_STATUS, connector->index, &status); in gud_connector_detect()
190 connector->epoch_counter += 1; in gud_connector_detect()
218 static int gud_connector_get_modes(struct drm_connector *connector) in gud_connector_get_modes() argument
220 struct gud_device *gdrm = to_gud_device(connector->dev); in gud_connector_get_modes()
227 if (!drm_dev_enter(connector->dev, &idx)) in gud_connector_get_modes()
235 ret = gud_usb_get(gdrm, GUD_REQ_GET_CONNECTOR_EDID, connector->index, in gud_connector_get_modes()
238 gud_conn_err(connector, "Invalid EDID size", ret); in gud_connector_get_modes()
241 drm_edid = drm_edid_read_custom(connector, gud_connector_get_edid_block, &edid_ctx); in gud_connector_get_modes()
245 drm_edid_connector_update(connector, drm_edid); in gud_connector_get_modes()
254 ret = gud_usb_get(gdrm, GUD_REQ_GET_CONNECTOR_MODES, connector->index, in gud_connector_get_modes()
259 gud_conn_err(connector, "Invalid display mode array size", ret); in gud_connector_get_modes()
268 mode = drm_mode_create(connector->dev); in gud_connector_get_modes()
275 drm_mode_probed_add(connector, mode); in gud_connector_get_modes()
279 num_modes = drm_edid_connector_add_modes(connector); in gud_connector_get_modes()
288 static int gud_connector_atomic_check(struct drm_connector *connector, in gud_connector_atomic_check() argument
295 new_state = drm_atomic_get_new_connector_state(state, connector); in gud_connector_atomic_check()
299 old_state = drm_atomic_get_old_connector_state(state, connector); in gud_connector_atomic_check()
324 static int gud_connector_late_register(struct drm_connector *connector) in gud_connector_late_register() argument
326 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_late_register()
334 static void gud_connector_early_unregister(struct drm_connector *connector) in gud_connector_early_unregister() argument
336 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_early_unregister()
342 static void gud_connector_destroy(struct drm_connector *connector) in gud_connector_destroy() argument
344 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_destroy()
346 drm_connector_cleanup(connector); in gud_connector_destroy()
351 static void gud_connector_reset(struct drm_connector *connector) in gud_connector_reset() argument
353 struct gud_connector *gconn = to_gud_connector(connector); in gud_connector_reset()
355 drm_atomic_helper_connector_reset(connector); in gud_connector_reset()
356 connector->state->tv = gconn->initial_tv_state; in gud_connector_reset()
358 drm_atomic_helper_connector_tv_margins_reset(connector); in gud_connector_reset()
360 connector->state->tv.brightness = gconn->initial_brightness; in gud_connector_reset()
375 * driver specific. This means that if more than one connector uses tv.mode,
378 static int gud_connector_add_tv_mode(struct gud_device *gdrm, struct drm_connector *connector) in gud_connector_add_tv_mode() argument
391 connector->index, buf, buf_len); in gud_connector_add_tv_mode()
403 ret = drm_mode_create_tv_properties_legacy(connector->dev, num_modes, modes); in gud_connector_add_tv_mode()
407 gud_conn_err(connector, "Failed to add TV modes", ret); in gud_connector_add_tv_mode()
413 gud_connector_property_lookup(struct drm_connector *connector, u16 prop) in gud_connector_property_lookup() argument
415 struct drm_mode_config *config = &connector->dev->mode_config; in gud_connector_property_lookup()
477 struct drm_connector *connector = &gconn->connector; in gud_connector_add_properties() local
487 ret = gud_usb_get(gdrm, GUD_REQ_GET_CONNECTOR_PROPERTIES, connector->index, in gud_connector_add_properties()
526 ret = gud_connector_add_tv_mode(gdrm, connector); in gud_connector_add_properties()
564 property = gud_connector_property_lookup(connector, prop); in gud_connector_add_properties()
573 drm_object_attach_property(&connector->base, property, 0); in gud_connector_add_properties()
584 struct gud_connector *gconn = to_gud_connector(connector_state->connector); in gud_connector_fill_properties()
615 struct drm_connector *connector; in gud_connector_create() local
627 connector = &gconn->connector; in gud_connector_create()
629 drm_dbg(drm, "Connector: index=%u type=%u flags=0x%x\n", index, desc->connector_type, flags); in gud_connector_create()
661 drm_connector_helper_add(connector, &gud_connector_helper_funcs); in gud_connector_create()
662 ret = drm_connector_init(drm, connector, &gud_connector_funcs, connector_type); in gud_connector_create()
664 kfree(connector); in gud_connector_create()
668 if (WARN_ON(connector->index != index)) in gud_connector_create()
672 connector->polled = (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT); in gud_connector_create()
674 connector->interlace_allowed = true; in gud_connector_create()
676 connector->doublescan_allowed = true; in gud_connector_create()
680 gud_conn_err(connector, "Failed to add properties", ret); in gud_connector_create()
684 /* The first connector is attached to the existing simple pipe encoder */ in gud_connector_create()
685 if (!connector->index) { in gud_connector_create()
697 return drm_connector_attach_encoder(connector, encoder); in gud_connector_create()