crtc_state = to_intel_crtc_state(drm_crtc_state);
- /*
- * The original src/dest coordinates are stored in state->base, but
- * we want to keep another copy internal to our driver that we can
- * clip/modify ourselves.
- */
- intel_state->base.src.x1 = state->src_x;
- intel_state->base.src.y1 = state->src_y;
- intel_state->base.src.x2 = state->src_x + state->src_w;
- intel_state->base.src.y2 = state->src_y + state->src_h;
- intel_state->base.dst.x1 = state->crtc_x;
- intel_state->base.dst.y1 = state->crtc_y;
- intel_state->base.dst.x2 = state->crtc_x + state->crtc_w;
- intel_state->base.dst.y2 = state->crtc_y + state->crtc_h;
-
/* Clip all planes to CRTC size, or 0x0 if CRTC is disabled */
intel_state->clip.x1 = 0;
intel_state->clip.y1 = 0;
struct intel_plane_state *state)
{
struct drm_crtc *crtc = state->base.crtc;
- struct drm_framebuffer *fb = state->base.fb;
int min_scale = DRM_PLANE_HELPER_NO_SCALING;
int max_scale = DRM_PLANE_HELPER_NO_SCALING;
bool can_position = false;
can_position = true;
}
- return drm_plane_helper_check_update(plane, crtc, fb,
- &state->base.src,
- &state->base.dst,
- &state->base.clip,
- state->base.rotation,
- min_scale, max_scale,
- can_position, true,
- &state->base.visible);
+ return drm_plane_helper_check_state(&state->base,
+ &state->clip,
+ min_scale, max_scale,
+ can_position, true);
}
static void intel_begin_crtc_commit(struct drm_crtc *crtc,
struct intel_crtc_state *crtc_state,
struct intel_plane_state *state)
{
- struct drm_crtc *crtc = crtc_state->base.crtc;
struct drm_framebuffer *fb = state->base.fb;
struct drm_i915_gem_object *obj = intel_fb_obj(fb);
enum pipe pipe = to_intel_plane(plane)->pipe;
unsigned stride;
int ret;
- ret = drm_plane_helper_check_update(plane, crtc, fb, &state->base.src,
- &state->base.dst,
- &state->base.clip,
- state->base.rotation,
- DRM_PLANE_HELPER_NO_SCALING,
- DRM_PLANE_HELPER_NO_SCALING,
- true, true, &state->base.visible);
+ ret = drm_plane_helper_check_state(&state->base,
+ &state->clip,
+ DRM_PLANE_HELPER_NO_SCALING,
+ DRM_PLANE_HELPER_NO_SCALING,
+ true, true);
if (ret)
return ret;
int max_scale, min_scale;
bool can_scale;
+ src->x1 = state->base.src_x;
+ src->y1 = state->base.src_y;
+ src->x2 = state->base.src_x + state->base.src_w;
+ src->y2 = state->base.src_y + state->base.src_h;
+
+ dst->x1 = state->base.crtc_x;
+ dst->y1 = state->base.crtc_y;
+ dst->x2 = state->base.crtc_x + state->base.crtc_w;
+ dst->y2 = state->base.crtc_y + state->base.crtc_h;
+
if (!fb) {
state->base.visible = false;
return 0;