@@ -6452,7 +6452,7 @@ static int dm_plane_atomic_check(struct drm_plane *plane,
return 0;
new_crtc_state =
- drm_atomic_get_new_crtc_state(new_plane_state->state,
+ drm_atomic_get_new_crtc_state(state,
new_plane_state->crtc);
if (!new_crtc_state)
return -EINVAL;
@@ -86,7 +86,7 @@ komeda_plane_atomic_check(struct drm_plane *plane,
if (!new_plane_state->crtc || !new_plane_state->fb)
return 0;
- crtc_st = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_st = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_st) || !crtc_st->enable) {
DRM_DEBUG_ATOMIC("Cannot update plane on a disabled CRTC.\n");
@@ -244,7 +244,7 @@ static int hdlcd_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
}
- for_each_new_crtc_in_state(new_plane_state->state, crtc, crtc_state,
+ for_each_new_crtc_in_state(state, crtc, crtc_state,
i) {
/* we cannot disable the plane while the CRTC is active */
if (!new_plane_state->fb && crtc_state->active)
@@ -121,8 +121,8 @@ int armada_drm_plane_atomic_check(struct drm_plane *plane,
return 0;
}
- if (new_plane_state->state)
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ if (state)
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
else
crtc_state = crtc->state;
@@ -546,7 +546,7 @@ static int ast_primary_plane_helper_atomic_check(struct drm_plane *plane,
if (!new_plane_state->crtc)
return 0;
- crtc_state = drm_atomic_get_new_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_new_crtc_state(state,
new_plane_state->crtc);
ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
@@ -665,7 +665,7 @@ static int ast_cursor_plane_helper_atomic_check(struct drm_plane *plane,
if (!new_plane_state->crtc)
return 0;
- crtc_state = drm_atomic_get_new_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_new_crtc_state(state,
new_plane_state->crtc);
ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
@@ -609,7 +609,7 @@ static int atmel_hlcdc_plane_atomic_check(struct drm_plane *p,
if (!hstate->base.crtc || WARN_ON(!fb))
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(s->state, s->crtc);
+ crtc_state = drm_atomic_get_existing_crtc_state(state, s->crtc);
mode = &crtc_state->adjusted_mode;
ret = drm_atomic_helper_check_plane_state(s, crtc_state,
@@ -186,7 +186,7 @@ static int drm_simple_kms_plane_atomic_check(struct drm_plane *plane,
int ret;
pipe = container_of(plane, struct drm_simple_display_pipe, plane);
- crtc_state = drm_atomic_get_new_crtc_state(plane_state->state,
+ crtc_state = drm_atomic_get_new_crtc_state(state,
&pipe->crtc);
ret = drm_atomic_helper_check_plane_state(plane_state, crtc_state,
@@ -66,7 +66,7 @@ static int hibmc_plane_atomic_check(struct drm_plane *plane,
if (!crtc || !fb)
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state, crtc);
+ crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -782,7 +782,7 @@ static int ade_plane_atomic_check(struct drm_plane *plane,
if (fmt == ADE_FORMAT_UNSUPPORT)
return -EINVAL;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state, crtc);
+ crtc_state = drm_atomic_get_crtc_state(state, crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -157,7 +157,7 @@ static int dcss_plane_atomic_check(struct drm_plane *plane,
cma_obj = drm_fb_cma_get_gem_obj(fb, 0);
WARN_ON(!cma_obj);
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
new_plane_state->crtc);
hdisplay = crtc_state->adjusted_mode.hdisplay;
@@ -358,7 +358,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
crtc_state =
- drm_atomic_get_existing_crtc_state(new_state->state,
+ drm_atomic_get_existing_crtc_state(state,
new_state->crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -371,7 +371,7 @@ static int ingenic_drm_plane_atomic_check(struct drm_plane *plane,
if (!crtc)
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -526,7 +526,7 @@ static int ingenic_ipu_plane_atomic_check(struct drm_plane *plane,
if (!crtc)
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state, crtc);
+ crtc_state = drm_atomic_get_existing_crtc_state(state, crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -100,7 +100,7 @@ static int kmb_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
can_position = (plane->type == DRM_PLANE_TYPE_OVERLAY);
crtc_state =
- drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ drm_atomic_get_existing_crtc_state(state,
new_plane_state->crtc);
return drm_atomic_helper_check_plane_state(new_plane_state,
crtc_state,
@@ -160,7 +160,7 @@ static int mtk_plane_atomic_check(struct drm_plane *plane,
if (ret)
return ret;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -174,7 +174,7 @@ static int meson_overlay_atomic_check(struct drm_plane *plane,
if (!new_plane_state->crtc)
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -80,7 +80,7 @@ static int meson_plane_atomic_check(struct drm_plane *plane,
if (!new_plane_state->crtc)
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -964,7 +964,7 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
uint32_t min_src_size, max_linewidth;
if (new_plane_state->crtc)
- crtc_state = drm_atomic_get_new_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_new_crtc_state(state,
new_plane_state->crtc);
min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxupscale);
@@ -415,7 +415,7 @@ static int mdp5_plane_atomic_check(struct drm_plane *plane,
if (!crtc)
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -409,7 +409,7 @@ static int mxsfb_plane_atomic_check(struct drm_plane *plane,
struct mxsfb_drm_private *mxsfb = to_mxsfb_drm_private(plane->dev);
struct drm_crtc_state *crtc_state;
- crtc_state = drm_atomic_get_new_crtc_state(plane_state->state,
+ crtc_state = drm_atomic_get_new_crtc_state(state,
&mxsfb->crtc);
return drm_atomic_helper_check_plane_state(plane_state, crtc_state,
@@ -112,7 +112,7 @@ static int omap_plane_atomic_check(struct drm_plane *plane,
if (WARN_ON(!new_plane_state->crtc))
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
new_plane_state->crtc);
/* we should have a crtc state if the plane is attached to a crtc */
if (WARN_ON(!crtc_state))
@@ -796,7 +796,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
if (!crtc || WARN_ON(!fb))
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -198,7 +198,7 @@ static int sti_cursor_atomic_check(struct drm_plane *drm_plane,
if (!crtc || !fb)
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state, crtc);
+ crtc_state = drm_atomic_get_crtc_state(state, crtc);
mode = &crtc_state->mode;
dst_x = new_plane_state->crtc_x;
dst_y = new_plane_state->crtc_y;
@@ -635,7 +635,7 @@ static int sti_gdp_atomic_check(struct drm_plane *drm_plane,
return 0;
mixer = to_sti_mixer(crtc);
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state, crtc);
+ crtc_state = drm_atomic_get_crtc_state(state, crtc);
mode = &crtc_state->mode;
dst_x = new_plane_state->crtc_x;
dst_y = new_plane_state->crtc_y;
@@ -1034,7 +1034,7 @@ static int sti_hqvdp_atomic_check(struct drm_plane *drm_plane,
if (!crtc || !fb)
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state, crtc);
+ crtc_state = drm_atomic_get_crtc_state(state, crtc);
mode = &crtc_state->mode;
dst_x = new_plane_state->crtc_x;
dst_y = new_plane_state->crtc_y;
@@ -248,7 +248,7 @@ static int sun8i_ui_layer_atomic_check(struct drm_plane *plane,
if (!crtc)
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -351,7 +351,7 @@ static int sun8i_vi_layer_atomic_check(struct drm_plane *plane,
if (!crtc)
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -44,7 +44,7 @@ static int tidss_plane_atomic_check(struct drm_plane *plane,
return 0;
}
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -41,7 +41,7 @@ static int tilcdc_plane_atomic_check(struct drm_plane *plane,
return -EINVAL;
}
- crtc_state = drm_atomic_get_existing_crtc_state(new_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
new_state->crtc);
/* we should have a crtc state if the plane is attached to a crtc */
if (WARN_ON(!crtc_state))
@@ -259,8 +259,8 @@ static int vbox_primary_atomic_check(struct drm_plane *plane,
struct drm_crtc_state *crtc_state = NULL;
if (new_state->crtc) {
- crtc_state = drm_atomic_get_existing_crtc_state(
- new_state->state, new_state->crtc);
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
+ new_state->crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
}
@@ -337,8 +337,8 @@ static int vbox_cursor_atomic_check(struct drm_plane *plane,
int ret;
if (new_state->crtc) {
- crtc_state = drm_atomic_get_existing_crtc_state(
- new_state->state, new_state->crtc);
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
+ new_state->crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
}
@@ -94,7 +94,7 @@ static int virtio_gpu_plane_atomic_check(struct drm_plane *plane,
if (!new_plane_state->fb || WARN_ON(!new_plane_state->crtc))
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -125,7 +125,7 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
if (!new_plane_state->fb || WARN_ON(!new_plane_state->crtc))
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
+ crtc_state = drm_atomic_get_crtc_state(state,
new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -446,7 +446,7 @@ int vmw_du_primary_plane_atomic_check(struct drm_plane *plane,
int ret;
if (new_state->crtc)
- crtc_state = drm_atomic_get_new_crtc_state(new_state->state,
+ crtc_state = drm_atomic_get_new_crtc_state(state,
new_state->crtc);
ret = drm_atomic_helper_check_plane_state(new_state, crtc_state,
@@ -1152,8 +1152,7 @@ zynqmp_disp_plane_atomic_check(struct drm_plane *plane,
if (!new_plane_state->crtc)
return 0;
- crtc_state = drm_atomic_get_crtc_state(new_plane_state->state,
- new_plane_state->crtc);
+ crtc_state = drm_atomic_get_crtc_state(state, new_plane_state->crtc);
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
@@ -59,7 +59,7 @@ static int zx_vl_plane_atomic_check(struct drm_plane *plane,
if (!crtc || WARN_ON(!fb))
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;
@@ -288,7 +288,7 @@ static int zx_gl_plane_atomic_check(struct drm_plane *plane,
if (!crtc || WARN_ON(!fb))
return 0;
- crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state,
+ crtc_state = drm_atomic_get_existing_crtc_state(state,
crtc);
if (WARN_ON(!crtc_state))
return -EINVAL;