Lines Matching full:display

78 	struct intel_display *display = to_intel_display(state);  in intel_atomic_get_pmdemand_state()  local
81 &display->pmdemand.obj); in intel_atomic_get_pmdemand_state()
92 struct intel_display *display = to_intel_display(state); in intel_atomic_get_old_pmdemand_state() local
95 &display->pmdemand.obj); in intel_atomic_get_old_pmdemand_state()
106 struct intel_display *display = to_intel_display(state); in intel_atomic_get_new_pmdemand_state() local
109 &display->pmdemand.obj); in intel_atomic_get_new_pmdemand_state()
117 int intel_pmdemand_init(struct intel_display *display) in intel_pmdemand_init() argument
125 intel_atomic_global_obj_init(display, &display->pmdemand.obj, in intel_pmdemand_init()
129 if (IS_DISPLAY_VERx100_STEP(display, 1400, STEP_A0, STEP_C0)) in intel_pmdemand_init()
131 intel_de_rmw(display, XELPD_CHICKEN_DCPR_3, 0, DMD_RSP_TIMEOUT_DISABLE); in intel_pmdemand_init()
136 void intel_pmdemand_init_early(struct intel_display *display) in intel_pmdemand_init_early() argument
138 mutex_init(&display->pmdemand.lock); in intel_pmdemand_init_early()
139 init_waitqueue_head(&display->pmdemand.waitqueue); in intel_pmdemand_init_early()
143 intel_pmdemand_update_phys_mask(struct intel_display *display, in intel_pmdemand_update_phys_mask() argument
150 if (DISPLAY_VER(display) < 14) in intel_pmdemand_update_phys_mask()
168 intel_pmdemand_update_port_clock(struct intel_display *display, in intel_pmdemand_update_port_clock() argument
172 if (DISPLAY_VER(display) < 14) in intel_pmdemand_update_port_clock()
179 intel_pmdemand_update_max_ddiclk(struct intel_display *display, in intel_pmdemand_update_max_ddiclk() argument
189 intel_pmdemand_update_port_clock(display, pmdemand_state, in intel_pmdemand_update_max_ddiclk()
200 intel_pmdemand_update_connector_phys(struct intel_display *display, in intel_pmdemand_update_connector_phys() argument
221 intel_pmdemand_update_phys_mask(display, encoder, pmdemand_state, in intel_pmdemand_update_connector_phys()
226 intel_pmdemand_update_active_non_tc_phys(struct intel_display *display, in intel_pmdemand_update_active_non_tc_phys() argument
241 intel_pmdemand_update_connector_phys(display, state, in intel_pmdemand_update_active_non_tc_phys()
246 intel_pmdemand_update_connector_phys(display, state, in intel_pmdemand_update_active_non_tc_phys()
257 intel_pmdemand_encoder_has_tc_phy(struct intel_display *display, in intel_pmdemand_encoder_has_tc_phy() argument
266 struct intel_display *display = to_intel_display(state); in intel_pmdemand_connector_needs_update() local
283 (intel_pmdemand_encoder_has_tc_phy(display, old_encoder) && in intel_pmdemand_connector_needs_update()
284 intel_pmdemand_encoder_has_tc_phy(display, new_encoder))) in intel_pmdemand_connector_needs_update()
295 struct intel_display *display = to_intel_display(state); in intel_pmdemand_needs_update() local
315 if (DISPLAY_VER(display) < 30) { in intel_pmdemand_needs_update()
341 struct intel_display *display = to_intel_display(state); in intel_pmdemand_atomic_check() local
347 if (DISPLAY_VER(display) < 14) in intel_pmdemand_atomic_check()
369 if (DISPLAY_VER(display) < 30) { in intel_pmdemand_atomic_check()
376 min_t(u8, hweight8(new_dbuf_state->active_pipes), INTEL_NUM_PIPES(display)); in intel_pmdemand_atomic_check()
388 intel_pmdemand_update_max_ddiclk(display, state, new_pmdemand_state); in intel_pmdemand_atomic_check()
390 intel_pmdemand_update_active_non_tc_phys(display, state, new_pmdemand_state); in intel_pmdemand_atomic_check()
411 static bool intel_pmdemand_check_prev_transaction(struct intel_display *display) in intel_pmdemand_check_prev_transaction() argument
413 return !(intel_de_wait_for_clear(display, in intel_pmdemand_check_prev_transaction()
416 intel_de_wait_for_clear(display, in intel_pmdemand_check_prev_transaction()
422 intel_pmdemand_init_pmdemand_params(struct intel_display *display, in intel_pmdemand_init_pmdemand_params() argument
427 if (DISPLAY_VER(display) < 14) in intel_pmdemand_init_pmdemand_params()
430 mutex_lock(&display->pmdemand.lock); in intel_pmdemand_init_pmdemand_params()
431 if (drm_WARN_ON(display->drm, in intel_pmdemand_init_pmdemand_params()
432 !intel_pmdemand_check_prev_transaction(display))) { in intel_pmdemand_init_pmdemand_params()
438 reg1 = intel_de_read(display, XELPDP_INITIATE_PMDEMAND_REQUEST(0)); in intel_pmdemand_init_pmdemand_params()
440 reg2 = intel_de_read(display, XELPDP_INITIATE_PMDEMAND_REQUEST(1)); in intel_pmdemand_init_pmdemand_params()
456 if (DISPLAY_VER(display) >= 30) { in intel_pmdemand_init_pmdemand_params()
470 mutex_unlock(&display->pmdemand.lock); in intel_pmdemand_init_pmdemand_params()
473 static bool intel_pmdemand_req_complete(struct intel_display *display) in intel_pmdemand_req_complete() argument
475 return !(intel_de_read(display, XELPDP_INITIATE_PMDEMAND_REQUEST(1)) & in intel_pmdemand_req_complete()
479 static void intel_pmdemand_wait(struct intel_display *display) in intel_pmdemand_wait() argument
481 if (!wait_event_timeout(display->pmdemand.waitqueue, in intel_pmdemand_wait()
482 intel_pmdemand_req_complete(display), in intel_pmdemand_wait()
484 drm_err(display->drm, in intel_pmdemand_wait()
488 /* Required to be programmed during Display Init Sequences. */
489 void intel_pmdemand_program_dbuf(struct intel_display *display, in intel_pmdemand_program_dbuf() argument
495 if (DISPLAY_VER(display) >= 30) in intel_pmdemand_program_dbuf()
498 mutex_lock(&display->pmdemand.lock); in intel_pmdemand_program_dbuf()
499 if (drm_WARN_ON(display->drm, in intel_pmdemand_program_dbuf()
500 !intel_pmdemand_check_prev_transaction(display))) in intel_pmdemand_program_dbuf()
503 intel_de_rmw(display, XELPDP_INITIATE_PMDEMAND_REQUEST(0), in intel_pmdemand_program_dbuf()
506 intel_de_rmw(display, XELPDP_INITIATE_PMDEMAND_REQUEST(1), 0, in intel_pmdemand_program_dbuf()
509 intel_pmdemand_wait(display); in intel_pmdemand_program_dbuf()
512 mutex_unlock(&display->pmdemand.lock); in intel_pmdemand_program_dbuf()
516 intel_pmdemand_update_params(struct intel_display *display, in intel_pmdemand_update_params() argument
559 if (DISPLAY_VER(display) >= 30) { in intel_pmdemand_update_params()
572 intel_pmdemand_program_params(struct intel_display *display, in intel_pmdemand_program_params() argument
581 mutex_lock(&display->pmdemand.lock); in intel_pmdemand_program_params()
582 if (drm_WARN_ON(display->drm, in intel_pmdemand_program_params()
583 !intel_pmdemand_check_prev_transaction(display))) in intel_pmdemand_program_params()
586 reg1 = intel_de_read(display, XELPDP_INITIATE_PMDEMAND_REQUEST(0)); in intel_pmdemand_program_params()
589 reg2 = intel_de_read(display, XELPDP_INITIATE_PMDEMAND_REQUEST(1)); in intel_pmdemand_program_params()
592 intel_pmdemand_update_params(display, new, old, &mod_reg1, &mod_reg2, in intel_pmdemand_program_params()
596 intel_de_write(display, XELPDP_INITIATE_PMDEMAND_REQUEST(0), in intel_pmdemand_program_params()
602 intel_de_write(display, XELPDP_INITIATE_PMDEMAND_REQUEST(1), in intel_pmdemand_program_params()
611 drm_dbg_kms(display->drm, in intel_pmdemand_program_params()
615 intel_de_rmw(display, XELPDP_INITIATE_PMDEMAND_REQUEST(1), 0, in intel_pmdemand_program_params()
618 intel_pmdemand_wait(display); in intel_pmdemand_program_params()
621 mutex_unlock(&display->pmdemand.lock); in intel_pmdemand_program_params()
633 struct intel_display *display = to_intel_display(state); in intel_pmdemand_pre_plane_update() local
639 if (DISPLAY_VER(display) < 14) in intel_pmdemand_pre_plane_update()
649 intel_pmdemand_program_params(display, new_pmdemand_state, in intel_pmdemand_pre_plane_update()
656 struct intel_display *display = to_intel_display(state); in intel_pmdemand_post_plane_update() local
662 if (DISPLAY_VER(display) < 14) in intel_pmdemand_post_plane_update()
672 intel_pmdemand_program_params(display, new_pmdemand_state, NULL, in intel_pmdemand_post_plane_update()