@@ -4444,9 +4444,11 @@ skl_update_scaler_users(
rotation = DRM_ROTATE_0;
}
- need_scaling = intel_rotation_90_or_270(rotation) ?
- (src_h != dst_w || src_w != dst_h):
- (src_w != dst_w || src_h != dst_h);
+ /* scaling is required when src dst sizes doesn't match or format is NV12 */
+ need_scaling = (src_w != dst_w || src_h != dst_h ||
+ (intel_rotation_90_or_270(rotation) &&
+ (src_h != dst_w || src_w != dst_h)) ||
+ (fb && fb->pixel_format == DRM_FORMAT_NV12));
/*
* if plane is being disabled or scaler is no more required or force detach
@@ -4512,6 +4514,7 @@ skl_update_scaler_users(
case DRM_FORMAT_YVYU:
case DRM_FORMAT_UYVY:
case DRM_FORMAT_VYUY:
+ case DRM_FORMAT_NV12:
break;
default:
DRM_DEBUG_KMS("PLANE:%d FB:%d unsupported scaling format 0x%x\n",
This patch stages a scaler request when input format is NV12. The same scaler does both chroma-upsampling and resolution scaling as needed. Signed-off-by: Chandra Konduru <chandra.konduru@intel.com> --- drivers/gpu/drm/i915/intel_display.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)