drm/i915: Move skl plane fb related checks into a better place
Move the skl+ specific framebuffer related checks from intel_plane_atomic_check_with_state() into a new function (skl_plane_check_fb()) which we'll simply call from the skl plane->check() hook. v2: Split out the Y/Yf+CCS vs. interlaced change (José) Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180907152413.15761-11-ville.syrjala@linux.intel.com
This commit is contained in:
@@ -3155,12 +3155,6 @@ static int skl_check_ccs_aux_surface(struct intel_plane_state *plane_state)
|
||||
int y = src_y / vsub;
|
||||
u32 offset;
|
||||
|
||||
if (plane_state->base.rotation & ~(DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_180)) {
|
||||
DRM_DEBUG_KMS("RC support only with 0/180 degree rotation %x\n",
|
||||
plane_state->base.rotation);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
intel_add_fb_offsets(&x, &y, plane_state, 1);
|
||||
offset = intel_plane_compute_aligned_offset(&x, &y, plane_state, 1);
|
||||
|
||||
@@ -3182,12 +3176,6 @@ int skl_check_plane_surface(const struct intel_crtc_state *crtc_state,
|
||||
plane_state->color_plane[0].stride = intel_fb_pitch(fb, 0, rotation);
|
||||
plane_state->color_plane[1].stride = intel_fb_pitch(fb, 1, rotation);
|
||||
|
||||
if (rotation & DRM_MODE_REFLECT_X &&
|
||||
fb->modifier == DRM_FORMAT_MOD_LINEAR) {
|
||||
DRM_DEBUG_KMS("horizontal flip is not supported with linear surface formats\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!plane_state->base.visible)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user