Lines Matching refs:state

72  * Replicate what the default ->reset hook does: free the state pointer and
78 struct malidp_plane_state *state = to_malidp_plane_state(plane->state);
80 if (state)
81 __drm_atomic_helper_plane_destroy_state(&state->base);
82 kfree(state);
83 plane->state = NULL;
84 state = kzalloc(sizeof(*state), GFP_KERNEL);
85 if (state)
86 __drm_atomic_helper_plane_reset(plane, &state->base);
92 struct malidp_plane_state *state, *m_state;
94 if (!plane->state)
97 state = kmalloc(sizeof(*state), GFP_KERNEL);
98 if (!state)
101 m_state = to_malidp_plane_state(plane->state);
102 __drm_atomic_helper_plane_duplicate_state(plane, &state->base);
103 state->rotmem_size = m_state->rotmem_size;
104 state->format = m_state->format;
105 state->n_planes = m_state->n_planes;
107 state->mmu_prefetch_mode = m_state->mmu_prefetch_mode;
108 state->mmu_prefetch_pgsize = m_state->mmu_prefetch_pgsize;
110 return &state->base;
114 struct drm_plane_state *state)
116 struct malidp_plane_state *m_state = to_malidp_plane_state(state);
118 __drm_atomic_helper_plane_destroy_state(state);
129 const struct drm_plane_state *state)
131 struct malidp_plane_state *ms = to_malidp_plane_state(state);
263 struct drm_plane_state *state)
266 drm_atomic_get_existing_crtc_state(state->state, state->crtc);
276 ret = drm_atomic_helper_check_plane_state(state, crtc_state,
281 if (state->rotation & MALIDP_ROTATED_MASK) {
282 src_w = state->src_h >> 16;
283 src_h = state->src_w >> 16;
285 src_w = state->src_w >> 16;
286 src_h = state->src_h >> 16;
289 if ((state->crtc_w == src_w) && (state->crtc_h == src_h)) {
362 * current format, AFBC state and rotation.
493 struct drm_atomic_state *state)
495 struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
624 unsigned int block_h = drm_format_info_block_height(mp->base.state->fb->format, i);
723 dma_addr = drm_fb_dma_get_gem_addr(fb, plane->state,
743 struct drm_framebuffer *fb = plane->state->fb;
757 src_w = plane->state->src_w >> 16;
758 src_h = plane->state->src_h >> 16;
759 src_x = plane->state->src_x >> 16;
760 src_y = plane->state->src_y >> 16;
782 struct drm_atomic_state *state)
784 struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
787 struct malidp_plane_state *ms = to_malidp_plane_state(plane->state);
788 struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
794 struct drm_framebuffer *fb = plane->state->fb;
826 if ((plane->state->color_encoding != old_state->color_encoding) ||
827 (plane->state->color_range != old_state->color_range))
828 malidp_de_set_color_encoding(mp, plane->state->color_encoding,
829 plane->state->color_range);
861 val |= ilog2(plane->state->rotation & DRM_MODE_ROTATE_MASK) <<
888 to_malidp_crtc_state(new_state->crtc->state);
903 struct drm_atomic_state *state)