Lines Matching +full:force +full:- +full:hpd

1 // SPDX-License-Identifier: GPL-2.0
62 while (entry->hdisplay && entry->vdisplay) { in ast_astdp_get_mode_index()
63 if (entry->hdisplay == hdisplay && entry->vdisplay == vdisplay) in ast_astdp_get_mode_index()
64 return entry->mode_index; in ast_astdp_get_mode_index()
68 return -EINVAL; in ast_astdp_get_mode_index()
76 * HPD might be set even if no monitor is connected, so also check that in ast_astdp_is_connected()
92 return -EIO; /* extension headers not supported */ in ast_astdp_read_edid_block()
96 * by acquiring the I/O-register lock. in ast_astdp_read_edid_block()
98 mutex_lock(&ast->modeset_lock); in ast_astdp_read_edid_block()
111 ret = -EIO; in ast_astdp_read_edid_block()
117 * CRE4[7:0]: Read-Pointer for EDID (Unit: 4bytes); valid range: 0~64 in ast_astdp_read_edid_block()
133 * of right-click of mouse. in ast_astdp_read_edid_block()
148 ret = -EBUSY; in ast_astdp_read_edid_block()
159 * For 128-bytes EDID_1.3, in ast_astdp_read_edid_block()
160 * 1. Add the value of Bytes-126 to Bytes-127. in ast_astdp_read_edid_block()
161 * The Bytes-127 is Checksum. Sum of all 128bytes should in ast_astdp_read_edid_block()
163 * 2. Modify Bytes-126 to be 0. in ast_astdp_read_edid_block()
164 * The Bytes-126 indicates the Number of extensions to in ast_astdp_read_edid_block()
171 memcpy(buf, ediddata, min((len - i), 4)); in ast_astdp_read_edid_block()
180 mutex_unlock(&ast->modeset_lock); in ast_astdp_read_edid_block()
190 struct drm_device *dev = &ast->base; in ast_dp_launch()
198 --i; in ast_dp_launch()
203 return -ENODEV; in ast_dp_launch()
234 struct drm_device *dev = &ast->base; in ast_dp_link_training()
273 struct drm_device *dev = &ast->base; in ast_dp_set_enable()
309 res = ast_astdp_get_mode_index(mode->hdisplay, mode->vdisplay); in ast_astdp_encoder_helper_mode_valid()
320 struct drm_device *dev = encoder->dev; in ast_astdp_encoder_helper_atomic_mode_set()
323 const struct ast_vbios_enhtable *vmode = ast_crtc_state->vmode; in ast_astdp_encoder_helper_atomic_mode_set()
326 int mode_index = astdp_conn_state->mode_index; in ast_astdp_encoder_helper_atomic_mode_set()
330 if (drm_WARN_ON(dev, vmode->refresh_rate_index < 1 || vmode->refresh_rate_index > 255)) in ast_astdp_encoder_helper_atomic_mode_set()
332 refresh_rate_index = vmode->refresh_rate_index - 1; in ast_astdp_encoder_helper_atomic_mode_set()
340 mode_index = (u8)(mode_index - (u8)refresh_rate_index); in ast_astdp_encoder_helper_atomic_mode_set()
348 * CRE0[7:0]: MISC0 ((0x00: 18-bpp) or (0x20: 24-bpp) in ast_astdp_encoder_helper_atomic_mode_set()
364 struct ast_device *ast = to_ast_device(encoder->dev); in ast_astdp_encoder_helper_atomic_enable()
365 struct ast_connector *ast_connector = &ast->output.astdp.connector; in ast_astdp_encoder_helper_atomic_enable()
367 if (ast_connector->physical_status == connector_status_connected) { in ast_astdp_encoder_helper_atomic_enable()
379 struct ast_device *ast = to_ast_device(encoder->dev); in ast_astdp_encoder_helper_atomic_disable()
389 const struct drm_display_mode *mode = &crtc_state->mode; in ast_astdp_encoder_helper_atomic_check()
395 res = ast_astdp_get_mode_index(mode->hdisplay, mode->vdisplay); in ast_astdp_encoder_helper_atomic_check()
398 astdp_conn_state->mode_index = res; in ast_astdp_encoder_helper_atomic_check()
421 if (ast_connector->physical_status == connector_status_connected) { in ast_astdp_connector_helper_get_modes()
422 struct ast_device *ast = to_ast_device(connector->dev); in ast_astdp_connector_helper_get_modes()
433 * There's no EDID data without a connected monitor. Set BMC- in ast_astdp_connector_helper_get_modes()
447 bool force) in ast_astdp_connector_helper_detect_ctx() argument
450 struct ast_device *ast = to_ast_device(connector->dev); in ast_astdp_connector_helper_detect_ctx()
454 mutex_lock(&ast->modeset_lock); in ast_astdp_connector_helper_detect_ctx()
466 mutex_unlock(&ast->modeset_lock); in ast_astdp_connector_helper_detect_ctx()
468 if (status != ast_connector->physical_status) in ast_astdp_connector_helper_detect_ctx()
469 ++connector->epoch_counter; in ast_astdp_connector_helper_detect_ctx()
470 ast_connector->physical_status = status; in ast_astdp_connector_helper_detect_ctx()
485 if (connector->state) in ast_astdp_connector_reset()
486 connector->funcs->atomic_destroy_state(connector, connector->state); in ast_astdp_connector_reset()
489 __drm_atomic_helper_connector_reset(connector, &astdp_state->base); in ast_astdp_connector_reset()
498 struct drm_device *dev = connector->dev; in ast_astdp_connector_atomic_duplicate_state()
500 if (drm_WARN_ON(dev, !connector->state)) in ast_astdp_connector_atomic_duplicate_state()
506 __drm_atomic_helper_connector_duplicate_state(connector, &new_astdp_state->base); in ast_astdp_connector_atomic_duplicate_state()
508 astdp_state = to_ast_astdp_connector_state(connector->state); in ast_astdp_connector_atomic_duplicate_state()
510 new_astdp_state->mode_index = astdp_state->mode_index; in ast_astdp_connector_atomic_duplicate_state()
512 return &new_astdp_state->base; in ast_astdp_connector_atomic_duplicate_state()
520 __drm_atomic_helper_connector_destroy_state(&astdp_state->base); in ast_astdp_connector_atomic_destroy_state()
538 struct drm_device *dev = &ast->base; in ast_astdp_output_init()
539 struct drm_crtc *crtc = &ast->crtc; in ast_astdp_output_init()
547 encoder = &ast->output.astdp.encoder; in ast_astdp_output_init()
554 encoder->possible_crtcs = drm_crtc_mask(crtc); in ast_astdp_output_init()
558 ast_connector = &ast->output.astdp.connector; in ast_astdp_output_init()
559 connector = &ast_connector->base; in ast_astdp_output_init()
566 connector->interlace_allowed = 0; in ast_astdp_output_init()
567 connector->doublescan_allowed = 0; in ast_astdp_output_init()
568 connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; in ast_astdp_output_init()
570 ast_connector->physical_status = connector->status; in ast_astdp_output_init()