Lines Matching defs:state

61 	drm_display_mode_to_videomode(&crtc->state->adjusted_mode, &vm);
65 clk_set_rate(hwdev->pxlclk, crtc->state->adjusted_mode.crtc_clock * 1000);
149 struct drm_crtc_state *state)
151 struct malidp_crtc_state *mc = to_malidp_crtc_state(state);
156 if (!state->color_mgmt_changed || !state->gamma_lut)
159 if (crtc->state->gamma_lut &&
160 (crtc->state->gamma_lut->base.id == state->gamma_lut->base.id))
163 if (state->gamma_lut->length % sizeof(struct drm_color_lut))
166 lut_size = state->gamma_lut->length / sizeof(struct drm_color_lut);
170 lut = (struct drm_color_lut *)state->gamma_lut->data;
176 if (!state->mode_changed) {
179 state->mode_changed = true;
186 ret = drm_atomic_helper_check_modeset(crtc->dev, state->state);
191 malidp_generate_gamma_table(state->gamma_lut, mc->gamma_coeffs);
203 struct drm_crtc_state *state)
205 struct malidp_crtc_state *mc = to_malidp_crtc_state(state);
209 if (!state->color_mgmt_changed)
212 if (!state->ctm)
215 if (crtc->state->ctm && (crtc->state->ctm->base.id ==
216 state->ctm->base.id))
223 ctm = (struct drm_color_ctm *)state->ctm->data;
248 struct drm_crtc_state *state)
252 struct malidp_crtc_state *cs = to_malidp_crtc_state(state);
271 drm_atomic_crtc_state_for_each_plane_state(plane, pstate, state) {
330 drm_display_mode_to_videomode(&state->adjusted_mode, &vm);
338 struct drm_crtc_state *state)
374 drm_atomic_crtc_state_for_each_plane_state(plane, pstate, state) {
390 drm_atomic_crtc_state_for_each_plane_state(plane, pstate, state) {
418 if (state->connectors_changed) {
419 u32 old_mask = crtc->state->connector_mask;
420 u32 new_mask = state->connector_mask;
424 state->connectors_changed = false;
427 ret = malidp_crtc_atomic_check_gamma(crtc, state);
428 ret = ret ? ret : malidp_crtc_atomic_check_ctm(crtc, state);
429 ret = ret ? ret : malidp_crtc_atomic_check_scaling(crtc, state);
443 struct malidp_crtc_state *state, *old_state;
445 if (WARN_ON(!crtc->state))
448 old_state = to_malidp_crtc_state(crtc->state);
449 state = kmalloc(sizeof(*state), GFP_KERNEL);
450 if (!state)
453 __drm_atomic_helper_crtc_duplicate_state(crtc, &state->base);
454 memcpy(state->gamma_coeffs, old_state->gamma_coeffs,
455 sizeof(state->gamma_coeffs));
456 memcpy(state->coloradj_coeffs, old_state->coloradj_coeffs,
457 sizeof(state->coloradj_coeffs));
458 memcpy(&state->scaler_config, &old_state->scaler_config,
459 sizeof(state->scaler_config));
460 state->scaled_planes_mask = 0;
462 return &state->base;
466 struct drm_crtc_state *state)
470 if (state) {
471 mali_state = to_malidp_crtc_state(state);
472 __drm_atomic_helper_crtc_destroy_state(state);
480 struct malidp_crtc_state *state =
481 kzalloc(sizeof(*state), GFP_KERNEL);
483 if (crtc->state)
484 malidp_crtc_destroy_state(crtc, crtc->state);
486 if (state)
487 __drm_atomic_helper_crtc_reset(crtc, &state->base);