Lines Matching defs:rec

862 			     struct drm_intel_overlay_put_image *rec)
866 if (rec->dst_x < mode->hdisplay &&
867 rec->dst_x + rec->dst_width <= mode->hdisplay &&
868 rec->dst_y < mode->vdisplay &&
869 rec->dst_y + rec->dst_height <= mode->vdisplay)
875 static int check_overlay_scaling(struct put_image_params *rec)
880 tmp = ((rec->src_scan_h << 16) / rec->dst_h) >> 16;
883 tmp = ((rec->src_scan_w << 16) / rec->dst_w) >> 16;
891 struct drm_intel_overlay_put_image *rec,
894 int uv_hscale = uv_hsubsampling(rec->flags);
895 int uv_vscale = uv_vsubsampling(rec->flags);
902 if (rec->src_height > IMAGE_MAX_HEIGHT_LEGACY ||
903 rec->src_width > IMAGE_MAX_WIDTH_LEGACY)
906 if (rec->src_height > IMAGE_MAX_HEIGHT ||
907 rec->src_width > IMAGE_MAX_WIDTH)
912 if (rec->src_height < N_VERT_Y_TAPS*4 ||
913 rec->src_width < N_HORIZ_Y_TAPS*4)
917 switch (rec->flags & I915_OVERLAY_TYPE_MASK) {
926 depth = packed_depth_bytes(rec->flags);
931 rec->stride_UV = 0;
932 rec->offset_U = 0;
933 rec->offset_V = 0;
935 if (rec->offset_Y % depth)
949 if (rec->src_width % uv_hscale)
958 if (rec->stride_Y & stride_mask || rec->stride_UV & stride_mask)
960 if (IS_GEN4(dev) && rec->stride_Y < 512)
963 tmp = (rec->flags & I915_OVERLAY_TYPE_MASK) == I915_OVERLAY_YUV_PLANAR ?
965 if (rec->stride_Y > tmp || rec->stride_UV > 2*1024)
969 switch (rec->flags & I915_OVERLAY_TYPE_MASK) {
973 if (packed_width_bytes(rec->flags, rec->src_width) > rec->stride_Y)
976 tmp = rec->stride_Y*rec->src_height;
977 if (rec->offset_Y + tmp > new_bo->base.size)
982 if (rec->src_width > rec->stride_Y)
984 if (rec->src_width/uv_hscale > rec->stride_UV)
987 tmp = rec->stride_Y * rec->src_height;
988 if (rec->offset_Y + tmp > new_bo->base.size)
991 tmp = rec->stride_UV * (rec->src_height / uv_vscale);
992 if (rec->offset_U + tmp > new_bo->base.size ||
993 rec->offset_V + tmp > new_bo->base.size)