Lines Matching refs:state

271 static inline bool osd_changed(struct drm_plane_state *state,
274 return state->src_x != oldstate->src_x ||
275 state->src_y != oldstate->src_y ||
276 state->src_w != oldstate->src_w ||
277 state->src_h != oldstate->src_h ||
278 state->crtc_x != oldstate->crtc_x ||
279 state->crtc_y != oldstate->crtc_y ||
280 state->crtc_w != oldstate->crtc_w ||
281 state->crtc_h != oldstate->crtc_h;
288 struct drm_plane_state *state = plane->state;
294 if (!state || !state->fb)
297 finfo = drm_format_info(state->fb->format->format);
310 needs_modeset = drm_atomic_crtc_needs_modeset(state->crtc->state);
320 ipu->addr_y = drm_fb_cma_get_gem_addr(state->fb, state, 0);
322 ipu->addr_u = drm_fb_cma_get_gem_addr(state->fb, state, 1);
324 ipu->addr_v = drm_fb_cma_get_gem_addr(state->fb, state, 2);
341 stride = ((state->src_w >> 16) * finfo->cpp[2] / finfo->hsub)
345 stride |= ((state->src_w >> 16) * finfo->cpp[1] / finfo->hsub)
350 stride = ((state->src_w >> 16) * finfo->cpp[0]) << JZ_IPU_Y_STRIDE_Y_LSB;
355 ((state->src_h >> 16) << JZ_IPU_IN_GS_H_LSB));
424 ((state->crtc_w * 4) << JZ_IPU_OUT_GS_W_LSB)
425 | state->crtc_h << JZ_IPU_OUT_GS_H_LSB);
426 regmap_write(ipu->map, JZ_REG_IPU_OUT_STRIDE, state->crtc_w * 4);
511 state->src_w >> 16, state->src_h >> 16,
512 state->crtc_w, state->crtc_h,
517 struct drm_plane_state *state)
521 struct drm_crtc *crtc = state->crtc ?: plane->state->crtc;
527 crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc);
532 if (!plane->state->crtc ^ !state->crtc)
535 if (!state->crtc ||
540 if (state->crtc_x < 0 || state->crtc_y < 0 ||
541 state->crtc_x + state->crtc_w > crtc_state->mode.hdisplay ||
542 state->crtc_y + state->crtc_h > crtc_state->mode.vdisplay)
546 if ((state->src_w >> 16) < 4 || (state->src_h >> 16) < 4)
550 if (((state->src_w >> 16) & 1) || (state->crtc_w & 1))
553 if (!osd_changed(state, plane->state))
558 xres = state->src_w >> 16;
559 yres = state->src_h >> 16;
562 for (denom_w = xres, num_w = state->crtc_w;
569 for (denom_h = yres, num_h = state->crtc_h;
609 const struct drm_plane_state *state,
624 struct drm_plane_state *state,
635 if (state->crtc) {
636 crtc_state = drm_atomic_get_existing_crtc_state(state->state, state->crtc);